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_MUSIC
33 CFLAGS = -march=pentium $(warn) -MMD $(dbg) $(opt) $(prof) $(inc) $(def)
34 LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja libs/midas/libmidas.a
36 ifneq ($(hostsys), dos)
41 $(bin): $(obj) imago anim
42 $(CC) -o $@ -Wl,-Map=ld.map $(prof) $(obj) $(LDFLAGS)
47 src/data.odj: src/data.asm $(bindata)
52 $(CC) $(CFLAGS) -o $@ -c $<
56 $(MAKE) -C libs/imago -f Makefile.dj
60 $(MAKE) -C libs/anim -f Makefile.dj
64 $(MAKE) -C libs/imago clean -f Makefile.dj
65 $(MAKE) -C libs/anim clean -f Makefile.dj
70 ifeq ($(hostsys), dos)
95 $(TOOLPREFIX)strip $(bin)