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(){
compiler_prefix=""
asan="-fsanitize=address"
+
+ echo "CXR_GNU_LINUX=1" > platform.py
}
compile(){
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
-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