istereo2
view Makefile @ 28:74b50b538858
added nexus7 device id for ad testing
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 05 Oct 2015 17:16:31 +0300 |
parents | 018f997dc646 |
children |
line source
1 root = .
2 src = $(wildcard src/*.c) $(wildcard src/glut/*.c)
3 ccsrc = $(wildcard src/*.cc)
5 obj = $(src:.c=.o) $(ccsrc:.cc=.o)
6 dep = $(obj:.o=.d)
7 bin = test
9 incdir = -Isrc
10 def = -DNO_FREETYPE
12 CFLAGS = -pedantic -Wall -g $(def) $(incdir)
13 CXXFLAGS = $(CFLAGS)
14 LDFLAGS = $(libgl) -lm -ldl
16 include libs/Makefile
18 sys := $(shell uname -s)
19 ifeq ($(sys), Darwin)
20 libgl = -framework OpenGL -framework GLUT -lGLEW
21 else
22 libgl = -lGL -lGLU -lglut -lGLEW
23 endif
25 $(bin): $(obj)
26 @echo "Linking $(bin) ..."
27 @$(CXX) -o $@ $(obj) $(LDFLAGS)
29 -include $(dep)
31 %.d: %.c
32 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
34 %.d: %.cc
35 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
37 .PHONY: clean
38 clean:
39 rm -f $(obj) $(bin)
41 .PHONY: cleandep
42 cleandep:
43 rm -f $(dep)