con.fmt caused problems in dos. renamed to console.fnt
[dosdemo] / Makefile.dj
index a687012..af00af7 100644 (file)
@@ -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 += cspr/dbgfont.asm cspr/confont.asm
+
 ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
        hostsys = dos
 else
@@ -11,7 +13,7 @@ else
        TOOLPREFIX = i586-pc-msdosdjgpp-
 endif
 
-inc = -Isrc -Isrc/dos -Ilibs -Ilibs/imago/src -Ilibs/anim/src -Ilibs/mikmod/include
+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
@@ -21,18 +23,26 @@ AR = $(TOOLPREFIX)ar
 CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(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)
 
 %.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
@@ -71,4 +81,8 @@ clean:
 
 cleandep:
        rm -f $(dep)
+
+.PHONY: data
+data:
+       @tools/procdata
 endif