istereo2

view Makefile @ 24:9d53a4938ce8

port to android mostly complete, ads not done, and needs some polishing
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 04 Oct 2015 08:15:24 +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)