dbf-halloween2015

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Sun Nov 01 00:09:12 2015 +0200
     1.3 @@ -0,0 +1,31 @@
     1.4 +src = $(wildcard src/*.cc) $(wildcard src/audio/*.cc)
     1.5 +csrc = $(wildcard src/*.c) $(wildcard src/dsys/*.c)
     1.6 +obj = $(src:.cc=.o) $(csrc:.c=.o)
     1.7 +dep = $(obj:.o=.d)
     1.8 +bin = halloween
     1.9 +
    1.10 +opt = -O2
    1.11 +
    1.12 +CFLAGS = -pedantic -Wall -g $(opt) -Isrc
    1.13 +CXXFLAGS = -pedantic -Wall -g $(opt) -Isrc
    1.14 +LDFLAGS = -lGL -lGLU -lglut -lGLEW -lvmath -limago -lm -ldl -lpthread \
    1.15 +		  -lvorbisfile -logg -lpthread -lopenal
    1.16 +
    1.17 +$(bin): $(obj)
    1.18 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.19 +
    1.20 +-include $(dep)
    1.21 +
    1.22 +%.d: %.c
    1.23 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.24 +
    1.25 +%.d: %.cc
    1.26 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.27 +
    1.28 +.PHONY: clean
    1.29 +clean:
    1.30 +	rm -f $(obj) $(bin)
    1.31 +
    1.32 +.PHONY: cleandep
    1.33 +cleandep:
    1.34 +	rm -f $(dep)