# File: Makefile # This is not a very "nice" Makefile, but it usually works. # # Note that you may have to make modifications below according # to your machine, available libraries, compilation options, # and your "visual module" of choice. This Makefile is intended # for use with Unix machines running X11, Curses, Ncurses, or Vt100, # or possibly for "Atari" or "Amiga" computers with "Curses" ports, # see below for more information. # # Note that "main-mac.c", the visual module for the Macintosh, # must be compiled in a special way, see elsewhere. # # Note that "main-win.c", the visual module for Windows, # must be compiled in a special way, see elsewhere. # # Note that "main-ibm.c", "main-emx.c", and "main-286.c", # the visual modules for various types of IBM-PC computers, # must be compiled with special Makefiles, see elsewhere. # # Note that "main-lsl.c", the visual module for ???, # must be compiled with "Makefile.lsl", see elsewhere. # # Note that "main-acn.c", the visual module for Risc Acorn, # must be compiled with "Makefile.acn", see elsewhere. # # Note that "Makefile.w31" and "Makefile.wat" are slight variations # on "Makefile.win" and "Makefile.ibm", respectively, which allow # the use of the "main-win.c" and "main-ibm.c" files, respectively, # with special compilers. # # If you are able to construct "main-xxx.c" and/or "Makefile.xxx" # files for a currently unsupported system, please send them to me # (benh@phial.com) for inclusion in future versions. # # This Makefile comes with "default" dependancies that may be obsolete. # # # The "source" and "object" files. # SRCS = \ archaeologist.c archer.c artifact.c autopick.c avatar.c bard.c \ birth.c bldg.c blood_knight.c blue_mage.c cavalry.c cave.c \ chuukei.c classes.c cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c \ do-spell.c duelist.c dungeon.c effects.c files.c flavor.c floors.c \ force_trainer.c generate.c grid.c hex.c hissatsu.c inet.c init1.c \ init2.c japanese.c load.c magic_eater.c mane.c melee1.c \ melee2.c menu.c mind.c mindcrafter.c mirror.c monk.c monster1.c \ monster2.c mspells1.c mspells2.c mspells3.c mut.c mut_a.c ninja.c \ object1.c object2.c obj_kind.c races.c racial.c readdib.c report.c \ rooms.c rune_knight.c samurai.c save.c scores.c smith.c snipe.c spells.c \ spells1.c spells2.c spells3.c spells_a.c store.c streams.c tables.c \ util.c variable.c variant.c warlock.c wild.c wild_talent.c wizard1.c \ wizard2.c xtra1.c xtra2.c z-form.c z-rand.c z-term.c z-util.c z-virt.c \ main-cap.c main-gcu.c main-x11.c main-xaw.c main.c chuukei.c OBJS = \ archaeologist.o archer.o artifact.o autopick.o avatar.o bard.o \ birth.o bldg.o blood_knight.o blue_mage.o cavalry.o cave.o \ chuukei.o classes.o cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o \ do-spell.o duelist.o dungeon.o effects.o files.o flavor.o floors.o \ force_trainer.o generate.o grid.o hex.o hissatsu.o inet.o init1.o \ init2.o japanese.o load.o magic_eater.o mane.o melee1.o \ melee2.o menu.o mind.o mindcrafter.o mirror.o monk.o monster1.o \ monster2.o mspells1.o mspells2.o mspells3.o mut.o mut_a.o ninja.o \ object1.o object2.o obj_kind.o races.o racial.o readdib.o report.o \ rooms.o rune_knight.o samurai.o save.o scores.o smith.o snipe.o spells.o \ spells1.o spells2.o spells3.o spells_a.o store.o streams.o tables.o \ util.o variable.o variant.o warlock.o wild.o wild_talent.o wizard1.o \ wizard2.o xtra1.o xtra2.o z-form.o z-rand.o z-term.o z-util.o z-virt.o \ main-cap.o main-gcu.o main-x11.o main-xaw.o main.o chuukei.o ## ## Following are some "system" definitions ## ## No changes are needed to compile a version that will run on both ## X11 and Curses, in debugging mode, with maximal warnings, on many ## normal Unix machines of the Sun OS variety (non-solaris). ## ## To use an "alternative" definition, simply "modify" (or "replace") ## the definition below with one that you like. For example, you can ## change the compiler to "cc", or remove the "debugging" options, or ## remove the X11 or Curses support, etc, as desired. ## ## See also "z-config.h" and "h-config.h" for important information. ## ## Some "examples" are given below, they can be used by simply ## removing the FIRST column of "#" signs from the "block" of lines ## you wish to use, and commenting out "standard" block below. ## ## This is not intended to be a "good" Makefile, just a "simple" one. ## # # This is my compiler of choice, it seems to work most everywhere # CC = gcc ################################################################### # # Options for Japanese version (comment out for English version) #JP_OPT= -D"JP" -D"EUC" -DDEFAULT_LOCALE="\"ja_JP.eucJP\"" ################################################################### # # Standard version (see main-x11.c and main-gcu.c) # # This version supports both "X11" and "curses" in a single executable. # # You may have to add various X11 include/library directories to the # "CFLAGS", if your machine places files in a weird location. # # You may be able to remove "-ltermcap" on some machines (ex: Solaris). # # You may have to replace "-lcurses" with "-lncurses" to use the # "new curses" library instead of the "old curses" library, and # you may have to add "-l/usr/include/ncurses" to the "CFLAGS". # # See "main-gcu.c" and "z-config.h" for some optional "curses" defines, # including "USE_GETCH" and "USE_CURS_SET". Note that "z-config.h" will # attempt to "guess" at many of these flags based on your system. # #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" #LIBS = -lX11 -lcurses -ltermcap CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include LIBS = -L/usr/X11R6/lib -lX11 -lncurses ## ## Variation -- Compile for Linux ## #CFLAGS = -Wall -O2 -m486 -pipe -g -D"USE_XAW" -D"USE_GCU" #LIBS = -L/usr/X11R6/lib -lXaw -lXext -lSM -lICE -lXmu -lXt \ # -lX11 -lcurses ## ## Variation -- Only support "main-x11.c" (not "main-gcu.c") ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" #LIBS = -lX11 ## ## Variation -- Only support "main-gcu.c" (not "main-x11.c") ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU" #LIBS = -lcurses -ltermcap ## ## Variation -- Use "main-xaw.c" instead of "main-x11.c" ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_XAW" -D"USE_GCU" #LIBS = -lXaw -lXmu -lXt -lX11 -lcurses -ltermcap ## ## Variation -- Use "main-cap.c" instead of "main-gcu.c" ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_CAP" #LIBS = -lX11 -ltermcap ## ## Variation -- Only work on simple vt100 terminals ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_CAP" -D"USE_HARDCODE" ## ## Variation -- this might work for Linux 1.1.93 using ncurses-1.8.7. ## #CFLAGS = -I/usr/X11R6/include -I/usr/include/ncurses \ # -Wall -O2 -fomit-frame-pointer -m486 \ # -D"USE_X11" -D"USE_GCU" #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap ## ## Variation -- this might work better than the suggestion above ## #CFLAGS = -I/usr/include/ncurses \ # -Wall -O2 -fomit-frame-pointer \ # -D"USE_X11" -D"USE_GCU" \ # -D"USE_TPOSIX" -D"USE_CURS_SET" #LIBS = -lX11 -lncurses #LDFLAGS = -s ## ## Variation -- compile for Solaris ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"SOLARIS" #LIBS = -lX11 -lsocket -lcurses ## ## Variation -- compile for SGI Indigo runnig Irix ## #CFLAGS = -Wall -O2 -fno-strength-reduce -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap -lsun ## ## Variation -- compile for Dec ALPHA OSF/1 v2.0 ## #CC = cc ##CFLAGS = -std -O -g3 -Olimit 4000 -D"USE_X11" -D"USE_GCU" #CFLAGS = -std -g -D"USE_X11" -D"USE_GCU" #LIBS = -lX11 -lcurses -ltermcap -lrpcsvc ## ## Variation -- compile for Interactive Unix (ISC) systems ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"ISC" #LIBS = -lX11 -lcurses -lnsl_s -linet -lcposix ## ## Variation -- Support fat binaries under NEXTSTEP ## #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU" -arch m68k -arch i386 #LIBS = -lcurses -ltermcap ## ## Variation -- compile for FreeBSD ## # (for Japanese ver.) #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\"" #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -lmytinfo -lxpg4 ## ## Variation -- compile for other BSD-like OS ## #CFLAGS = -Wall -O2 -fno-strength-reduce -m486 -pipe -g -D"USE_X11" $(JP_OPT) -D"USE_GCU" -I/usr/X11R6/include -DSPECIAL_BSD #LIBS = -L/usr/X11R6/lib -lX11 -lcurses # # Hack -- "install" as the base target # install: chengband cp chengband .. # chmod u+s ../chengband # # Build the "Angband" program # chengband: $(OBJS) $(CC) $(CFLAGS) -o chengband $(OBJS) $(LDFLAGS) $(LIBS) # # Clean up old junk # clean: -\rm -f *.bak *.o # # Generate dependencies automatically # depend: makedepend -D__MAKEDEPEND__ $(SRCS) # # Hack -- some file dependencies # HDRS = \ h-basic.h \ h-define.h h-type.h h-system.h h-config.h INCS = \ angband.h \ z-config.h defines.h types.h externs.h \ z-term.h z-rand.h z-util.h z-virt.h z-form.h $(HDRS) archaeologist.o: archaeologist.c $(INCS) archer.o: archer.c $(INCS) artifact.o: artifact.c $(INCS) autopick.o: autopick.c $(INCS) avatar.o: avatar.c $(INCS) bard.o: bard.c $(INCS) birth.o: birth.c $(INCS) bldg.o: bldg.c $(INCS) blood_knight.o: blood_knight.c $(INCS) blue_mage.o: blue_mage.c $(INCS) cavalry.o: cavalry.c $(INCS) cave.o: cave.c $(INCS) chuukei.o: chuukei.c $(INCS) classes.o: classes.c $(INCS) cmd1.o: cmd1.c $(INCS) cmd2.o: cmd2.c $(INCS) cmd3.o: cmd3.c $(INCS) cmd4.o: cmd4.c $(INCS) cmd5.o: cmd5.c $(INCS) cmd6.o: cmd6.c $(INCS) do-spell.o: do-spell.c $(INCS) duelist.o: duelist.c $(INCS) dungeon.o: dungeon.c $(INCS) effects.o: effects.c $(INCS) files.o: files.c $(INCS) flavor.o: flavor.c $(INCS) floors.o: floors.c $(INCS) force_trainer.o: force_trainer.c $(INCS) generate.o: generate.c $(INCS) generate.h grid.h rooms.h streams.h grid.o: grid.c $(INCS) grid.h generate.h hex.o: hex.c $(INCS) hissatsu.o: hissatsu.c $(INCS) inet.o: inet.c $(INCS) init1.o: init1.c $(INCS) init2.o: init2.c $(INCS) japanese.o: japanese.c $(INCS) load.o: load.c $(INCS) magic_eater.o: magic_eater.c $(INCS) main-cap.o: main-cap.c $(INCS) main-gcu.o: main-gcu.c $(INCS) main-x11.o: main-x11.c $(INCS) main-xaw.o: main-xaw.c $(INCS) main.o: main.c $(INCS)mane.c $(INCS) melee1.o: melee1.c $(INCS) melee2.o: melee2.c $(INCS) menu.o: menu.c $(INCS) mind.o: mind.c $(INCS) mindcrafter.o: mindcrafter.c $(INCS) mirror.o: mirror.c $(INCS) monk.o: monk.c $(INCS) monster1.o: monster1.c $(INCS) monster2.o: monster2.c $(INCS) mspells1.o: mspells1.c $(INCS) mspells2.o: mspells2.c $(INCS) mspells3.o: mspells3.c $(INCS) mut.o: mut.c $(INCS) mut_a.o: mut_a.c $(INCS) ninja.o: ninja.c $(INCS) object1.o: object1.c $(INCS) object2.o: object2.c $(INCS) obj_kind.o: obj_kind.c $(INCS) races.o: races.c $(INCS) racial.o: racial.c $(INCS) readdib.o: readdib.c $(INCS) report.o: report.c $(INCS) rooms.o: rooms.c $(INCS) grid.h rooms.h generate.h rune_knight.o: rune_knight.c $(INCS) samurai.o: samurai.c $(INCS) save.o: save.c $(INCS) scores.o: scores.c $(INCS) smith.o: smith.c $(INCS) snipe.o: snipe.c $(INCS) spells.o: spells.c $(INCS) spells1.o: spells1.c $(INCS) spells2.o: spells2.c $(INCS) spells3.o: spells3.c $(INCS) spells_a.o: spells_a.c $(INCS) store.o: store.c $(INCS) streams.o: streams.c $(INCS) grid.h generate.h tables.o: tables.c $(INCS) util.o: util.c $(INCS) variable.o: variable.c $(INCS) variant.o: variant.c $(INCS) warlock.o: warlock.c $(INCS) wild.o: wild.c $(INCS) wild_talent.o: wild_talent.c $(INCS) wizard1.o: wizard1.c $(INCS) wizard2.o: wizard2.c $(INCS) xtra1.o: xtra1.c $(INCS) xtra2.o: xtra2.c $(INCS) z-form.o: z-form.c $(HDRS) z-form.h z-util.h z-virt.h z-rand.o: z-rand.c $(HDRS) z-rand.h z-term.o: z-term.c $(HDRS) z-term.h z-virt.h z-util.o: z-util.c $(HDRS) z-util.h z-virt.o: z-virt.c $(HDRS) z-virt.h z-util.h