3 # This is not a very "nice" Makefile, but it usually works.
6 # Note that you may have to make modifications below according
7 # to your machine, available libraries, compilation options,
8 # and your "visual module" of choice. This Makefile is intended
9 # for use with Unix machines running X11, Curses, Ncurses, or Vt100,
10 # or possibly for "Atari" or "Amiga" computers with "Curses" ports,
11 # see below for more information.
13 # Note that "main-mac.c", the visual module for the Macintosh,
14 # must be compiled in a special way, see elsewhere.
16 # Note that "main-win.c", the visual module for Windows,
17 # must be compiled in a special way, see elsewhere.
19 # Note that "main-ibm.c", "main-emx.c", and "main-286.c",
20 # the visual modules for various types of IBM-PC computers,
21 # must be compiled with special Makefiles, see elsewhere.
23 # Note that "main-lsl.c", the visual module for ???,
24 # must be compiled with "Makefile.lsl", see elsewhere.
26 # Note that "main-acn.c", the visual module for Risc Acorn,
27 # must be compiled with "Makefile.acn", see elsewhere.
29 # Note that "Makefile.w31" and "Makefile.wat" are slight variations
30 # on "Makefile.win" and "Makefile.ibm", respectively, which allow
31 # the use of the "main-win.c" and "main-ibm.c" files, respectively,
32 # with special compilers.
34 # If you are able to construct "main-xxx.c" and/or "Makefile.xxx"
35 # files for a currently unsupported system, please send them to me
36 # (benh@phial.com) for inclusion in future versions.
38 # This Makefile comes with "default" dependancies that may be obsolete.
43 # The "source" and "object" files.
47 z-util.c z-virt.c z-form.c z-rand.c z-term.c \
48 variable.c tables.c util.c cave.c \
49 object1.c object2.c monster1.c monster2.c \
50 xtra1.c xtra2.c spells1.c spells2.c \
51 melee1.c melee2.c save.c files.c \
52 cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \
53 store.c birth.c load.c \
54 wizard1.c wizard2.c grid.c streams.c rooms.c \
55 generate.c dungeon.c init1.c init2.c \
56 effects.c racial.c inet.c report.c\
57 artifact.c autopick.c mutation.c flavor.c spells3.c \
58 mspells1.c mspells2.c scores.c mind.c mane.c hissatsu.c \
59 bldg.c obj_kind.c wild.c avatar.c japanese.c mspells3.c \
60 main-cap.c main-gcu.c main-x11.c main-xaw.c main.c chuukei.c
63 z-util.o z-virt.o z-form.o z-rand.o z-term.o \
64 variable.o tables.o util.o cave.o \
65 object1.o object2.o monster1.o monster2.o \
66 xtra1.o xtra2.o spells1.o spells2.o \
67 melee1.o melee2.o save.o files.o \
68 cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \
69 store.o birth.o load.o \
70 wizard1.o wizard2.o grid.o streams.o rooms.o \
71 generate.o dungeon.o init1.o init2.o \
72 effects.o racial.o inet.o report.o \
73 artifact.o autopick.o mutation.o flavor.o spells3.o \
74 mspells1.o mspells2.o scores.o mind.o mane.o hissatsu.o \
75 bldg.o obj_kind.o wild.o avatar.o japanese.o mspells3.o \
76 main-cap.o main-gcu.o main-x11.o main-xaw.o main.o chuukei.o
81 ## Following are some "system" definitions
83 ## No changes are needed to compile a version that will run on both
84 ## X11 and Curses, in debugging mode, with maximal warnings, on many
85 ## normal Unix machines of the Sun OS variety (non-solaris).
87 ## To use an "alternative" definition, simply "modify" (or "replace")
88 ## the definition below with one that you like. For example, you can
89 ## change the compiler to "cc", or remove the "debugging" options, or
90 ## remove the X11 or Curses support, etc, as desired.
92 ## See also "z-config.h" and "h-config.h" for important information.
94 ## Some "examples" are given below, they can be used by simply
95 ## removing the FIRST column of "#" signs from the "block" of lines
96 ## you wish to use, and commenting out "standard" block below.
98 ## This is not intended to be a "good" Makefile, just a "simple" one.
103 # This is my compiler of choice, it seems to work most everywhere
108 ###################################################################
110 # Options for Japanese version (comment out for English version)
112 JP_OPT= -D"JP" -D"EUC" -DDEFAULT_LOCALE="\"ja_JP.eucJP\""
114 ###################################################################
118 # Standard version (see main-x11.c and main-gcu.c)
120 # This version supports both "X11" and "curses" in a single executable.
122 # You may have to add various X11 include/library directories to the
123 # "CFLAGS", if your machine places files in a weird location.
125 # You may be able to remove "-ltermcap" on some machines (ex: Solaris).
127 # You may have to replace "-lcurses" with "-lncurses" to use the
128 # "new curses" library instead of the "old curses" library, and
129 # you may have to add "-l/usr/include/ncurses" to the "CFLAGS".
131 # See "main-gcu.c" and "z-config.h" for some optional "curses" defines,
132 # including "USE_GETCH" and "USE_CURS_SET". Note that "z-config.h" will
133 # attempt to "guess" at many of these flags based on your system.
135 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU"
136 #LIBS = -lX11 -lcurses -ltermcap
138 CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include
139 LIBS = -L/usr/X11R6/lib -lX11 -lncurses
143 ## Variation -- Compile for Linux
145 #CFLAGS = -Wall -O2 -m486 -pipe -g -D"USE_XAW" -D"USE_GCU"
146 #LIBS = -L/usr/X11R6/lib -lXaw -lXext -lSM -lICE -lXmu -lXt \
151 ## Variation -- Only support "main-x11.c" (not "main-gcu.c")
153 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11"
158 ## Variation -- Only support "main-gcu.c" (not "main-x11.c")
160 #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU"
161 #LIBS = -lcurses -ltermcap
165 ## Variation -- Use "main-xaw.c" instead of "main-x11.c"
167 #CFLAGS = -Wall -O1 -pipe -g -D"USE_XAW" -D"USE_GCU"
168 #LIBS = -lXaw -lXmu -lXt -lX11 -lcurses -ltermcap
172 ## Variation -- Use "main-cap.c" instead of "main-gcu.c"
174 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_CAP"
175 #LIBS = -lX11 -ltermcap
179 ## Variation -- Only work on simple vt100 terminals
181 #CFLAGS = -Wall -O1 -pipe -g -D"USE_CAP" -D"USE_HARDCODE"
185 ## Variation -- this might work for Linux 1.1.93 using ncurses-1.8.7.
187 #CFLAGS = -I/usr/X11R6/include -I/usr/include/ncurses \
188 # -Wall -O2 -fomit-frame-pointer -m486 \
189 # -D"USE_X11" -D"USE_GCU"
190 #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap
193 ## Variation -- this might work better than the suggestion above
195 #CFLAGS = -I/usr/include/ncurses \
196 # -Wall -O2 -fomit-frame-pointer \
197 # -D"USE_X11" -D"USE_GCU" \
198 # -D"USE_TPOSIX" -D"USE_CURS_SET"
199 #LIBS = -lX11 -lncurses
204 ## Variation -- compile for Solaris
206 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"SOLARIS"
207 #LIBS = -lX11 -lsocket -lcurses
211 ## Variation -- compile for SGI Indigo runnig Irix
213 #CFLAGS = -Wall -O2 -fno-strength-reduce -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include
214 #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap -lsun
219 ## Variation -- compile for Dec ALPHA OSF/1 v2.0
222 ##CFLAGS = -std -O -g3 -Olimit 4000 -D"USE_X11" -D"USE_GCU"
223 #CFLAGS = -std -g -D"USE_X11" -D"USE_GCU"
224 #LIBS = -lX11 -lcurses -ltermcap -lrpcsvc
228 ## Variation -- compile for Interactive Unix (ISC) systems
230 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"ISC"
231 #LIBS = -lX11 -lcurses -lnsl_s -linet -lcposix
235 ## Variation -- Support fat binaries under NEXTSTEP
237 #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU" -arch m68k -arch i386
238 #LIBS = -lcurses -ltermcap
242 ## Variation -- compile for FreeBSD
244 # (for Japanese ver.)
245 #CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" -D"JP" -D"EUC" -D"USE_GCU" -I/usr/X11R6/include -DUSE_NCURSES -DDEFAULT_LOCALE="\"ja_JP.EUC\""
246 #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -lmytinfo -lxpg4
249 ## Variation -- compile for other BSD-like OS
251 #CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include -DSPECIAL_BSD
252 #LIBS = -L/usr/X11R6/lib -lX11 -lcurses
258 # Hack -- "install" as the base target
263 # chmod u+s ../hengband
267 # Build the "Angband" program
271 $(CC) $(CFLAGS) -o hengband $(OBJS) $(LDFLAGS) $(LIBS)
283 # Generate dependencies automatically
287 makedepend -D__MAKEDEPEND__ $(SRCS)
291 # Hack -- some file dependencies
296 h-define.h h-type.h h-system.h h-config.h
300 z-config.h defines.h types.h externs.h \
301 z-term.h z-rand.h z-util.h z-virt.h z-form.h $(HDRS)
304 artifact.o: artifact.c $(INCS)
305 avatar.o: avatar.c $(INCS)
306 bldg.o: bldg.c $(INCS)
307 birth.o: birth.c $(INCS)
308 cave.o: cave.c $(INCS)
309 chuukei.o: chuukei.c $(INCS)
310 cmd1.o: cmd1.c $(INCS)
311 cmd2.o: cmd2.c $(INCS)
312 cmd3.o: cmd3.c $(INCS)
313 cmd4.o: cmd4.c $(INCS)
314 cmd5.o: cmd5.c $(INCS) spellstips.h
315 cmd6.o: cmd6.c $(INCS)
316 dungeon.o: dungeon.c $(INCS)
317 effects.o: effects.c $(INCS)
318 files.o: files.c $(INCS)
319 flavor.o: flavor.c $(INCS)
320 generate.o: generate.c $(INCS) generate.h grid.h rooms.h streams.h
321 grid.o: grid.c $(INCS) grid.h generate.h
322 rooms.o: rooms.c $(INCS) grid.h rooms.h generate.h
323 streams.o: streams.c $(INCS) grid.h generate.h
324 hissatsu.o: hissatsu.c $(INCS)
325 inet.o: inet.c $(INCS)
326 init1.o: init1.c $(INCS)
327 init2.o: init2.c $(INCS)
328 japanese.o: japanese.c $(INCS)
329 load.o: load.c $(INCS)
330 main-cap.o: main-cap.c $(INCS)
331 main-gcu.o: main-gcu.c $(INCS)
332 main-x11.o: main-x11.c $(INCS)
333 main-xaw.o: main-xaw.c $(INCS)
334 main.o: main.c $(INCS)
335 mane.o: mane.c $(INCS)
336 melee1.o: melee1.c $(INCS)
337 melee2.o: melee2.c $(INCS)
338 mind.o: mind.c $(INCS) mindtips.h
339 monster1.o: monster1.c $(INCS)
340 monster2.o: monster2.c $(INCS)
341 mspells1.o: mspells1.c $(INCS)
342 mspells2.o: mspells2.c $(INCS)
343 mspells3.o: mspells3.c $(INCS)
344 mutation.o: mutation.c $(INCS)
345 object1.o: object1.c $(INCS)
346 object2.o: object2.c $(INCS) kajitips.h
347 obj_kind.o: obj_kind.c $(INCS)
348 racial.o: racial.c $(INCS)
349 report.o: report.c $(INCS)
350 scores.o: scores.c $(INCS)
351 save.o: save.c $(INCS)
352 spells1.o: spells1.c $(INCS)
353 spells2.o: spells2.c $(INCS)
354 spells3.o: spells3.c $(INCS)
355 store.o: store.c $(INCS)
356 tables.o: tables.c $(INCS)
357 util.o: util.c $(INCS)
358 variable.o: variable.c $(INCS)
359 wild.o: wild.c $(INCS)
360 wizard1.o: wizard1.c $(INCS)
361 wizard2.o: wizard2.c $(INCS)
362 xtra1.o: xtra1.c $(INCS)
363 xtra2.o: xtra2.c $(INCS)
364 z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h
365 z-rand.o: z-rand.c $(HDRS) z-rand.h
366 z-term.o: z-term.c $(HDRS) z-term.h z-virt.h
367 z-util.o: z-util.c $(HDRS) z-util.h
368 z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h