ld33_umonster

view Makefile @ 0:4a6683050e29

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 22 Aug 2015 07:15:00 +0300
parents
children 93ff21458a16
line source
1 ccsrc = $(wildcard src/*.cc)
2 csrc = $(wildcard src/*.c)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
6 bin = umonster
8 sys = $(shell uname -s)
10 CFLAGS = -pedantic -Wall -g
11 CXXFLAGS = $(CFLAGS)
12 LDFLAGS = $(libgl_$(sys)) -lvmath -limago -lpsys -lanim -lm
14 libgl_Linux = -lGL -lGLU -lglut -lGLEW
15 libgl_Darwin = -framework OpenGL -framework GLUT -lGLEW
18 $(bin): $(obj)
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.c
24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 %.d: %.cc
27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 .PHONY: clean
30 clean:
31 rm -f $(obj) $(bin)
33 .PHONY: cleandep
34 cleandep:
35 rm -f $(dep)