textpsys

annotate Makefile @ 1:57c6f7b70126

renamed to textpsys
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 19 Aug 2015 09:17:20 +0300
parents a4ffd9e6984c
children
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@1 4 bin = textpsys
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)