X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=eradicate;a=blobdiff_plain;f=GNUmakefile;h=73f7938914d301b71395fe5748a3b199132d8a0f;hp=817daffe09fab51ce61409621b199b223c2cfd79;hb=HEAD;hpb=5a00ac1b6ff18814600e84e74d4d1e34847e9103 diff --git a/GNUmakefile b/GNUmakefile index 817daff..73f7938 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,12 +1,15 @@ csrc = $(wildcard src/*.c) $(wildcard src/sdl/*.c) $(wildcard src/3dgfx/*.c) +asmsrc = $(wildcard src/*.asm) -obj = $(csrc:.c=.o) +obj = $(csrc:.c=.o) $(asmsrc:.asm=.o) dep = $(obj:.o=.d) bin = game +def = -DUSE_MMX inc = -Isrc -Isrc/sdl -Isrc/3dgfx -Ilibs/imago/src +warn = -pedantic -Wall -CFLAGS = $(arch) -pedantic -Wall -g -MMD $(inc) `sdl-config --cflags` +CFLAGS = $(arch) $(warn) -g -MMD $(def) $(inc) `sdl-config --cflags` LDFLAGS = $(arch) -Llibs/imago -limago $(sdl_ldflags) -lm ifneq ($(shell uname -m), i386) @@ -16,10 +19,15 @@ else sdl_ldflags = `sdl-config --libs` endif +.PHONY: all +all: $(bin) $(bin): $(obj) imago $(CC) -o $@ $(obj) $(LDFLAGS) +%.o: %.asm + nasm -f elf -o $@ $< + -include $(dep) .PHONY: imago @@ -33,3 +41,7 @@ clean: .PHONY: cleandep cleandep: rm -f $(dep) + +.PHONY: data +data: + @tools/procdata