home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / xplatfrm / tierra / makefile < prev    next >
Encoding:
Makefile  |  1992-04-26  |  6.2 KB  |  246 lines

  1. # Makefile_sccsid: @(#)Makefile    1.19    10/28/91
  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          = /usera/tierra
  12.  
  13. ## Almond: uncomment the following lines if you want to build almond
  14. ## NOTE: almond is not included in this beta-test distribution. do not
  15. ## uncomment or change this section!!!
  16. #
  17. # ALMONDDIR     = $(DEST)/src/almond
  18. # AL_CFLAGS    = -DSOCKETS -I$(ALMONDDIR)
  19. # AL_LIBS    =
  20. # AL_HDRS    = $(ALMONDDIR)/allayer.h \
  21. #        $(ALMONDDIR)/allayerp.h \
  22. #        $(ALMONDDIR)/alrequests.h \
  23. #        $(ALMONDDIR)/tlayer.h \
  24. #        $(ALMONDDIR)/tlayerp.h \
  25. #        $(ALMONDDIR)/comm.h \
  26. #        $(ALMONDDIR)/commp.h
  27. # AL_OBJS    = $(ALMONDDIR)/tlayer.o \
  28. #        $(ALMONDDIR)/tlcomm.o \
  29. #        $(ALMONDDIR)/allayer.o \
  30. #        $(ALMONDDIR)/allcomm.o \
  31. #        $(ALMONDDIR)/comm.o
  32. # AL_SRCS    = $(ALMONDDIR)/tlayer.c \
  33. #        $(ALMONDDIR)/tlcomm.c \
  34. #        $(ALMONDDIR)/allayer.c \
  35. #        $(ALMONDDIR)/allcomm.c \
  36. #        $(ALMONDDIR)/comm.c
  37.  
  38.  
  39. ## Tierra: uncomment the following lines as appropriate to build tierra
  40. #
  41. TIERRADIR     = $(DEST)/src/tierra
  42.  
  43. ## Instruction Set: uncomment your choice of instruction sets
  44. #
  45. ## Tom Ray's original instruction set 1
  46. INST    = 1
  47.  
  48. ## OS type: uncomment the lines OSFLAGS and LIBS below for the operating
  49. ## system and/or machine type most closely resembling yours, if you port
  50. ## tierra to a system significantly different from any of these or 
  51. ## one marked "not tested", please send us any changes you needed to
  52. ## make to get it working.
  53. #
  54. # Sun Workstations: choose Sun3 or Sun4
  55. # other systems running Berkeley 4.2 or 4.3: choose bsd 4.3
  56. #
  57. # SGI Iris: choose IRIX
  58. # AT&T SysIII: choose Sys3 (not tested)
  59. # AT&T SysV: choose SysV   (not tested)
  60. #
  61. # IBM RS/6000: choose RS6000 (not tested)
  62.  
  63. ## Sun3 -------------------------------------
  64. #
  65. # OSFLAGS    = -fswitch
  66. # LIBS    = -lm
  67. #
  68. ## Sun4 -------------------------------------
  69. #
  70. # OSFLAGS    =
  71. # LIBS    = -lm
  72. #
  73. ## bsd 4.3 ----------------------------------
  74. #
  75. # OSFLAGS    =
  76. # LIBS    = -lm
  77.  
  78. ## IRIX -------------------------------------
  79. #
  80. OSFLAGS    = -D_BSD_SIGNALS
  81. LIBS    = -lm -lsun
  82. #
  83. ## Sys3 -------------------------------------
  84. #  (untested)
  85. # OSFLAGS    = -D_BSD_SIGNALS
  86. # LIBS    = -lm
  87. #
  88. ## SysV -------------------------------------
  89. #  (untested)
  90. # OSFLAGS    = -D_BSD_SIGNALS
  91. # LIBS    = -lm
  92.  
  93. ## RS6000 -----------------------------------
  94. # (untested)
  95. # OSFLAGS    = -D_BSD_SIGNALS
  96. # LIBS    = -lm
  97. #
  98. ##
  99.  
  100. ## Optimization: set as appropriate for your compiler
  101. ## for debugging you should (usually) set this to -g
  102. ## to perform code optimization this setting is (usually) -O or -O<digit>
  103. #
  104. OPTIMIZ    = -g
  105.  
  106. ## Flags to be passed to the linker (usually cc). Add any special requirements
  107. ## for your system. this is hopefully oniform enough that there is no need
  108. ## to include all of the possibilities under the OS section. if you are using
  109. ## optimization, you may want to add -s to strip symbol tables and thus create 
  110. ## a smaller binary.
  111. #
  112. LDFLAGS    = $(OPTIMIZ)
  113.  
  114. ## you shouldn't have to change anything below this line.
  115. ## (if you are lucky, and the gods of technology aren't angry with you...)
  116.  
  117. CFLAGS    = -w $(OPTIMIZ) -DINST=$(INST) $(OSFLAGS) $(AL_CFLAGS)
  118.  
  119. EXTHDRS          = /usr/include/arpa/inet.h \
  120.         /usr/include/ctype.h \
  121.         /usr/include/errno.h \
  122.         /usr/include/fcntl.h \
  123.         /usr/include/limits.h \
  124.         /usr/include/malloc.h \
  125.         /usr/include/math.h \
  126.         /usr/include/memory.h \
  127.         /usr/include/netdb.h \
  128.         /usr/include/netinet/in.h \
  129.         /usr/include/rpcsvc/ypclnt.h \
  130.         /usr/include/stdio.h \
  131.         /usr/include/stdlib.h \
  132.         /usr/include/string.h \
  133.         /usr/include/sys/errno.h \
  134.         /usr/include/sys/fcntlcom.h \
  135.         /usr/include/sys/param.h \
  136.         /usr/include/sys/signal.h \
  137.         /usr/include/sys/socket.h \
  138.         /usr/include/sys/stat.h \
  139.         /usr/include/sys/sysmacros.h \
  140.         /usr/include/sys/time.h \
  141.         /usr/include/sys/types.h \
  142.         /usr/include/time.h \
  143.  
  144. HDRS          = declare.h extern.h portable.h tierra.h debug.h $(AL_HDRS)
  145.  
  146. LINKER          = cc 
  147.  
  148. MAKEFILE      = Makefile
  149.  
  150. PROGRAM          = tierra 
  151.  
  152. OBJS      = bookeep.o \
  153.         extract.o \
  154.         genebank.o \
  155.         genio.o \
  156.         parse.o \
  157.                 frontend.o \
  158.         instruct.o \
  159.         memalloc.o \
  160.         portable.o \
  161.         queues.o \
  162.         slicers.o \
  163.         tierra.o \
  164.         trand.o \
  165.         tsetup.o \
  166.         $(AL_OBJS)
  167.  
  168. SRCS      = bookeep.c \
  169.         extract.c \
  170.         genebank.c \
  171.         genio.c \
  172.         parse.c \
  173.         frontend.c \
  174.         instruct.c \
  175.         memalloc.c \
  176.         portable.c \
  177.         queues.c \
  178.         slicers.c \
  179.         tierra.c \
  180.         trand.c \
  181.         tsetup.c \
  182.         $(AL_SRCS)
  183.  
  184. DOCS      = README.T1 README.T2 arg.1
  185.  
  186. ARGOBJ      = arg.o genio.o portable.o frontend.o $(AL_OBJS)
  187.  
  188. all:;
  189.     @echo "   "
  190.     @echo " Tierra Artificial Life system "
  191.     @echo "   "
  192.     @echo " Please edit this Makefile, "
  193.     @echo " un-commenting the line(s) for your machine type / OS. "
  194.     @echo " and choice of options. "
  195.     @echo "   "
  196.     @echo " Then say:  " 
  197.     @echo " make programs  " 
  198.     @echo "   " 
  199.  
  200. tierra:   $(OBJS)
  201.         $(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o tierra
  202.  
  203. arg:      $(ARGOBJ) 
  204.         $(LINKER) $(LDFLAGS) $(ARGOBJ) $(LIBS) -o arg
  205.  
  206. clean:;        rm -f *.o  
  207.         rm -f $(ALMONDDIR)/*.o
  208.  
  209. depend:;    mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
  210.  
  211. index:;        ctags -wx $(HDRS) $(SRCS)
  212.  
  213. install:    $(PROGRAM)
  214.         install -s $(PROGRAM) $(DEST)
  215.  
  216. print:;        $(PRINT) $(HDRS) $(SRCS)
  217.  
  218. programs:       tierra arg
  219.  
  220. tags:           $(HDRS) $(SRCS); ctags $(HDRS) $(SRCS)
  221.  
  222. update:        $(DEST)/$(PROGRAM)
  223.  
  224. #distrib:    $(SRCS) $(HDRS) $(DOCS) arg.c Makefile
  225. #        cp $(SRCS) $(HDRS) $(DOCS) arg.c Makefile $(DEST)/src/distrib
  226. #        cd $(DEST)/src/distrib; 
  227.  
  228. $(DEST)/$(PROGRAM): $(PROGRAM)
  229.         @make -f $(MAKEFILE) DEST=$(DEST) install
  230. ###
  231. tlayer.o : $(ALMONDDIR)/tlayer.c
  232.     cc -c $(CFLAGS) $(ALMONDDIR)/tlayer.c
  233.  
  234. tlcomm.o : $(ALMONDDIR)/tlcomm.c
  235.     cc -c $(CFLAGS) $(ALMONDDIR)/tlcomm.c
  236.  
  237. allayer.o : $(ALMONDDIR)/allayer.c
  238.     cc -c $(CFLAGS) $(ALMONDDIR)/allayer.c
  239.  
  240. allcomm.o : $(ALMONDDIR)/allcomm.c
  241.     cc -c $(CFLAGS) $(ALMONDDIR)/allcomm.c
  242.  
  243. comm.o : $(ALMONDDIR)/comm.c
  244.     cc -c $(CFLAGS) $(ALMONDDIR)/comm.c
  245.  
  246.