dbf-halloween2015

annotate Makefile @ 0:50683c78264e

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