rayzor
view GNUmakefile @ 10:235c8b764c0b
optimized swap_buffers
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 10 Apr 2014 08:03:52 +0300 |
parents | 5fcf72837b69 |
children | d94a69933a71 |
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
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"