the asumptions were of course, incorrect
[convexer.git] / build.sh
index cee4b103263e5d46786f7578740fd6a29f8c1c31..a20dc3ea2503fbad4408856298803e7440e31147 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -16,8 +16,10 @@ fi
 target_os_windows(){
    exe_ext=".exe"
    lib_ext=".dll"
-   compiler_prefix="i686-w64-mingw32-"
+   compiler_prefix="x86_64-w64-mingw32-"
    asan=""
+
+   echo "CXR_GNU_LINUX=0" > platform.py
 }
 
 target_os_gnu_linux(){
@@ -26,6 +28,8 @@ target_os_gnu_linux(){
    compiler_prefix=""
    
    asan="-fsanitize=address"
+
+   echo "CXR_GNU_LINUX=1" > platform.py
 }
 
 compile(){
@@ -61,7 +65,7 @@ fi
 mkdir -p nbvtf/obj
 compile $C -O1 -ggdb -fPIC -shared \
    -Wall -Wno-unused-variable -Wno-unused-function -std=c99 -pedantic \
-   -DCXR_SO -DCXR_DEBUG -DCXR_VALVE_MAP_FILE \
+   -DCXR_SO -DCXR_DEBUG -DCXR_VALVE_MAP_FILE -DCXR_VALVE_BIN \
    -xc cxr/cxr.h \
    -o libcxr$lib_ext \
    -lm
@@ -92,8 +96,9 @@ compile $C -O3 \
       -lm
 
 # This is for testing with asan on linux
-# compile gcc -ggdb -O1 -Wall \
-#              -Wno-unused-variable -Wno-unused-function $asan -Werror=vla \
-#              cxr/test.c \
-#              -o test$exe_ext \
-#              -lm 
+compile $C -ggdb -O0 -Wall \
+               -Wno-unused-variable -Wno-unused-function $asan -Werror=vla \
+      -DCXR_SO -DCXR_DEBUG -DCXR_VALVE_MAP_FILE \
+               cxr/test.c \
+               -o test$exe_ext \
+               -lm