X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=Makefile.dj;h=f2414dcb7f27bb8d234eae50a7d4841db4835772;hp=9306382cbd0610f91f163d7d97df2a8028fd7edf;hb=637ca39c29b03bd3a2beb99521753e83c043283f;hpb=ba648ddfc62fc6d3f47294aa8bfc10ea6ca3f479 diff --git a/Makefile.dj b/Makefile.dj index 9306382..f2414dc 100644 --- a/Makefile.dj +++ b/Makefile.dj @@ -4,6 +4,8 @@ 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,18 +13,25 @@ else TOOLPREFIX = i586-pc-msdosdjgpp- endif -inc = -Isrc -Isrc/scr -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 opt = -O3 -ffast-math -fno-strict-aliasing dbg = -g +#prof = -pg warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable +def = -DNO_MUSIC CC = $(TOOLPREFIX)gcc AR = $(TOOLPREFIX)ar -CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(inc) -LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja libs/mikmod/dos/libmikmod.a +CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(prof) $(inc) $(def) +LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja + +ifneq ($(hostsys), dos) +.PHONY: all +all: data $(bin) +endif -$(bin): $(obj) imago anim mikmod - $(CC) -o $@ -Wl,-Map=ld.map $(obj) $(LDFLAGS) +$(bin): $(obj) imago anim + $(CC) -o $@ -Wl,-Map=ld.map $(prof) $(obj) $(LDFLAGS) %.cof: %.asm nasm -f coff -o $@ $< @@ -46,15 +55,10 @@ imago: anim: $(MAKE) -C libs/anim -f Makefile.dj -.PHONY: mikmod -mikmod: - $(MAKE) -C libs/mikmod/dos -f Makefile.dj - .PHONY: cleanlibs cleanlibs: $(MAKE) -C libs/imago -f Makefile.dj clean $(MAKE) -C libs/anim -f Makefile.dj clean - $(MAKE) -C libs/mikmod/dos -f Makefile.dj clean .PHONY: clean .PHONY: cleandep @@ -74,4 +78,8 @@ clean: cleandep: rm -f $(dep) + +.PHONY: data +data: + @tools/procdata endif