diff --git a/build.ps1 b/build.ps1 index e1a93cb..e002060 100644 --- a/build.ps1 +++ b/build.ps1 @@ -59,4 +59,4 @@ If ($Status -ne 0) { } # Build library -Invoke-Expression "$Compiler $GeneralFlags $LibraryFlags $IncludeDirs $SrcFiles $Objects $Outputs" +Invoke-Expression "$Compiler $GeneralFlags $LibraryFlags $SrcFiles $Objects $Outputs" diff --git a/compile b/compile index 0d98c26..b371304 100755 --- a/compile +++ b/compile @@ -44,8 +44,6 @@ if [[ $CC == "gcc" ]]; then export ASAN_OPTIONS=verify_asan_link_order=0 fi -INCLUDE="$(find src -type d | xargs -I{} echo -n "-I{} ")" - case $COMPONENTS in all) SRC="src/wapp.c" @@ -63,7 +61,7 @@ case $COMPONENTS in ;; esac -TEST_INCLUDE="$(find tests -type d | xargs -I{} echo -n "-I{} ")" +TEST_INCLUDE="$(find src -type d | xargs -I{} echo -n "-I{} ") $(find tests -type d | xargs -I{} echo -n "-I{} ")" TEST_SRC="$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ")" BUILD_DIR="libwapp-build/$PLATFORM-$BUILD_TYPE" @@ -83,7 +81,7 @@ TEST_OUT="$BUILD_DIR/wapptest" # Compile tests if [[ $(echo $TEST_SRC | xargs) != "" ]]; then - (set -x ; $CC $CFLAGS $INCLUDE $TEST_INCLUDE $SRC $TEST_SRC -o $TEST_OUT) + (set -x ; $CC $CFLAGS $TEST_INCLUDE $SRC $TEST_SRC -o $TEST_OUT) fi # Run tests and exit on failure @@ -99,4 +97,4 @@ if [[ -f $TEST_OUT ]]; then fi # Compile library -(set -x ; $CC $CFLAGS $LIBFLAGS $INCLUDE $SRC -o $OUT) +(set -x ; $CC $CFLAGS $LIBFLAGS $SRC -o $OUT)