1 src = $(wildcard src/*.c) $(wildcard src/scr/*.c) $(wildcard src/dos/*.c)
2 asmsrc = $(wildcard src/*.asm) $(wildcard src/scr/*.asm) $(wildcard src/dos/*.asm)
3 obj = $(src:.c=.odj) $(asmsrc:.asm=.odj)
7 asmsrc += cspr/dbgfont.asm cspr/confont.asm
8 bindata = data/loading.img
10 ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
14 TOOLPREFIX = i586-pc-msdosdjgpp-
17 inc = -Isrc -Isrc/scr -Isrc/dos -Ilibs -Ilibs/imago/src -Ilibs/anim/src
18 opt = -O3 -ffast-math -fno-strict-aliasing
19 warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable
23 def = -DNDEBUG -DNO_MUSIC
31 CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(prof) $(inc) $(def)
32 LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja
34 ifneq ($(hostsys), dos)
39 $(bin): $(obj) imago anim
40 $(CC) -o $@ -Wl,-Map=ld.map $(prof) $(obj) $(LDFLAGS)
45 src/data.odj: src/data.asm $(bindata)
47 ifneq ($(hostsys), dos)
52 $(CC) $(CFLAGS) -o $@ -c $<
56 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.dep=.odj) >$@
60 $(MAKE) -C libs/imago -f Makefile
64 $(MAKE) -C libs/anim -f Makefile
68 $(MAKE) -C libs/imago -f Makefile clean
69 $(MAKE) -C libs/anim -f Makefile clean
74 ifeq ($(hostsys), dos)
97 $(TOOLPREFIX)strip $(bin)