istereo2

view Makefile @ 9:64e15874f3bd

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 26 Sep 2015 02:56:07 +0300
parents
children 2a0ef5efb8e2
line source
1 src = $(wildcard src/*.c) $(wildcard src/glut/*.c)
2 ccsrc = $(wildcard src/*.cc)
4 obj = $(src:.c=.o) $(ccsrc:.cc=.o)
5 dep = $(obj:.o=.d)
6 bin = test
8 incdir = -Isrc
9 def = -DNO_FREETYPE
11 CFLAGS = -pedantic -Wall -g $(def) $(incdir)
12 CXXFLAGS = $(CFLAGS)
13 LDFLAGS = -lGL -lGLU -lglut -lGLEW -lm -ldl
15 include libs/Makefile
17 $(bin): $(obj)
18 $(CXX) -o $@ $(obj) $(LDFLAGS)
20 -include $(dep)
22 %.d: %.c
23 @$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
25 %.d: %.cc
26 @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin)
32 .PHONY: cleandep
33 cleandep:
34 rm -f $(dep)