3 # Compilers, and cache wrapper
4 # ----------------------------
7 compiler_cache
="ccache"
9 # Autodetect ccache unavailible
10 if ! [ -x "$( command -v $compiler_cache )" ]; then
19 compiler_prefix
="i686-w64-mingw32-"
23 target_os_gnu_linux
(){
28 asan
="-fsanitize=address"
32 cmd
="$compiler_prefix$@"
38 error
"Compile failed"
43 # Commandline arguments
44 # ---------------------
45 if [[ $1 == "windows" ]]; then
51 # Actual compiler commands
53 # <compiler> optimisation level, output type
62 compile
$C -O1 -ggdb -fPIC -shared \
63 -Wall -Wno-unused-variable -Wno-unused-function -std=c99
-pedantic \
64 -DCXR_SO -DCXR_DEBUG -DCXR_VALVE_MAP_FILE \
71 -o nbvtf
/obj
/librgbcx.o
79 compile
$CXX -O3 -fPIC -c \
80 -DUSE_LIBRGBCX -DNBVTF_AS_SO \
82 -o nbvtf
/obj
/libnbvtf.o
84 compile
$CXX -O3 -shared \
85 nbvtf
/obj
/librgbcx.o nbvtf
/obj
/libnbvtf.o \
89 -Wno-unused-variable -Wno-unused-function $asan -Werror=vla \
90 nbvtf
/obj
/tovtf.o nbvtf
/obj
/librgbcx.o \
94 # This is for testing with asan on linux
95 # compile gcc -ggdb -O1 -Wall \
96 # -Wno-unused-variable -Wno-unused-function $asan -Werror=vla \