home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TIERRA40.ZIP / TIERRA / MAKEFILE < prev    next >
Text File  |  1992-09-09  |  7KB  |  293 lines

  1. # Makefile_sccsid: @(#)Makefile    1.1    4/11/92
  2.  
  3. ## edit the following variables to tailor this Makefile to the system
  4. ## you want to install tierra on. (hint: if your `make' complains
  5. ## about missing values for any variable that is commented out, just
  6. ## give it a null value, ie: VAR =<Return>
  7.  
  8. ## Destination: set as appropriate for your system. it currently assumes
  9. ## you are building the system in a directory called /usera/tierra
  10. #
  11. DEST          = ./
  12.  
  13. ## ALmond: uncomment the following lines if you want ALmond support
  14. # and uncomment the -DALCOMM lines for you specific machine below
  15. #
  16. # ALCOMMDIR    = /net/user/cocteau/al/alcomm
  17. # ALC_INCS    = $(ALCOMMDIR)/mlayer.h
  18. # ALC_TOBJS    = tmonitor.o
  19. # ALC_TSRCS    = tmonitor.c
  20. # ALC_TINCS    = tmonitor.h
  21. # ALCLIBDIR    = $(ALCOMMDIR)/src
  22. # or (better )
  23. # ALCLIBDIR    = $(HOME)/lib/$(ARCH)
  24. # ALCLIB    = $(ALCLIBDIR)/libalcom.a
  25.  
  26. ## Tierra: uncomment the following lines as appropriate to build tierra
  27. #
  28. TIERRADIR     = $(DEST)
  29.  
  30. ## Instruction Set: uncomment your choice of instruction sets
  31. #
  32. ## Tom Ray's original instruction set 1
  33. INST    = 1
  34.  
  35. ## OS type: uncomment the set of lines for the operating system
  36. ## and/or machine type most closely resembling yours, if you port
  37. ## tierra to a system significantly different from any of these or 
  38. ## one marked "not tested", please send us any changes you needed to
  39. ## make to get it working.
  40. #
  41. ## The -ltermcap and -lcurses are libs for the BASIC ( curses) frontend only
  42. #
  43. # Sun Workstations: choose Sun3 or Sun4
  44. # other systems running Berkeley 4.2 or 4.3: choose bsd 4.3
  45. #
  46. # SGI Iris: choose IRIX
  47. # AT&T SysIII: choose Sys3 (not tested)
  48. # AT&T SysV: choose SysV   (not tested)
  49. #
  50. # IBM RS/6000: choose RS6000
  51.  
  52. ## Sun3 -------------------------------------
  53. #
  54. # OSFLAGS    = -fswitch
  55. # LIBS    = -lm -lcurses -ltermcap
  56. #
  57. # or for almond ...
  58. #
  59. # OSFLAGS    = -DALCOMM
  60. # LIBS    = -lm -lcurses -ltermcap -lalcom -lresolv
  61. #
  62. ## Sun4 -------------------------------------
  63. #
  64. OSFLAGS    = 
  65. LIBS    = -lm -lcurses -ltermcap
  66. #
  67. # or for almond ...
  68. #
  69. # OSFLAGS    = -DALCOMM 
  70. # LIBS    = -lm -lcurses -ltermcap -lalcom -lresolv
  71. #
  72. ## next -------------------------------------
  73. #
  74. # OSFLAGS    = 
  75. # LIBS    = -lm -lcurses -ltermcap
  76. #
  77. # or for almond ...
  78. #
  79. # OSFLAGS    = -DALCOMM
  80. # LIBS    = -lm -lcurses -ltermcap -lalcom -lresolv
  81. #
  82. ## bsd 4.3 ----------------------------------
  83. #
  84. # OSFLAGS    =
  85. # LIBS    = -lm -lcurses -ltermcap
  86. #
  87. # or for almond ...
  88. #
  89. # OSFLAGS    = -DALCOMM
  90. # LIBS    = -lm -lcurses -ltermcap -lalcom -lresolv
  91.  
  92. ## IRIX -------------------------------------
  93. #  only use BSD_SIGNALS for irix < 4.0
  94. # OSFLAGS    = -D_BSD_SIGNALS    
  95. # LIBS    = -lm -lsun -lcurses -ltermcap
  96. #
  97. # or for almond ...
  98. #
  99. # OSFLAGS    = -DALCOMM -D_BSD_SIGNALS
  100. # LIBS    = -lm -lcurses -ltermcap -lalcom -lsun
  101. #
  102. ## Sys3 -------------------------------------
  103. #  (untested)
  104. # OSFLAGS    = -D_BSD_SIGNALS
  105. # LIBS    = -lm -lcurses -ltermcap
  106. #
  107. # or for almond ...
  108. #
  109. # OSFLAGS    = -DALCOMM -D_BSD_SIGNALS
  110. # LIBS    = -lm -lcurses -ltermcap -lalcom -lresolv
  111. #
  112. ## SysV -------------------------------------
  113. #  (untested)
  114. # OSFLAGS    = -D_BSD_SIGNALS
  115. # LIBS    = -lm -lcurses -ltermcap
  116. #
  117. # or for almond ...
  118. #
  119. # OSFLAGS    = -DALCOMM -D_BSD_SIGNALS
  120. # LIBS    = -lm -lcurses -ltermcap -lalcom -lresolv
  121. #
  122.  
  123. ## DEC 5000  -----------------------------------
  124. #
  125. # OSFLAGS    = -D_BSD_SIGNALS 
  126. # LIBS    = -lm -lcurses -ltermcap
  127. #
  128. # or for almond ...
  129. #
  130. # OSFLAGS    = -DALCOMM
  131. # LIBS    = -lm -lcurses -ltermcap -lalcom 
  132.  
  133. ## RS6000 -----------------------------------
  134. #
  135. # OSFLAGS    = -D_BSD_SIGNALS -D__TRS6000__
  136. # LIBS    = -lm -lcurses -ltermcap
  137. #
  138. # or for almond ...
  139. #
  140. # OSFLAGS    = -D_BSD_SIGNALS -D__TRS6000__ -DALCOMM
  141. # LIBS    = -lm -lcurses -ltermcap -lalcom 
  142. #
  143. ##
  144. ## Optimization: set as appropriate for your compiler
  145. ## for debugging you should (usually) set this to -g
  146. ## to perform code optimization this setting is (usually) -O or -O<digit>
  147. #
  148. OPTIMIZ    = -g
  149.  
  150. ## Flags to be passed to the linker (usually cc). Add any special requirements
  151. ## for your system. this is hopefully oniform enough that there is no need
  152. ## to include all of the possibilities under the OS section. if you are using
  153. ## optimization, you may want to add -s to strip symbol tables and thus create 
  154. ## a smaller binary.
  155. #
  156. LDFLAGS = $(OPTIMIZ)
  157. #
  158. # or for almond ...
  159. #
  160. # LDFLAGS    = $(OPTIMIZ) -L$(ALCLIBDIR)
  161.  
  162. ## you shouldn't have to change anything below this line.
  163. ## (if you are lucky, and the gods of technology aren't angry with you...)
  164. CFLAGS    = -w $(OPTIMIZ) -DINST=$(INST) $(OSFLAGS) 
  165. #
  166. # or for almond ...
  167. #
  168. # CFLAGS    = -w $(OPTIMIZ) -DINST=$(INST) $(OSFLAGS) -I$(ALCOMMDIR)/inc
  169.  
  170. EXTHDRS          = /usr/include/arpa/inet.h \
  171.         /usr/include/ctype.h \
  172.         /usr/include/errno.h \
  173.         /usr/include/fcntl.h \
  174.         /usr/include/limits.h \
  175.         /usr/include/malloc.h \
  176.         /usr/include/math.h \
  177.         /usr/include/memory.h \
  178.         /usr/include/netdb.h \
  179.         /usr/include/netinet/in.h \
  180.         /usr/include/rpcsvc/ypclnt.h \
  181.         /usr/include/stdio.h \
  182.         /usr/include/stdlib.h \
  183.         /usr/include/string.h \
  184.         /usr/include/sys/errno.h \
  185.         /usr/include/sys/fcntlcom.h \
  186.         /usr/include/sys/param.h \
  187.         /usr/include/sys/signal.h \
  188.         /usr/include/sys/socket.h \
  189.         /usr/include/sys/stat.h \
  190.         /usr/include/sys/sysmacros.h \
  191.         /usr/include/sys/time.h \
  192.         /usr/include/sys/types.h \
  193.         /usr/include/time.h
  194.  
  195. HDRS          = declare.h extern.h portable.h tierra.h debug.h    \
  196.         trequest.h $(ALC_INCS)
  197.  
  198. CC            = cc
  199. LINKER          = cc 
  200.  
  201. MAKEFILE      = Makefile
  202.  
  203. PROGRAM          = tierra 
  204.  
  205. OBJS      = bookeep.o \
  206.         diskbank.o \
  207.         rambank.o \
  208.         genio.o \
  209.         parse.o \
  210.                 frontend.o \
  211.         instruct.o \
  212.         memalloc.o \
  213.         memtree.o \
  214.         portable.o \
  215.         queues.o \
  216.         slicers.o \
  217.         tierra.o \
  218.         trand.o \
  219.         tsetup.o \
  220.         ttools.o \
  221.         $(ALC_TOBJS)
  222.  
  223. SRCS      = bookeep.c \
  224.         diskbank.c \
  225.         rambank.c \
  226.         genio.c \
  227.         parse.c \
  228.         frontend.c \
  229.         instruct.c \
  230.         memalloc.c \
  231.         memtree.c \
  232.         portable.c \
  233.         queues.c \
  234.         slicers.c \
  235.         tierra.c \
  236.         trand.c \
  237.         tsetup.c \
  238.         ttools.c \
  239.         $(ALC_TSRCS)
  240.  
  241.  
  242. ARGOBJ      = arg.o arg_inc.o
  243.  
  244. all:;
  245.     @echo "   "
  246.     @echo " Tierra Artificial Life system "
  247.     @echo "   "
  248.     @echo " Please edit this Makefile, "
  249.     @echo " un-commenting the line(s) for your machine type / OS. "
  250.     @echo " and choice of options. "
  251.     @echo "   "
  252.     @echo " Then say:  " 
  253.     @echo " make programs  " 
  254.     @echo "   " 
  255.  
  256.  
  257. # tierra: $(OBJS) $(ALCLIB)
  258. tierra: $(OBJS) 
  259.     $(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o tierra
  260.  
  261. #$(ALCLIB):
  262. #    (cd $(ALCOMMDIR)/src; make lib)
  263.  
  264. arg:      $(ARGOBJ) 
  265.         $(LINKER) $(LDFLAGS) $(ARGOBJ) $(LIBS) -o arg
  266.  
  267. probe:;        cc -g probe.c -lm -o probe
  268. clean:;        rm -f *.o  
  269. #        rm -f $(ALCOMMDIR)/*.o
  270.  
  271. depend:;    mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
  272.  
  273. index:;        ctags -wx $(HDRS) $(SRCS)
  274.  
  275. install:    $(PROGRAM)
  276.         install -s $(PROGRAM) $(DEST)
  277.  
  278. print:;        $(PRINT) $(HDRS) $(SRCS)
  279.  
  280. programs:       tierra arg
  281.  
  282. tags:           $(HDRS) $(SRCS); ctags $(HDRS) $(SRCS)
  283.  
  284. update:        $(DEST)/$(PROGRAM)
  285.  
  286. #distrib:    $(SRCS) $(HDRS) $(DOCS) arg.c Makefile
  287. #        cp $(SRCS) $(HDRS) $(DOCS) arg.c Makefile $(DEST)/src/distrib
  288. #        cd $(DEST)/src/distrib; 
  289.  
  290. $(DEST)/$(PROGRAM): $(PROGRAM)
  291.         @make -f $(MAKEFILE) DEST=$(DEST) install
  292.  
  293.