Update build scripts

This commit is contained in:
Abdelrahman Said 2025-02-24 07:58:42 +00:00
parent fa1d9eec0d
commit 9403193f09
2 changed files with 4 additions and 6 deletions

View File

@ -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"

View File

@ -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)