fixed all the makefiles to build with the new libanim
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Mon, 10 Dec 2018 17:51:42 +0000 (19:51 +0200)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Mon, 10 Dec 2018 17:51:42 +0000 (19:51 +0200)
Makefile
Makefile.dj
mklibs.bat
src/treestor.c

index 4675768..863858d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,19 +7,19 @@ tinyfps.obj treestor.obj ts_text.obj tunnel.obj util.obj vbe.obj watdpmi.obj
 
 bin = demo.exe
 
-libs = imago.lib
+libs = imago.lib anim.lib
 
 def = -dM_PI=3.141592653589793
 opt = -5 -fp5 -otexan -oh -oi -ei
 dbg = -d1
 
 !ifdef __UNIX__
-incpath = -Isrc -Isrc/dos -Ilibs/imago/src
-libpath = libpath libs/imago
+incpath = -Isrc -Isrc/dos -Ilibs -Ilibs/imago/src -Ilibs/anim/src
+libpath = libpath libs/imago libpath libs/anim
 RM = rm -f
 !else
-incpath = -Isrc -Isrc\dos -Ilibs\imago\src
-libpath = libpath libs\imago
+incpath = -Isrc -Isrc\dos -Ilibs -Ilibs\imago\src -Ilibs\anim\src
+libpath = libpath libs\imago libpath libs\anim
 RM = del
 !endif
 
index 2088717..a687012 100644 (file)
@@ -11,7 +11,7 @@ else
        TOOLPREFIX = i586-pc-msdosdjgpp-
 endif
 
-inc = -Isrc -Isrc/dos -Ilibs/imago/src -Ilibs/mikmod/include
+inc = -Isrc -Isrc/dos -Ilibs -Ilibs/imago/src -Ilibs/anim/src -Ilibs/mikmod/include
 opt = -O3 -ffast-math -fno-strict-aliasing
 dbg = -g
 warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable
@@ -19,9 +19,9 @@ warn = -pedantic -Wall -Wno-unused-function -Wno-unused-variable
 CC = $(TOOLPREFIX)gcc
 AR = $(TOOLPREFIX)ar
 CFLAGS = $(warn) -march=pentium $(dbg) $(opt) $(inc)
-LDFLAGS = libs/imago/imago.dja libs/mikmod/dos/libmikmod.a
+LDFLAGS = libs/imago/imago.dja libs/anim/anim.dja libs/mikmod/dos/libmikmod.a
 
-$(bin): $(obj) imago mikmod
+$(bin): $(obj) imago anim mikmod
        $(CC) -o $@ -Wl,-Map=ld.map $(obj) $(LDFLAGS)
 
 %.cof: %.asm
@@ -39,6 +39,10 @@ $(bin): $(obj) imago mikmod
 imago:
        $(MAKE) -C libs/imago -f Makefile.dj
 
+.PHONY: anim
+anim:
+       $(MAKE) -C libs/anim -f Makefile.dj
+
 .PHONY: mikmod
 mikmod:
        $(MAKE) -C libs/mikmod/dos -f Makefile.dj
@@ -46,6 +50,7 @@ mikmod:
 .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
index 51f4b28..c8f18f5 100644 (file)
@@ -1,5 +1,5 @@
 cd libs\imago\r
 wmake %1 %2 %3 %4 %5 %6 %7 %8\r
-cd ..\oldmik\r
+cd ..\anim\r
 wmake %1 %2 %3 %4 %5 %6 %7 %8\r
 cd ..\..\r
index bad0ea7..43c99ac 100644 (file)
@@ -4,7 +4,7 @@
 #include <errno.h>
 #include "treestor.h"
 
-#ifdef WIN32
+#if defined(__WATCOMC__) || defined(_MSC_VER) || defined(__DJGPP__)
 #include <malloc.h>
 #else
 #include <alloca.h>