textpsys
annotate Makefile @ 0:a4ffd9e6984c
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 19 Aug 2015 09:13:48 +0300 |
parents | |
children | 57c6f7b70126 |
rev | line source |
---|---|
nuclear@0 | 1 src = $(wildcard src/*.cc) |
nuclear@0 | 2 obj = $(src:.cc=.o) |
nuclear@0 | 3 dep = $(obj:.o=.d) |
nuclear@0 | 4 bin = textbomb |
nuclear@0 | 5 |
nuclear@0 | 6 |
nuclear@0 | 7 CXXFLAGS = -std=c++11 -pedantic -Wall -g |
nuclear@0 | 8 LDFLAGS = $(libgl_$(shell uname -s)) -lm |
nuclear@0 | 9 |
nuclear@0 | 10 libgl_Linux = -lGL -lglut |
nuclear@0 | 11 libgl_Darwin = -framework OpenGL -framework GLUT |
nuclear@0 | 12 |
nuclear@0 | 13 $(bin): $(obj) |
nuclear@0 | 14 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 15 |
nuclear@0 | 16 -include $(dep) |
nuclear@0 | 17 |
nuclear@0 | 18 %.d: %.cc |
nuclear@0 | 19 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 20 |
nuclear@0 | 21 .PHONY: clean |
nuclear@0 | 22 clean: |
nuclear@0 | 23 rm -f $(obj) $(bin) |
nuclear@0 | 24 |
nuclear@0 | 25 .PHONY: cleandep |
nuclear@0 | 26 cleandep: |
nuclear@0 | 27 rm -f $(dep) |