8d62488fb15ae79798180dfaee2b5f1a863fdee3
[convexer.git] / Makefile
1 all: libcxr.so libnbvtf.so
2
3 libcxr.so: cxr/cxr.h cxr/cxr_math.h cxr/cxr_mem.h
4 gcc -O1 -ggdb -fPIC -shared \
5 -Wall -Wno-unused-variable -Wno-unused-function -std=c99 -pedantic \
6 -DCXR_SO -DCXR_DEBUG -DCXR_VALVE_MAP_FILE \
7 -xc cxr/cxr.h \
8 -o libcxr.so \
9 -lm
10
11 tovtf: nbvtf/obj/librgbcx.o nbvtf/obj/tovtf.o
12 g++ -O3 nbvtf/obj/tovtf.o nbvtf/obj/librgbcx.o -o tovtf
13
14 nbvtf/obj/librgbcx.o: nbvtf/librgbcx.cc nbvtf/rgbcx.h
15 g++ -O3 -c \
16 nbvtf/librgbcx.cc \
17 -o nbvtf/obj/librgbcx.o
18
19 nbvtf/obj/tovtf.o: nbvtf/vtf_cmd.c nbvtf/nbvtf.h
20 gcc -O3 -c \
21 -DUSE_LIBRGBCX \
22 -I./nbvtf/ \
23 nbvtf/vtf_cmd.c \
24 -o nbvtf/obj/tovtf.o
25
26 nbvtf/obj/libnbvtf.o: nbvtf/nbvtf.h
27 gcc -O3 -fPIC -c \
28 -DUSE_LIBRGBCX -DNBVTF_AS_SO \
29 -xc nbvtf/nbvtf.h \
30 -o nbvtf/obj/libnbvtf.o
31
32 libnbvtf.so: nbvtf/obj/librgbcx.o nbvtf/obj/libnbvtf.o
33 g++ -O3 -shared \
34 nbvtf/obj/librgbcx.o nbvtf/obj/libnbvtf.o \
35 -o libnbvtf.so
36
37 test: cxr/test.c cxr/cxr.h cxr/cxr_math.h cxr/solid.h
38 gcc -ggdb -O1 -Wall \
39 -Wno-unused-variable -Wno-unused-function -fsanitize=address -Werror=vla \
40 cxr/test.c \
41 -o test \
42 -lm