projects
/
cyberay
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first pass at bvh construction (SAH), untested
[cyberay]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
1435f52
..
89d1c44
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,18
+1,21
@@
-src = $(wildcard src/*.c)
+src = $(wildcard src/*.c) $(wildcard libs/miniglut/*.c)
obj = $(src:.c=.o)
dep = $(src:.c=.d)
bin = cyberay
obj = $(src:.c=.o)
dep = $(src:.c=.d)
bin = cyberay
-opt = -O3 -ffast-math
+opt = -O3 -ffast-math -fno-strict-aliasing
dbg = -g
warn = -pedantic -Wall
dbg = -g
warn = -pedantic -Wall
+def = -DMINIGLUT_USE_LIBC
+inc = -Ilibs -Ilibs/treestore -Ilibs/miniglut
+libdir = -Llibs/treestore
-CFLAGS = $(warn) $(opt) $(dbg) -pthread -MMD
-LDFLAGS = $(libgl) -lm -pthread
+CFLAGS = $(warn) $(opt) $(dbg) $(def) $(inc) -pthread -MMD
+LDFLAGS = $(libgl) $(libs) -lm -pthread -limago -ltreestore
-libgl = -lGL -lGLU -lglut
+libgl = -lGL -lGLU -lX11 -lXext
-$(bin): $(obj)
+$(bin): $(obj) libs
$(CC) -o $@ $(obj) $(LDFLAGS)
-include $(dep)
$(CC) -o $@ $(obj) $(LDFLAGS)
-include $(dep)
@@
-24,3
+27,11
@@
clean:
.PHONY: cleandep
cleandep:
rm -f $(dep)
.PHONY: cleandep
cleandep:
rm -f $(dep)
+
+.PHONY: libs
+libs:
+ $(MAKE) -C libs
+
+.PHONY: clean-libs
+clean-libs:
+ $(MAKE) -C libs clean