deepstone

view GNUmakefile @ 41:482f30e63462

fixed typos in readme
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 15 Sep 2017 05:33:57 +0300
parents e234f2a4b6fa
children
line source
1 obj = src/main.o src/record.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
11 def = -DRAST_FLOAT -DDBG_USE_FLOAT -DTEXMAP_PERSP_CORRECT
13 CC = gcc
14 CFLAGS = -pedantic -Wall $(dbg) $(opt) `pkg-config --cflags sdl` -Isrc -Isrc/dosemu $(add_cflags) $(def)
15 LDFLAGS = `pkg-config --libs sdl` -lm -limago
16 #LDFLAGS = -Llib64 -Wl,-rpath=./lib64 -lSDL -lm
17 #LDFLAGS = -m32 -Llib32 -Wl,-rpath=./lib32 -lSDL-1.2 -lm
19 ifeq ($(shell uname -s), Darwin)
20 add_cflags = -Dmain=SDL_main
21 endif
23 $(bin): $(obj)
24 $(CC) -o $@ $(obj) $(LDFLAGS)
26 -include $(dep)
28 %.d: %.c
29 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
31 .PHONY: clean
32 clean:
33 rm -f $(obj) $(bin)
35 .PHONY: cleandep
36 cleandep:
37 rm -f $(dep)