rayzor

annotate 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
rev   line source
nuclear@9 1 baseobj = src/main.o src/logger.o src/screen.o src/scrman.o
nuclear@9 2 modelobj = src/modeller.o src/min3d.o src/m3drast.o src/lines.o
nuclear@9 3 rendobj = src/renderer.o src/vmath.o
nuclear@13 4 scnobj = src/scene.o src/object.o src/light.o src/camera.o src/snode.o
nuclear@5 5 sysobj = src/dosemu/dosemu.o
nuclear@9 6 obj = $(baseobj) $(modelobj) $(rendobj) $(scnobj) $(sysobj)
nuclear@5 7 dep = $(obj:.o=.d)
nuclear@5 8 bin = rayzor
nuclear@5 9
nuclear@5 10 dbg = -g
nuclear@5 11 #opt = -O3 -ffast-math
nuclear@5 12 inc = -Isrc -Isrc/stl -Isrc/dosemu
nuclear@5 13
nuclear@5 14 CFLAGS = -pedantic -Wall $(dbg) $(opt) `pkg-config --cflags sdl` $(inc)
nuclear@5 15 CXXFLAGS = $(CFLAGS)
nuclear@5 16 LDFLAGS = `pkg-config --libs sdl` -lm
nuclear@5 17
nuclear@5 18 $(bin): $(obj)
nuclear@5 19 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@5 20
nuclear@5 21 -include $(dep)
nuclear@5 22
nuclear@5 23 %.d: %.c
nuclear@5 24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@5 25
nuclear@5 26 %.d: %.cc
nuclear@5 27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@5 28
nuclear@5 29 .PHONY: clean
nuclear@5 30 clean:
nuclear@5 31 rm -f $(obj) $(bin)
nuclear@5 32
nuclear@5 33 .PHONY: cleandep
nuclear@5 34 cleandep:
nuclear@5 35 rm -f $(dep)
nuclear@9 36
nuclear@9 37 .PHONY: profile
nuclear@9 38 profile:
nuclear@9 39 $(MAKE) CFLAGS="$(CFLAGS) -O3 -pg" LDFLAGS="$(LDFLAGS) -pg"