-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (20 loc) · 801 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
RELEASE_CFLAGS=-Dstricmp=strcasecmp -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
DEBUG_CFLAGS=-Dstricmp=strcasecmp -g
CFLAGS=$(RELEASE_CFLAGS) -fPIE
DR_FLAGS=-DGLQUAKE -D_DLL_BUILD -shared -fPIC
renderers=build/dr_default.so build/brush.so build/bprint.so build/sketch.so
all_renderers=$(renderers) build/ainpr.so
release:
make all CFLAGS="$(RELEASE_CFLAGS)"
debug:
make all CFLAGS="$(DEBUG_CFLAGS)"
all: quake dynamic_renderers
quake:
make -C NPRQuakeSrc CFLAGS="$(CFLAGS)"
dynamic_renderers: $(all_renderers)
build/ainpr.so: dynamic_r/ainpr.c dynamic_r/*.h
gcc $(CFLAGS) $(DR_FLAGS) -lGLU -o build/ainpr.so dynamic_r/ainpr.c
$(renderers): build/%.so: dynamic_r/%.c dynamic_r/*.h
gcc $(CFLAGS) $(DR_FLAGS) -o $@ $<
clean:
make -C NPRQuakeSrc clean