X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=Makefile.dj;h=b5c42bba4d0852422c36d6032577a5101daa0f35;hp=fe89fcf624d9137c94d28ffdbdc5bcffcc6476cc;hb=815504923a05c5f22a756b021997983e512474e1;hpb=102f82ec5a8128cb076371aa3d9821e684b94380 diff --git a/Makefile.dj b/Makefile.dj index fe89fcf..b5c42bb 100644 --- a/Makefile.dj +++ b/Makefile.dj @@ -1,9 +1,11 @@ -src = $(wildcard src/*.c) $(wildcard src/dos/*.c) -asmsrc = $(wildcard src/*.asm) $(wildcard src/dos/*.asm) +src = $(wildcard src/*.c) $(wildcard src/scr/*.c) $(wildcard src/dos/*.c) +asmsrc = $(wildcard src/*.asm) $(wildcard src/scr/*.asm) $(wildcard src/dos/*.asm) obj = $(src:.c=.cof) $(asmsrc:.asm=.cof) dep = $(obj:.cof=.dep) bin = demo.exe +asmsrc += font.asm + ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM) hostsys = dos else @@ -11,8 +13,8 @@ else TOOLPREFIX = i586-pc-msdosdjgpp- endif -inc = -Isrc -Isrc/dos -Ilibs -Ilibs/imago/src -Ilibs/anim/src -Ilibs/mikmod/include -#opt = -O3 -ffast-math -fno-strict-aliasing +inc = -Isrc -Isrc/scr -Isrc/dos -Ilibs -Ilibs/imago/src -Ilibs/anim/src -Ilibs/mikmod/include +opt = -O3 -ffast-math -fno-strict-aliasing dbg = -g warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable @@ -27,12 +29,15 @@ $(bin): $(obj) imago anim mikmod %.cof: %.asm nasm -f coff -o $@ $< +ifneq ($(hostsys), dos) -include $(dep) +endif %.cof: %.c $(CC) $(CFLAGS) -o $@ -c $< %.dep: %.c + @echo dep $@ @$(CPP) $(CFLAGS) $< -MM -MT $(@:.dep=.cof) >$@ .PHONY: imago @@ -72,3 +77,10 @@ clean: cleandep: rm -f $(dep) endif + + +tools/csprite/csprite: + $(MAKE) -C tools/csprite + +font.asm: data/legible.fnt tools/csprite/csprite + tools/csprite/csprite -n cs_font -s 8x16 -conv565 -nasm $< >$@