X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=eradicate;a=blobdiff_plain;f=GNUmakefile;fp=GNUmakefile;h=3fbb73f15bb519cb0948ba62e1f9fc58e2f25761;hp=817daffe09fab51ce61409621b199b223c2cfd79;hb=2bd7529337d75380170f58364b1328ef3b8dc845;hpb=79091ddde8d1e5f865502f1a3f0755cda57c34fb diff --git a/GNUmakefile b/GNUmakefile index 817daff..3fbb73f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,12 +1,14 @@ 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 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 $(inc) `sdl-config --cflags` LDFLAGS = $(arch) -Llibs/imago -limago $(sdl_ldflags) -lm ifneq ($(shell uname -m), i386) @@ -16,10 +18,15 @@ else sdl_ldflags = `sdl-config --libs` endif +.PHONY: all +all: data $(bin) $(bin): $(obj) imago $(CC) -o $@ $(obj) $(LDFLAGS) +%.o: %.asm + nasm -f elf -o $@ $< + -include $(dep) .PHONY: imago @@ -33,3 +40,7 @@ clean: .PHONY: cleandep cleandep: rm -f $(dep) + +.PHONY: data +data: + @tools/procdata