textpsys

diff Makefile @ 0:a4ffd9e6984c

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 19 Aug 2015 09:13:48 +0300
parents
children 57c6f7b70126
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Wed Aug 19 09:13:48 2015 +0300
     1.3 @@ -0,0 +1,27 @@
     1.4 +src = $(wildcard src/*.cc)
     1.5 +obj = $(src:.cc=.o)
     1.6 +dep = $(obj:.o=.d)
     1.7 +bin = textbomb
     1.8 +
     1.9 +
    1.10 +CXXFLAGS = -std=c++11 -pedantic -Wall -g
    1.11 +LDFLAGS = $(libgl_$(shell uname -s)) -lm
    1.12 +
    1.13 +libgl_Linux = -lGL -lglut
    1.14 +libgl_Darwin = -framework OpenGL -framework GLUT
    1.15 +
    1.16 +$(bin): $(obj)
    1.17 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.18 +
    1.19 +-include $(dep)
    1.20 +
    1.21 +%.d: %.cc
    1.22 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.23 +
    1.24 +.PHONY: clean
    1.25 +clean:
    1.26 +	rm -f $(obj) $(bin)
    1.27 +
    1.28 +.PHONY: cleandep
    1.29 +cleandep:
    1.30 +	rm -f $(dep)