deepstone

view GNUmakefile @ 36:e234f2a4b6fa

ops
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 23 Sep 2013 07:42:56 +0300
parents 1870c4ef8b76
children 17a5107b6fa4
line source
1 obj = src/main.o \
2 src/mingl.o src/mglrast.o src/mglclip.o src/mglgen.o \
3 src/texture.o src/palman.o \
4 src/scene.o src/cvec.o src/fixedp.o \
5 src/dosemu/dosemu.o
6 dep = $(obj:.o=.d)
7 bin = deepstone
9 dbg = -g
10 #opt = -O3 -ffast-math
12 CC = gcc
13 CFLAGS = -pedantic -Wall $(dbg) $(opt) `pkg-config --cflags sdl` -Isrc -Isrc/dosemu $(add_cflags) -DRAST_FLOAT -DDBG_USE_FLOAT
14 LDFLAGS = `pkg-config --libs sdl` -lm
15 #LDFLAGS = -Llib64 -Wl,-rpath=./lib64 -lSDL -lm
16 #LDFLAGS = -m32 -Llib32 -Wl,-rpath=./lib32 -lSDL-1.2 -lm
18 ifeq ($(shell uname -s), Darwin)
19 add_cflags = -Dmain=SDL_main
20 endif
22 $(bin): $(obj)
23 $(CC) -o $@ $(obj) $(LDFLAGS)
25 -include $(dep)
27 %.d: %.c
28 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(bin)
34 .PHONY: cleandep
35 cleandep:
36 rm -f $(dep)