]> git.zerfleddert.de Git - micropolis/blame - src/sim/makefile
src/tk/makefile: Micropolis build fixes for recent macOS
[micropolis] / src / sim / makefile
CommitLineData
6a5fa4e0
MG
1XINCLUDE = /usr/include/X11
2TCLHOME = ../tcl
3TKHOME = ../tk
4TCLXHOME = ../tclx
5TCLLIBRARY = /usr/local/lib/tcl
6TKLIBRARY = /usr/local/lib/tk
7
81583a60
RS
8SDLINCLUDE := $(shell /bin/sh sdl_helper cflags)
9SDLLIBS := $(shell /bin/sh sdl_helper libs)
bf4857d3 10
6a5fa4e0
MG
11CC = gcc
12
13OPTFLAGS = -O3
14#OPTFLAGS = -g
15
6f81c61f
MG
16#Possible defines:
17#ORIGINAL_MONSTER_BEHAVIOUR: The monster is able to walk over water and not die
18#NO_AIRCRASH: The Aircrash-Disaster is disables completely
19#CAM: ?
20#NET: ?
21
e9c442bb 22#DEFINES = -DIS_LINUX -DCAM -DNET
6f81c61f 23DEFINES = -DIS_LINUX -DORIGINAL_MONSTER_BEHAVIOUR #-DNO_AIRCRASH
6a5fa4e0 24
6f214ac0 25CFLAGS += $(OPTFLAGS) $(DEFINES) -Wall
6a5fa4e0
MG
26
27#LDFLAGS = -Bstatic
23ec375e 28LDFLAGS=-L/usr/X11/lib -L/usr/X11R6/lib
6a5fa4e0
MG
29
30INSTALL = install -s
31
32INCLUDES = \
33 -Iheaders \
6a5fa4e0
MG
34 -I$(XINCLUDE) \
35 -I$(TCLHOME) \
36 -I$(TCLXHOME)/src \
bf4857d3
DP
37 -I$(TKHOME) \
38 $(SDLINCLUDE)
6a5fa4e0
MG
39
40CPPFLAGS = $(INCLUDES)
41
42LIBS = $(TCLXHOME)/libtk.a \
43 $(TCLXHOME)/libtcl.a \
44 -lm \
45 -lX11 \
46 -lXext \
bf4857d3
DP
47 -lXpm \
48 $(SDLLIBS)
6a5fa4e0
MG
49
50SRCS = \
51 sim.c \
52 s_alloc.c \
53 s_disast.c \
54 s_eval.c \
55 s_gen.c \
56 s_init.c \
57 s_msg.c \
58 s_power.c \
59 s_scan.c \
60 s_sim.c \
61 s_traf.c \
62 s_zone.c \
63 s_fileio.c \
64 g_setup.c \
65 g_ani.c \
66 g_bigmap.c \
67 g_map.c \
68 g_smmaps.c \
69 w_stubs.c \
70 w_sound.c \
71 w_resrc.c \
72 w_keys.c \
73 w_util.c \
74 w_con.c \
75 w_eval.c \
76 w_budget.c \
77 w_graph.c \
78 w_date.c \
79 w_update.c \
80 w_tool.c \
81 w_x.c \
82 w_tk.c \
83 w_sim.c \
84 w_editor.c \
85 w_map.c \
86 w_sprite.c \
87 w_piem.c \
88 w_inter.c \
89 w_cam.c \
90 g_cam.c \
91 w_net.c \
92 rand.c \
93 random.c
94
95HEADERS = \
96 headers/mac.h \
97 headers/macros.h \
98 headers/sim.h \
99 headers/view.h \
100 headers/animtab.h
101
102OBJS = $(SRCS:.c=.o)
103ALLOBJS = $(OBJS)
104
105all: sim
106
107lint:
108 alint $(INCLUDES) $(SRCS) > LINT
109
76cc4ab6 110sim: $(ALLOBJS) $(TCLXHOME)/libtk.a $(TCLXHOME)/libtcl.a
6a5fa4e0
MG
111 $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) $(ALLOBJS) $(LIBS) -o sim
112
113clean:
114 rm -f $(OBJS) \
115 sim a.out core gmon.out *~ *.BAK Headers/*~
116
117etags:
118 etags $(SRCS) $(HEADERS)
Impressum, Datenschutz