deepstone

diff GNUmakefile @ 31:d0164235bfd1

changed the linux/mac makefile name to GNUmakefile
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Sep 2013 18:37:07 +0300
parents Makefile@11d14f688485
children 1870c4ef8b76
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/GNUmakefile	Sun Sep 22 18:37:07 2013 +0300
     1.3 @@ -0,0 +1,31 @@
     1.4 +obj = src/main.o \
     1.5 +	  src/mingl.o src/mglrast.o src/mglclip.o src/mglgen.o \
     1.6 +	  src/texture.o src/palman.o \
     1.7 +	  src/scene.o src/cvec.o src/fixedp.o \
     1.8 +	  dosemu/dosemu.o
     1.9 +dep = $(obj:.o=.d)
    1.10 +bin = deepstone
    1.11 +
    1.12 +CC = gcc
    1.13 +CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl` -Isrc -Idosemu $(add_cflags) -DRAST_FLOAT -DDBG_USE_FLOAT
    1.14 +LDFLAGS = `pkg-config --libs sdl` -lm
    1.15 +
    1.16 +ifeq ($(shell uname -s), Darwin)
    1.17 +	add_cflags = -Dmain=SDL_main
    1.18 +endif
    1.19 +
    1.20 +$(bin): $(obj)
    1.21 +	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.22 +
    1.23 +-include $(dep)
    1.24 +
    1.25 +%.d: %.c
    1.26 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.27 +
    1.28 +.PHONY: clean
    1.29 +clean:
    1.30 +	rm -f $(obj) $(bin)
    1.31 +
    1.32 +.PHONY: cleandep
    1.33 +cleandep:
    1.34 +	rm -f $(dep)