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