X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=GNUmakefile;h=6e91ee824e7911ea1df630ad16c3e458dbe9e87a;hp=d2dbc8b8726dbf684da3a67839b9843ada7e0a81;hb=2ee531a10bad1036d2279f9b626da72e345a3b37;hpb=73f97e0d9dc83cad4aa7b53d900ea28390afed4f diff --git a/GNUmakefile b/GNUmakefile index d2dbc8b..6e91ee8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,9 +1,11 @@ src = $(wildcard src/*.c) $(wildcard src/scr/*.c) $(wildcard src/sdl/*.c) +asmsrc = $(wildcard src/*.asm) obj = $(src:.c=.o) $(asmsrc:.asm=.o) dep = $(obj:.o=.d) bin = demo -asmsrc += font.asm +asmsrc += cspr/dbgfont.asm cspr/confont.asm +bindata = data/loading.img inc = -I/usr/local/include -Isrc -Isrc/scr -Isrc/sdl -Ilibs -Ilibs/imago/src -Ilibs/mikmod/include warn = -pedantic -Wall -Wno-unused-variable -Wno-unused-function @@ -13,17 +15,22 @@ LDFLAGS = $(arch) -Llibs/imago -Llibs/mikmod -limago -lmikmod $(sdl_ldflags) -lm ifneq ($(shell uname -m), i386) arch = -m32 - sdl_ldflags = -L/usr/lib/i386-linux-gnu -lSDL + sdl_ldflags = -L/usr/lib/i386-linux-gnu -lSDL-1.2 else sdl_ldflags = `sdl-config --libs` endif +.PHONY: all +all: data $(bin) + $(bin): $(obj) imago mikmod $(CC) -o $@ $(obj) $(LDFLAGS) %.o: %.asm nasm -f elf -o $@ $< +src/data.o: src/data.asm $(bindata) + -include $(dep) %.d: %.c @@ -51,8 +58,6 @@ clean: cleandep: rm -f $(dep) -tools/csprite/csprite: - $(MAKE) -C tools/csprite - -font.asm: data/font.png tools/csprite/csprite - tools/csprite/csprite -n cs_font -s 16x16 -r 288x32+32+17 -conv565 -nasm $< >$@ +.PHONY: data +data: + @tools/procdata