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 floors.c \
52 cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \
53 do-spell.c 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 snipe.c hex.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 \
61 main-cap.c main-gcu.c main-x11.c main-xaw.c main.c chuukei.c
64 z-util.o z-virt.o z-form.o z-rand.o z-term.o \
65 variable.o tables.o util.o cave.o \
66 object1.o object2.o monster1.o monster2.o \
67 xtra1.o xtra2.o spells1.o spells2.o \
68 melee1.o melee2.o save.o files.o floors.o \
69 cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \
70 do-spell.o store.o birth.o load.o \
71 wizard1.o wizard2.o grid.o streams.o rooms.o \
72 generate.o dungeon.o init1.o init2.o \
73 effects.o racial.o inet.o report.o snipe.o hex.o \
74 artifact.o autopick.o mutation.o flavor.o spells3.o \
75 mspells1.o mspells2.o scores.o mind.o mane.o hissatsu.o \
76 bldg.o obj_kind.o wild.o avatar.o japanese.o mspells3.o \
78 main-cap.o main-gcu.o main-x11.o main-xaw.o main.o chuukei.o
83 ## Following are some "system" definitions
85 ## No changes are needed to compile a version that will run on both
86 ## X11 and Curses, in debugging mode, with maximal warnings, on many
87 ## normal Unix machines of the Sun OS variety (non-solaris).
89 ## To use an "alternative" definition, simply "modify" (or "replace")
90 ## the definition below with one that you like. For example, you can
91 ## change the compiler to "cc", or remove the "debugging" options, or
92 ## remove the X11 or Curses support, etc, as desired.
94 ## See also "h-config.h" for important information.
96 ## Some "examples" are given below, they can be used by simply
97 ## removing the FIRST column of "#" signs from the "block" of lines
98 ## you wish to use, and commenting out "standard" block below.
100 ## This is not intended to be a "good" Makefile, just a "simple" one.
105 # This is my compiler of choice, it seems to work most everywhere
110 ###################################################################
112 # Options for Japanese version (comment out for English version)
114 JP_OPT= -D"JP" -D"EUC" -DDEFAULT_LOCALE="\"ja_JP.eucJP\""
116 ###################################################################
120 # Standard version (see main-x11.c and main-gcu.c)
122 # This version supports both "X11" and "curses" in a single executable.
124 # You may have to add various X11 include/library directories to the
125 # "CFLAGS", if your machine places files in a weird location.
127 # You may be able to remove "-ltermcap" on some machines (ex: Solaris).
129 # You may have to replace "-lcurses" with "-lncurses" to use the
130 # "new curses" library instead of the "old curses" library, and
131 # you may have to add "-l/usr/include/ncurses" to the "CFLAGS".
133 # See "main-gcu.c" for some optional "curses" defines,
134 # including "USE_GETCH" and "USE_CURS_SET". Note that "h-config.h" will
135 # attempt to "guess" at many of these flags based on your system.
137 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU"
138 #LIBS = -lX11 -lcurses -ltermcap
140 CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include
141 LIBS = -L/usr/X11R6/lib -lX11 -lncurses
145 ## Variation -- Compile for Linux
147 #CFLAGS = -Wall -O2 -m486 -pipe -g -D"USE_XAW" -D"USE_GCU"
148 #LIBS = -L/usr/X11R6/lib -lXaw -lXext -lSM -lICE -lXmu -lXt \
153 ## Variation -- Only support "main-x11.c" (not "main-gcu.c")
155 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11"
160 ## Variation -- Only support "main-gcu.c" (not "main-x11.c")
162 #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU"
163 #LIBS = -lcurses -ltermcap
167 ## Variation -- Use "main-xaw.c" instead of "main-x11.c"
169 #CFLAGS = -Wall -O1 -pipe -g -D"USE_XAW" -D"USE_GCU"
170 #LIBS = -lXaw -lXmu -lXt -lX11 -lcurses -ltermcap
174 ## Variation -- Use "main-cap.c" instead of "main-gcu.c"
176 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_CAP"
177 #LIBS = -lX11 -ltermcap
181 ## Variation -- Only work on simple vt100 terminals
183 #CFLAGS = -Wall -O1 -pipe -g -D"USE_CAP" -D"USE_HARDCODE"
187 ## Variation -- this might work for Linux 1.1.93 using ncurses-1.8.7.
189 #CFLAGS = -I/usr/X11R6/include -I/usr/include/ncurses \
190 # -Wall -O2 -fomit-frame-pointer -m486 \
191 # -D"USE_X11" -D"USE_GCU"
192 #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap
195 ## Variation -- this might work better than the suggestion above
197 #CFLAGS = -I/usr/include/ncurses \
198 # -Wall -O2 -fomit-frame-pointer \
199 # -D"USE_X11" -D"USE_GCU" \
200 # -D"USE_TPOSIX" -D"USE_CURS_SET"
201 #LIBS = -lX11 -lncurses
206 ## Variation -- compile for Solaris
208 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"SOLARIS"
209 #LIBS = -lX11 -lsocket -lcurses
213 ## Variation -- compile for Dec ALPHA OSF/1 v2.0
216 ##CFLAGS = -std -O -g3 -Olimit 4000 -D"USE_X11" -D"USE_GCU"
217 #CFLAGS = -std -g -D"USE_X11" -D"USE_GCU"
218 #LIBS = -lX11 -lcurses -ltermcap -lrpcsvc
222 ## Variation -- compile for Interactive Unix (ISC) systems
224 #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"ISC"
225 #LIBS = -lX11 -lcurses -lnsl_s -linet -lcposix
229 ## Variation -- Support fat binaries under NEXTSTEP
231 #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU" -arch m68k -arch i386
232 #LIBS = -lcurses -ltermcap
236 ## Variation -- compile for FreeBSD
238 # (for Japanese ver.)
239 #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\""
240 #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -lmytinfo -lxpg4
243 ## Variation -- compile for other BSD-like OS
245 #CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include -DSPECIAL_BSD
246 #LIBS = -L/usr/X11R6/lib -lX11 -lcurses
252 # Hack -- "install" as the base target
257 # chmod u+s ../hengband
261 # Build the "Angband" program
265 $(CC) $(CFLAGS) -o hengband $(OBJS) $(LDFLAGS) $(LIBS)
277 # Generate dependencies automatically
281 makedepend -D__MAKEDEPEND__ $(SRCS)
285 # Hack -- some file dependencies
290 h-define.h h-type.h h-system.h h-config.h
294 defines.h types.h externs.h \
295 z-term.h z-rand.h z-util.h z-virt.h z-form.h $(HDRS)
298 artifact.o: artifact.c $(INCS)
299 avatar.o: avatar.c $(INCS)
300 bldg.o: bldg.c $(INCS)
301 birth.o: birth.c $(INCS)
302 cave.o: cave.c $(INCS)
303 chuukei.o: chuukei.c $(INCS)
304 cmd1.o: cmd1.c $(INCS)
305 cmd2.o: cmd2.c $(INCS)
306 cmd3.o: cmd3.c $(INCS)
307 cmd4.o: cmd4.c $(INCS)
308 cmd5.o: cmd5.c $(INCS)
309 cmd6.o: cmd6.c $(INCS)
310 do-spell.o: do-spell.c $(INCS)
311 dungeon.o: dungeon.c $(INCS)
312 effects.o: effects.c $(INCS)
313 files.o: files.c $(INCS)
314 flavor.o: flavor.c $(INCS)
315 generate.o: generate.c $(INCS) generate.h grid.h rooms.h streams.h
316 grid.o: grid.c $(INCS) grid.h generate.h
317 rooms.o: rooms.c $(INCS) grid.h rooms.h generate.h
318 streams.o: streams.c $(INCS) grid.h generate.h
319 hissatsu.o: hissatsu.c $(INCS)
321 inet.o: inet.c $(INCS)
322 init1.o: init1.c $(INCS)
323 init2.o: init2.c $(INCS)
324 japanese.o: japanese.c $(INCS)
325 load.o: load.c $(INCS)
326 main-cap.o: main-cap.c $(INCS)
327 main-gcu.o: main-gcu.c $(INCS)
328 main-x11.o: main-x11.c $(INCS)
329 main-xaw.o: main-xaw.c $(INCS)
330 main.o: main.c $(INCS)
331 mane.o: mane.c $(INCS)
332 melee1.o: melee1.c $(INCS)
333 melee2.o: melee2.c $(INCS)
334 mind.o: mind.c $(INCS) mindtips.h
335 monster1.o: monster1.c $(INCS)
336 monster2.o: monster2.c $(INCS)
337 mspells1.o: mspells1.c $(INCS)
338 mspells2.o: mspells2.c $(INCS)
339 mspells3.o: mspells3.c $(INCS)
340 mutation.o: mutation.c $(INCS)
341 object1.o: object1.c $(INCS)
342 object2.o: object2.c $(INCS) kajitips.h
343 obj_kind.o: obj_kind.c $(INCS)
344 racial.o: racial.c $(INCS)
345 report.o: report.c $(INCS)
346 scores.o: scores.c $(INCS)
347 save.o: save.c $(INCS)
348 snipe.o: snipe.c $(INCS)
349 spells1.o: spells1.c $(INCS)
350 spells2.o: spells2.c $(INCS)
351 spells3.o: spells3.c $(INCS)
352 store.o: store.c $(INCS)
353 tables.o: tables.c $(INCS)
354 util.o: util.c $(INCS)
355 variable.o: variable.c $(INCS)
356 wild.o: wild.c $(INCS)
357 wizard1.o: wizard1.c $(INCS)
358 wizard2.o: wizard2.c $(INCS)
359 xtra1.o: xtra1.c $(INCS)
360 xtra2.o: xtra2.c $(INCS)
361 z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h
362 z-rand.o: z-rand.c $(HDRS) z-rand.h
363 z-term.o: z-term.c $(HDRS) z-term.h z-virt.h
364 z-util.o: z-util.c $(HDRS) z-util.h
365 z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h