diff --git a/compile b/compile index e3c90a2..ad1cdb8 100755 --- a/compile +++ b/compile @@ -35,6 +35,9 @@ done CC=clang CFLAGS="-Wall -Wextra -Werror -pedantic" LIBFLAGS="-fPIC -shared" +KERNEL="$(uname -s)" +MACHINE="$(uname -m)" +PLATFORM="${KERNEL}_${MACHINE}" if [[ $CC == "gcc" ]]; then # Used to disable the "ASan runtime does not come first in initial library list" error when compiling with gcc @@ -66,7 +69,7 @@ esac TEST_INCLUDE="$(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/posix-$BUILD_TYPE" +BUILD_DIR="libwapp-build/$PLATFORM-$BUILD_TYPE" if [[ -d $BUILD_DIR ]]; then rm -rf $BUILD_DIR fi