rayzor
view GNUmakefile @ 21:8c4859442200
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 15 Apr 2014 20:52:05 +0300 |
parents | be616b58df99 |
children |
line source
1 baseobj = src/main.o src/logger.o src/screen.o src/scrman.o src/rbtree.o
2 modelobj = src/modeller.o src/min3d.o src/m3drast.o src/lines.o
3 rendobj = src/renderer.o src/vmath.o src/raytrace.o
4 scnobj = src/scene.o src/object.o src/light.o src/camera.o src/snode.o
5 sysobj = src/dosemu/dosemu.o
6 obj = $(baseobj) $(modelobj) $(rendobj) $(scnobj) $(sysobj)
7 dep = $(obj:.o=.d)
8 bin = rayzor
10 dbg = -g
11 #opt = -O3 -ffast-math
12 inc = -Isrc -Isrc/stl -Isrc/dosemu
14 CFLAGS = -pedantic -Wall $(dbg) $(opt) `pkg-config --cflags sdl` $(inc)
15 CXXFLAGS = $(CFLAGS)
16 LDFLAGS = `pkg-config --libs sdl` -lm
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)
37 .PHONY: profile
38 profile:
39 $(MAKE) CFLAGS="$(CFLAGS) -O3 -pg" LDFLAGS="$(LDFLAGS) -pg"