diff --git a/Base/usr/include/.gitignore b/Base/usr/include/.gitignore new file mode 100644 index 0000000000..5dd51d7b23 --- /dev/null +++ b/Base/usr/include/.gitignore @@ -0,0 +1,2 @@ +* +!.git* \ No newline at end of file diff --git a/Base/usr/include/.gitkeep b/Base/usr/include/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Base/usr/lib/.gitignore b/Base/usr/lib/.gitignore new file mode 100644 index 0000000000..5dd51d7b23 --- /dev/null +++ b/Base/usr/lib/.gitignore @@ -0,0 +1,2 @@ +* +!.git* \ No newline at end of file diff --git a/Base/usr/lib/.gitkeep b/Base/usr/lib/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/Makefile b/LibC/Makefile index 9c690d3f39..67cc90cc71 100644 --- a/LibC/Makefile +++ b/LibC/Makefile @@ -77,3 +77,11 @@ $(LIBRARY): $(CPP_OBJS) $(ASM_OBJS) clean: @echo "CLEAN"; rm -f $(LIBRARY) $(CPP_OBJS) $(ASM_OBJS) *.d +install: $(LIBRARY) + # Copy headers + rsync -a --include '*/' --include '*.h' --exclude '*' . ../Base/usr/include + # Install the library + cp $(LIBRARY) ../Base/usr/lib + cp crt0.o ../Base/usr/lib/ + cp crti.ao ../Base/usr/lib/crti.o + cp crtn.ao ../Base/usr/lib/crtn.o \ No newline at end of file diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 48dca5f046..2d4d911d12 100644 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -5,7 +5,7 @@ echo $DIR TARGET=i686-pc-serenity PREFIX="$DIR/Local" -SYSROOT="$DIR/../Root" +SYSROOT="$DIR/../Base" mkdir -p "$DIR/Tarballs" @@ -70,5 +70,10 @@ pushd "$DIR/Build/" make -j $(nproc) all-gcc all-target-libgcc make install-gcc install-target-libgcc + + make -c ../LibC/ install + + make all-target-libstdc++-v3 + make install-target-libstdc++-v3 popd popd \ No newline at end of file diff --git a/Toolchain/UseIt.sh b/Toolchain/UseIt.sh index cc1f786e84..f80ba51ce0 100644 --- a/Toolchain/UseIt.sh +++ b/Toolchain/UseIt.sh @@ -1 +1,5 @@ -#!/bin/bash \ No newline at end of file +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +export PATH="$DIR/Local/bin:$PATH" +export TOOLCHAIN="$DIR" +echo "$PATH" \ No newline at end of file