deepstone
annotate GNUmakefile @ 40:1fa939507d8b
fast floating point->int conversion
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 15 Sep 2017 05:00:37 +0300 |
parents | e234f2a4b6fa |
children |
rev | line source |
---|---|
nuclear@38 | 1 obj = src/main.o src/record.o \ |
nuclear@28 | 2 src/mingl.o src/mglrast.o src/mglclip.o src/mglgen.o \ |
nuclear@3 | 3 src/texture.o src/palman.o \ |
nuclear@26 | 4 src/scene.o src/cvec.o src/fixedp.o \ |
nuclear@35 | 5 src/dosemu/dosemu.o |
nuclear@0 | 6 dep = $(obj:.o=.d) |
nuclear@25 | 7 bin = deepstone |
nuclear@0 | 8 |
nuclear@35 | 9 dbg = -g |
nuclear@38 | 10 opt = -O3 -ffast-math |
nuclear@38 | 11 def = -DRAST_FLOAT -DDBG_USE_FLOAT -DTEXMAP_PERSP_CORRECT |
nuclear@35 | 12 |
nuclear@0 | 13 CC = gcc |
nuclear@38 | 14 CFLAGS = -pedantic -Wall $(dbg) $(opt) `pkg-config --cflags sdl` -Isrc -Isrc/dosemu $(add_cflags) $(def) |
nuclear@38 | 15 LDFLAGS = `pkg-config --libs sdl` -lm -limago |
nuclear@35 | 16 #LDFLAGS = -Llib64 -Wl,-rpath=./lib64 -lSDL -lm |
nuclear@35 | 17 #LDFLAGS = -m32 -Llib32 -Wl,-rpath=./lib32 -lSDL-1.2 -lm |
nuclear@0 | 18 |
nuclear@31 | 19 ifeq ($(shell uname -s), Darwin) |
nuclear@31 | 20 add_cflags = -Dmain=SDL_main |
nuclear@31 | 21 endif |
nuclear@31 | 22 |
nuclear@0 | 23 $(bin): $(obj) |
nuclear@0 | 24 $(CC) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 25 |
nuclear@0 | 26 -include $(dep) |
nuclear@0 | 27 |
nuclear@0 | 28 %.d: %.c |
nuclear@0 | 29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 30 |
nuclear@0 | 31 .PHONY: clean |
nuclear@0 | 32 clean: |
nuclear@0 | 33 rm -f $(obj) $(bin) |
nuclear@5 | 34 |
nuclear@5 | 35 .PHONY: cleandep |
nuclear@5 | 36 cleandep: |
nuclear@5 | 37 rm -f $(dep) |