Update build scripts
This commit is contained in:
parent
fa1d9eec0d
commit
9403193f09
@ -59,4 +59,4 @@ If ($Status -ne 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Build library
|
# Build library
|
||||||
Invoke-Expression "$Compiler $GeneralFlags $LibraryFlags $IncludeDirs $SrcFiles $Objects $Outputs"
|
Invoke-Expression "$Compiler $GeneralFlags $LibraryFlags $SrcFiles $Objects $Outputs"
|
||||||
|
8
compile
8
compile
@ -44,8 +44,6 @@ if [[ $CC == "gcc" ]]; then
|
|||||||
export ASAN_OPTIONS=verify_asan_link_order=0
|
export ASAN_OPTIONS=verify_asan_link_order=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INCLUDE="$(find src -type d | xargs -I{} echo -n "-I{} ")"
|
|
||||||
|
|
||||||
case $COMPONENTS in
|
case $COMPONENTS in
|
||||||
all)
|
all)
|
||||||
SRC="src/wapp.c"
|
SRC="src/wapp.c"
|
||||||
@ -63,7 +61,7 @@ case $COMPONENTS in
|
|||||||
;;
|
;;
|
||||||
esac
|
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 "{} ")"
|
TEST_SRC="$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ")"
|
||||||
|
|
||||||
BUILD_DIR="libwapp-build/$PLATFORM-$BUILD_TYPE"
|
BUILD_DIR="libwapp-build/$PLATFORM-$BUILD_TYPE"
|
||||||
@ -83,7 +81,7 @@ TEST_OUT="$BUILD_DIR/wapptest"
|
|||||||
|
|
||||||
# Compile tests
|
# Compile tests
|
||||||
if [[ $(echo $TEST_SRC | xargs) != "" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
# Run tests and exit on failure
|
# Run tests and exit on failure
|
||||||
@ -99,4 +97,4 @@ if [[ -f $TEST_OUT ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Compile library
|
# Compile library
|
||||||
(set -x ; $CC $CFLAGS $LIBFLAGS $INCLUDE $SRC -o $OUT)
|
(set -x ; $CC $CFLAGS $LIBFLAGS $SRC -o $OUT)
|
||||||
|
Loading…
Reference in New Issue
Block a user