]> git.zerfleddert.de Git - micropolis/blobdiff - src/sim/makefile
src/sim/makefile: Micropolis build fixes for recent macOS
[micropolis] / src / sim / makefile
index 3497eb2fb53c7842fc9c3492204c6db43d833915..3f29de75539fbab2e3b1522b9fc84ed8b7a7ee73 100644 (file)
@@ -5,27 +5,37 @@ TCLXHOME = ../tclx
 TCLLIBRARY = /usr/local/lib/tcl
 TKLIBRARY = /usr/local/lib/tk
 
+SDLINCLUDE := $(shell /bin/sh sdl_helper cflags)
+SDLLIBS := $(shell /bin/sh sdl_helper libs)
+
 CC = gcc
 
 OPTFLAGS = -O3
 #OPTFLAGS = -g
 
-#DEFINES = -DIS_LINUX -DIS_INTEL -DCAM -DNET
-DEFINES = -DIS_LINUX -DIS_INTEL
+#Possible defines:
+#ORIGINAL_MONSTER_BEHAVIOUR: The monster is able to walk over water and not die
+#NO_AIRCRASH: The Aircrash-Disaster is disables completely
+#CAM: ?
+#NET: ?
+
+#DEFINES = -DIS_LINUX -DCAM -DNET
+DEFINES = -DIS_LINUX -DORIGINAL_MONSTER_BEHAVIOUR #-DNO_AIRCRASH
 
-CFLAGS = $(OPTFLAGS) $(DEFINES)
+CFLAGS += $(OPTFLAGS) $(DEFINES) -Wall
 
 #LDFLAGS = -Bstatic
+LDFLAGS=-L/usr/X11/lib -L/usr/X11R6/lib
 
 INSTALL = install -s
 
 INCLUDES = \
        -Iheaders \
-       -I$(XPMHOME) \
        -I$(XINCLUDE) \
        -I$(TCLHOME) \
        -I$(TCLXHOME)/src \
-       -I$(TKHOME)
+       -I$(TKHOME) \
+       $(SDLINCLUDE)
 
 CPPFLAGS = $(INCLUDES)
 
@@ -34,7 +44,8 @@ LIBS =        $(TCLXHOME)/libtk.a \
        -lm \
         -lX11 \
         -lXext \
-       -lXpm
+       -lXpm \
+       $(SDLLIBS)
 
 SRCS = \
        sim.c \
@@ -96,7 +107,7 @@ all: sim
 lint:
        alint $(INCLUDES) $(SRCS) > LINT
 
-sim: $(ALLOBJS)
+sim: $(ALLOBJS) $(TCLXHOME)/libtk.a $(TCLXHOME)/libtcl.a
        $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) $(ALLOBJS) $(LIBS) -o sim
 
 clean:
Impressum, Datenschutz