foo
[dosdemo] / Makefile.dj
index b5c42bb..a018ddb 100644 (file)
@@ -4,7 +4,7 @@ obj = $(src:.c=.cof) $(asmsrc:.asm=.cof)
 dep = $(obj:.cof=.dep)
 bin = demo.exe
 
-asmsrc += font.asm
+asmsrc += cspr/dbgfont.asm cspr/confont.asm
 
 ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
        hostsys = dos
@@ -16,15 +16,21 @@ endif
 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
+#prof = -pg
 warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable
 
 CC = $(TOOLPREFIX)gcc
 AR = $(TOOLPREFIX)ar
-CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(inc)
+CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(prof) $(inc)
 LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja libs/mikmod/dos/libmikmod.a
 
+ifneq ($(hostsys), dos)
+.PHONY: all
+all: data $(bin)
+endif
+
 $(bin): $(obj) imago anim mikmod
-       $(CC) -o $@ -Wl,-Map=ld.map $(obj) $(LDFLAGS)
+       $(CC) -o $@ -Wl,-Map=ld.map $(prof) $(obj) $(LDFLAGS)
 
 %.cof: %.asm
        nasm -f coff -o $@ $<
@@ -76,11 +82,8 @@ 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 $< >$@
+.PHONY: data
+data:
+       @tools/procdata
+endif