deepstone
changeset 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 | a8d42276b5ad |
children | 7c8402e27b7c |
files | GNUmakefile Makefile |
diffstat | 2 files changed, 31 insertions(+), 27 deletions(-) [+] |
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)
2.1 --- a/Makefile Sun Sep 22 18:26:15 2013 +0300 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,27 +0,0 @@ 2.4 -obj = src/main.o \ 2.5 - src/mingl.o src/mglrast.o src/mglclip.o src/mglgen.o \ 2.6 - src/texture.o src/palman.o \ 2.7 - src/scene.o src/cvec.o src/fixedp.o \ 2.8 - dosemu/dosemu.o 2.9 -dep = $(obj:.o=.d) 2.10 -bin = deepstone 2.11 - 2.12 -CC = gcc 2.13 -CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl` -Isrc -Idosemu -DRAST_FLOAT -DDBG_USE_FLOAT 2.14 -LDFLAGS = `pkg-config --libs sdl` -lm 2.15 - 2.16 -$(bin): $(obj) 2.17 - $(CC) -o $@ $(obj) $(LDFLAGS) 2.18 - 2.19 --include $(dep) 2.20 - 2.21 -%.d: %.c 2.22 - @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 2.23 - 2.24 -.PHONY: clean 2.25 -clean: 2.26 - rm -f $(obj) $(bin) 2.27 - 2.28 -.PHONY: cleandep 2.29 -cleandep: 2.30 - rm -f $(dep)