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
21 warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable
26 CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(prof) $(inc) $(def)
27 LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja
29 ifneq ($(hostsys), dos)
34 $(bin): $(obj) imago anim
35 $(CC) -o $@ -Wl,-Map=ld.map $(prof) $(obj) $(LDFLAGS)
40 src/data.odj: src/data.asm $(bindata)
42 ifneq ($(hostsys), dos)
47 $(CC) $(CFLAGS) -o $@ -c $<
51 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.dep=.odj) >$@
55 $(MAKE) -C libs/imago -f Makefile
59 $(MAKE) -C libs/anim -f Makefile
63 $(MAKE) -C libs/imago -f Makefile clean
64 $(MAKE) -C libs/anim -f Makefile clean
69 ifeq ($(hostsys), dos)