1 src = $(wildcard src/*.c) $(wildcard src/3dgfx/*.c) $(wildcard src/scr/*.c) \
2 $(wildcard src/dos/*.c)
3 asmsrc = $(wildcard src/*.asm) $(wildcard src/scr/*.asm) $(wildcard src/dos/*.asm)
4 obj = $(src:.c=.odj) $(asmsrc:.asm=.odj)
8 asmsrc += cspr/dbgfont.asm cspr/confont.asm
9 bindata = data/loading.img
11 ifeq ($(findstring COMMAND.COM, $(SHELL)), COMMAND.COM)
15 TOOLPREFIX = i586-pc-msdosdjgpp-
18 inc = -Isrc -Isrc/3dgfx -Isrc/scr -Isrc/dos -Ilibs \
19 -Ilibs/imago/src -Ilibs/anim/src -Ilibs/midas
20 opt = -O3 -ffast-math -fno-strict-aliasing
21 warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable
25 def = -DNDEBUG -DNO_SOUND
33 CFLAGS = -march=pentium $(warn) -MMD $(dbg) $(opt) $(prof) $(inc) $(def)
34 LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja
35 #libs/midas/libmidas.a
37 ifneq ($(hostsys), dos)
42 $(bin): $(obj) imago anim
43 $(CC) -o $@ -Wl,-Map=ld.map $(prof) $(obj) $(LDFLAGS)
48 src/data.odj: src/data.asm $(bindata)
53 $(CC) $(CFLAGS) -o $@ -c $<
57 $(MAKE) -C libs/imago -f Makefile.dj
61 $(MAKE) -C libs/anim -f Makefile.dj
65 $(MAKE) -C libs/imago clean -f Makefile.dj
66 $(MAKE) -C libs/anim clean -f Makefile.dj
71 ifeq ($(hostsys), dos)
96 $(TOOLPREFIX)strip $(bin)