-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
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
%.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
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 $< >$@