rayzor
view GNUmakefile @ 13:964f8ea5f095
missed quite a lot of things in my last commit apparently
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 12 Apr 2014 23:37:55 +0300 |
parents | d94a69933a71 |
children | be616b58df99 |
line source
1 baseobj = src/main.o src/logger.o src/screen.o src/scrman.o
2 modelobj = src/modeller.o src/min3d.o src/m3drast.o src/lines.o
3 rendobj = src/renderer.o src/vmath.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"