dbf-halloween2015
view Makefile @ 0:50683c78264e
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 01 Nov 2015 00:09:12 +0200 |
parents | |
children | c3f5c32cb210 |
line source
1 src = $(wildcard src/*.cc) $(wildcard src/audio/*.cc)
2 csrc = $(wildcard src/*.c) $(wildcard src/dsys/*.c)
3 obj = $(src:.cc=.o) $(csrc:.c=.o)
4 dep = $(obj:.o=.d)
5 bin = halloween
7 opt = -O2
9 CFLAGS = -pedantic -Wall -g $(opt) -Isrc
10 CXXFLAGS = -pedantic -Wall -g $(opt) -Isrc
11 LDFLAGS = -lGL -lGLU -lglut -lGLEW -lvmath -limago -lm -ldl -lpthread \
12 -lvorbisfile -logg -lpthread -lopenal
14 $(bin): $(obj)
15 $(CXX) -o $@ $(obj) $(LDFLAGS)
17 -include $(dep)
19 %.d: %.c
20 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
22 %.d: %.cc
23 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
25 .PHONY: clean
26 clean:
27 rm -f $(obj) $(bin)
29 .PHONY: cleandep
30 cleandep:
31 rm -f $(dep)