Lots of work on the build system
This commit is contained in:
20
scripts/create-sysroot.sh
Executable file
20
scripts/create-sysroot.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
source_dir=$1
|
||||
build_dir=$2
|
||||
platform=$3
|
||||
machine=$4
|
||||
|
||||
echo "Building $machine-$platform sysroot"
|
||||
mkdir -p $build_dir/sysroot/usr/include/{sys,machine}
|
||||
|
||||
cp $source_dir/photon/libc/include/*.h $build_dir/sysroot/usr/include
|
||||
|
||||
platform_headers=$(find $source_dir/photon/libc/sys/$platform -type f \( -iname "*.h" ! -iname "__*" \))
|
||||
cp -t $build_dir/sysroot/usr/include/sys $platform_headers
|
||||
|
||||
machine_arch_headers=$(find $source_dir/photon/libc/machine/$machine/ \
|
||||
-type f \( -iname "*.h" ! -iname "__*" \))
|
||||
machine_generic_headers=$(find $source_dir/photon/libc/include/machine/ \
|
||||
-type f \( -iname "*.h" ! -iname "__*" \))
|
||||
cp -t $build_dir/sysroot/usr/include/machine $machine_generic_headers $machine_arch_headers
|
||||
Reference in New Issue
Block a user