home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 7 Games / 07-Games.zip / mangc036.zip / src / Makefile.os2 next >
Makefile  |  1997-10-01  |  9KB  |  314 lines

  1. # File: Makefile
  2.  
  3. # This is not a very "nice" Makefile, but it usually works.
  4.  
  5. #
  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.
  12. #
  13. # Note that "main-mac.c", the visual module for the Macintosh,
  14. # must be compiled in a special way, see elsewhere.
  15. #
  16. # Note that "main-win.c", the visual module for Windows,
  17. # must be compiled in a special way, see elsewhere.
  18. #
  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.
  22. #
  23. # Note that "main-lsl.c", the visual module for ???,
  24. # must be compiled with "Makefile.lsl", see elsewhere.
  25. #
  26. # Note that "main-acn.c", the visual module for Risc Acorn,
  27. # must be compiled with "Makefile.acn", see elsewhere.
  28. #
  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.
  33. #
  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@voicenet.com) for inclusion in future versions.
  37. #
  38. # This Makefile comes with "default" dependancies that may be obsolete.
  39. #
  40. # You may want to run "make depend" if you are planning on changing
  41. # anything.
  42. #
  43.  
  44.  
  45. #
  46. # The "source" and "object" files.
  47. #
  48.  
  49. SERV_SRCS = \
  50.   common/z-util.c common/z-virt.c common/z-form.c common/z-rand.c \
  51.   common/net-unix.c common/sockbuf.c server/variable.c \
  52.   server/party.c server/tables.c server/util.c server/cave.c \
  53.   server/object1.c server/object2.c server/monster1.c server/monster2.c \
  54.   server/xtra1.c server/xtra2.c server/spells1.c server/spells2.c \
  55.   server/melee1.c server/melee2.c server/save.c server/files.c \
  56.   server/cmd1.c server/cmd2.c server/cmd3.c server/cmd4.c server/cmd5.c \
  57.   server/cmd6.c server/store.c server/birth.c server/load2.c \
  58.   server/sched.c server/generate.c server/dungeon.c server/init1.c \
  59.   server/init2.c server/netserver.c server/printout.c server/main.c
  60.  
  61. SERV_OBJS = \
  62.   common/z-util.o common/z-virt.o common/z-form.o common/z-rand.o \
  63.   common/net-unix.o common/sockbuf.o server/variable.o \
  64.   server/party.o server/tables.o server/util.o server/cave.o \
  65.   server/object1.o server/object2.o server/monster1.o server/monster2.o \
  66.   server/xtra1.o server/xtra2.o server/spells1.o server/spells2.o \
  67.   server/melee1.o server/melee2.o server/save.o server/files.o \
  68.   server/cmd1.o server/cmd2.o server/cmd3.o server/cmd4.o server/cmd5.o \
  69.   server/cmd6.o server/store.o server/birth.o server/load2.o \
  70.   server/sched.o server/generate.o server/dungeon.o server/init1.o \
  71.   server/init2.o server/netserver.o server/printout.o server/main.o
  72.  
  73.  
  74. CLI_SRCS = \
  75.   common/z-util.c common/z-virt.c common/z-form.c common/z-rand.c \
  76.   common/net-unix.c common/sockbuf.c common/net-ibm.c \
  77.   client/z-term.c client/c-util.c client/c-cmd.c client/c-inven.c \
  78.   client/c-files.c client/c-tables.c client/c-store.c \
  79.   client/variable.c client/main-emx.c client/netclient.c \
  80.   client/c-xtra1.c client/c-xtra2.c client/c-spell.c client/client.c
  81.  
  82. CLI_OBJS = \
  83.   common/z-util.o common/z-virt.o common/z-form.o common/z-rand.o \
  84.   common/net-unix.o common/sockbuf.o common/net-ibm.o \
  85.   client/z-term.o client/c-util.o client/c-cmd.o client/c-inven.o \
  86.   client/c-files.o client/c-tables.o client/c-store.o \
  87.   client/variable.o client/main-emx.o client/netclient.o \
  88.   client/c-xtra1.o client/c-xtra2.o client/c-spell.o client/client.o
  89.  
  90.  
  91. ##
  92. ## Following are some "system" definitions
  93. ##
  94. ## No changes are needed to compile a version that will run on both
  95. ## X11 and Curses, in debugging mode, with maximal warnings, on many
  96. ## normal Unix machines of the Sun OS variety (non-solaris).
  97. ##
  98. ## To use an "alternative" definition, simply "modify" (or "replace")
  99. ## the definition below with one that you like.  For example, you can
  100. ## change the compiler to "cc", or remove the "debugging" options, or
  101. ## remove the X11 or Curses support, etc, as desired.
  102. ##
  103. ## See also "config.h" and "h-config.h" for important information.
  104. ##
  105. ## Some "examples" are given below, they can be used by simply
  106. ## removing the FIRST column of "#" signs from the "block" of lines
  107. ## you wish to use, and commenting out "standard" block below.
  108. ##
  109. ## This is not intended to be a "good" Makefile, just a "simple" one.
  110. ##
  111.  
  112.  
  113. #
  114. # This is my compiler of choice, it seems to work most everywhere
  115. #
  116. CC = gcc
  117.  
  118.  
  119. #
  120. # Standard version (see main-x11.c and main-gcu.c)
  121. #
  122. # This version supports both "X11" and "curses" in a single executable.
  123. #
  124. # You may have to add various X11 include/library directories to the
  125. # "CFLAGS", if your machine places files in a weird location.
  126. #
  127. # You may be able to remove "-ltermcap" on some machines (ex: Solaris).
  128. #
  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".
  132. #
  133. # See "main-gcu.c" and "config.h" for some optional "curses" defines,
  134. # including "USE_GETCH" and "USE_CURS_SET".  Note that "config.h" will
  135. # attempt to "guess" at many of these flags based on your system.
  136. #
  137. #CFLAGS = -Wall -g -pipe -D"USE_X11" -D"USE_GCU" -I/usr/include/ncurses
  138. #LIBS = -L/usr/X11R6/lib -lX11 -lncurses -ltermcap
  139.  
  140.  
  141. ##
  142. ## Variation -- Only support "main-x11.c" (not "main-gcu.c")
  143. ##
  144. #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11"
  145. #LIBS = -lX11
  146.  
  147.  
  148. ##
  149. ## Variation -- Only support "main-gcu.c" (not "main-x11.c")
  150. ##
  151. #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU"
  152. #LIBS = -lcurses -ltermcap
  153.  
  154.  
  155. ## Added by thaler, 6/28/97
  156. ## Variation -- Only support "main-gcu.c" (not "main-x11.c") on localhost
  157. ##
  158. ## NOTE -- Using this variation requires that the server and client run
  159. ## on the same machine!  Also define META_ADDRESS to be an empty string
  160. ## in config.h.  --Keldon
  161. ##
  162. #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU" -DUNIX_SOCKETS
  163. #LIBS = -lncurses -ltermcap
  164.  
  165.  
  166. ##
  167. ## Variation -- Use "main-xaw.c" instead of "main-x11.c"
  168. ##
  169. #CFLAGS = -Wall -O1 -pipe -g -D"USE_XAW" -D"USE_GCU"
  170. #LIBS = -lXaw -lXmu -lXt -lX11 -lcurses -ltermcap
  171.  
  172.  
  173. ##
  174. ## Variation -- Use "main-cap.c" instead of "main-gcu.c"
  175. ##
  176. #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_CAP"
  177. #LIBS = -lX11 -ltermcap
  178.  
  179.  
  180. ##
  181. ## Variation -- Only work on simple vt100 terminals
  182. ##
  183. #CFLAGS = -Wall -O1 -pipe -g -D"USE_CAP" -D"USE_HARDCODE"
  184.  
  185.  
  186. ##
  187. ## Variation -- this might work for Linux 1.1.93 using ncurses-1.8.7.
  188. ##
  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
  193.  
  194. ##
  195. ## Variation -- this might work better than the suggestion above
  196. ##
  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
  202. #LDFLAGS = -s
  203.  
  204.  
  205. ##
  206. ## Variation -- compile for Solaris
  207. ##
  208. #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"SOLARIS" -I/usr/openwin/include
  209. #LIBS = -L/usr/openwin/lib -lX11 -lsocket -lnsl -lcurses
  210.  
  211.  
  212. ##
  213. ## Variation -- compile for SGI Indigo runnig Irix
  214. ##
  215. #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"SGI"
  216. #LIBS = -lX11 -lcurses -ltermcap -lsun
  217.  
  218.  
  219.  
  220. ##
  221. ## Variation -- compile for Dec ALPHA OSF/1 v2.0
  222. ##
  223. #CC     = cc
  224. ##CFLAGS = -std -O -g3 -Olimit 4000 -D"USE_X11" -D"USE_GCU"
  225. #CFLAGS = -std -g -D"USE_X11" -D"USE_GCU"
  226. #LIBS   = -lX11 -lcurses -ltermcap -lrpcsvc
  227.  
  228.  
  229. ##
  230. ## Variation -- compile for Interactive Unix (ISC) systems
  231. ##
  232. #CFLAGS = -Wall -O1 -pipe -g -D"USE_X11" -D"USE_GCU" -D"ISC"
  233. #LIBS = -lX11 -lcurses -lnsl_s -linet -lcposix
  234.  
  235.  
  236. ##
  237. ## Variation -- Support fat binaries under NEXTSTEP
  238. ##
  239. #CFLAGS = -Wall -O1 -pipe -g -D"USE_GCU" -arch m68k -arch i386
  240. #LIBS = -lcurses -ltermcap
  241.  
  242.  
  243. ##
  244. ## Variation -- Support for DJGPP with TCPLIB
  245. ##
  246. #CFLAGS = -Wall -O2 -g -D"USE_IBM" -DMSDOS
  247. #LIBS = -ltcp
  248.  
  249. ##
  250. ## Variation -- Support for OS/2 -MgS-
  251. ##
  252. CFLAGS = -Wall -g -O2 -pipe -D"USE_EMX" -Zmt
  253. LIBS = -lsocket -lvideo
  254.  
  255. #
  256. # Hack -- "install" as the base target
  257. #
  258. # If you want to build a server, remove the two hashes from the lines
  259. # below.
  260. #
  261.  
  262. install: mangcli.exe 
  263. #mangband
  264.     copy mangcli.exe ..
  265. #    copy mangband.exe ..
  266.  
  267.  
  268.  
  269. #
  270. # Build the "MAngband" server
  271. #
  272.  
  273. #mangband: $(SERV_OBJS)
  274. #    $(CC) $(CFLAGS) -o mangband $(SERV_OBJS) $(LDFLAGS) $(LIBS)
  275.  
  276.  
  277. #
  278. # Build the "MAngband" client
  279. #
  280.  
  281. mangcli.exe: $(CLI_OBJS)
  282.     $(CC) $(CFLAGS) -o mangcli.exe $(CLI_OBJS) $(LDFLAGS) $(LIBS)
  283.  
  284.  
  285. #
  286. # Rule for making a '.o'
  287. #
  288. .c.o:
  289.     $(CC) $(CFLAGS) -o $*.o -c $*.c
  290.  
  291.  
  292. #
  293. # Clean up old junk
  294. #
  295.  
  296. clean:
  297.     cd server & rm -f *.o
  298.     cd client & rm -f *.o
  299.     cd common & rm -f *.o
  300.  
  301.  
  302.  
  303. #
  304. # Generate dependancies automatically
  305. #
  306.  
  307. depend:
  308.     makedepend -- $(CFLAGS) -D__MAKEDEPEND__ -- $(SERV_SRCS) $(CLI_SRCS)
  309.  
  310.  
  311. # DO NOT ADD ANYTHING BELOW THIS LINE.
  312.  
  313. # DO NOT DELETE THIS LINE -- make depend depends on it.
  314.