]> git.zerfleddert.de Git - micropolis/blob - src/sim/makefile
src/tclx/src/tclxgdat.y: Micropolis build fixes for recent macOS
[micropolis] / src / sim / makefile
1 XINCLUDE = /usr/include/X11
2 TCLHOME = ../tcl
3 TKHOME = ../tk
4 TCLXHOME = ../tclx
5 TCLLIBRARY = /usr/local/lib/tcl
6 TKLIBRARY = /usr/local/lib/tk
7
8 SDLINCLUDE := $(shell /bin/sh sdl_helper cflags)
9 SDLLIBS := $(shell /bin/sh sdl_helper libs)
10
11 CC = gcc
12
13 OPTFLAGS = -O3
14 #OPTFLAGS = -g
15
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
22 #DEFINES = -DIS_LINUX -DCAM -DNET
23 DEFINES = -DIS_LINUX -DORIGINAL_MONSTER_BEHAVIOUR #-DNO_AIRCRASH
24
25 CFLAGS += $(OPTFLAGS) $(DEFINES) -Wall
26
27 #LDFLAGS = -Bstatic
28 LDFLAGS=-L/usr/X11/lib -L/usr/X11R6/lib
29
30 INSTALL = install -s
31
32 INCLUDES = \
33 -Iheaders \
34 -I$(XINCLUDE) \
35 -I$(TCLHOME) \
36 -I$(TCLXHOME)/src \
37 -I$(TKHOME) \
38 $(SDLINCLUDE)
39
40 CPPFLAGS = $(INCLUDES)
41
42 LIBS = $(TCLXHOME)/libtk.a \
43 $(TCLXHOME)/libtcl.a \
44 -lm \
45 -lX11 \
46 -lXext \
47 -lXpm \
48 $(SDLLIBS)
49
50 SRCS = \
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
95 HEADERS = \
96 headers/mac.h \
97 headers/macros.h \
98 headers/sim.h \
99 headers/view.h \
100 headers/animtab.h
101
102 OBJS = $(SRCS:.c=.o)
103 ALLOBJS = $(OBJS)
104
105 all: sim
106
107 lint:
108 alint $(INCLUDES) $(SRCS) > LINT
109
110 sim: $(ALLOBJS) $(TCLXHOME)/libtk.a $(TCLXHOME)/libtcl.a
111 $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) $(ALLOBJS) $(LIBS) -o sim
112
113 clean:
114 rm -f $(OBJS) \
115 sim a.out core gmon.out *~ *.BAK Headers/*~
116
117 etags:
118 etags $(SRCS) $(HEADERS)
Impressum, Datenschutz