home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-04-26 | 6.2 KB | 246 lines |
- # Makefile_sccsid: @(#)Makefile 1.19 10/28/91
-
- ## edit the following variables to tailor this Makefile to the system
- ## you want to install tierra on. (hint: if your `make' complains
- ## about missing values for any variable that is commented out, just
- ## give it a null value, ie: VAR =<Return>
-
- ## Destination: set as appropriate for your system. it currently assumes
- ## you are building the system in a directory called /usera/tierra
- #
- DEST = /usera/tierra
-
- ## Almond: uncomment the following lines if you want to build almond
- ## NOTE: almond is not included in this beta-test distribution. do not
- ## uncomment or change this section!!!
- #
- # ALMONDDIR = $(DEST)/src/almond
- # AL_CFLAGS = -DSOCKETS -I$(ALMONDDIR)
- # AL_LIBS =
- # AL_HDRS = $(ALMONDDIR)/allayer.h \
- # $(ALMONDDIR)/allayerp.h \
- # $(ALMONDDIR)/alrequests.h \
- # $(ALMONDDIR)/tlayer.h \
- # $(ALMONDDIR)/tlayerp.h \
- # $(ALMONDDIR)/comm.h \
- # $(ALMONDDIR)/commp.h
- # AL_OBJS = $(ALMONDDIR)/tlayer.o \
- # $(ALMONDDIR)/tlcomm.o \
- # $(ALMONDDIR)/allayer.o \
- # $(ALMONDDIR)/allcomm.o \
- # $(ALMONDDIR)/comm.o
- # AL_SRCS = $(ALMONDDIR)/tlayer.c \
- # $(ALMONDDIR)/tlcomm.c \
- # $(ALMONDDIR)/allayer.c \
- # $(ALMONDDIR)/allcomm.c \
- # $(ALMONDDIR)/comm.c
-
-
- ## Tierra: uncomment the following lines as appropriate to build tierra
- #
- TIERRADIR = $(DEST)/src/tierra
-
- ## Instruction Set: uncomment your choice of instruction sets
- #
- ## Tom Ray's original instruction set 1
- INST = 1
-
- ## OS type: uncomment the lines OSFLAGS and LIBS below for the operating
- ## system and/or machine type most closely resembling yours, if you port
- ## tierra to a system significantly different from any of these or
- ## one marked "not tested", please send us any changes you needed to
- ## make to get it working.
- #
- # Sun Workstations: choose Sun3 or Sun4
- # other systems running Berkeley 4.2 or 4.3: choose bsd 4.3
- #
- # SGI Iris: choose IRIX
- # AT&T SysIII: choose Sys3 (not tested)
- # AT&T SysV: choose SysV (not tested)
- #
- # IBM RS/6000: choose RS6000 (not tested)
-
- ## Sun3 -------------------------------------
- #
- # OSFLAGS = -fswitch
- # LIBS = -lm
- #
- ## Sun4 -------------------------------------
- #
- # OSFLAGS =
- # LIBS = -lm
- #
- ## bsd 4.3 ----------------------------------
- #
- # OSFLAGS =
- # LIBS = -lm
-
- ## IRIX -------------------------------------
- #
- OSFLAGS = -D_BSD_SIGNALS
- LIBS = -lm -lsun
- #
- ## Sys3 -------------------------------------
- # (untested)
- # OSFLAGS = -D_BSD_SIGNALS
- # LIBS = -lm
- #
- ## SysV -------------------------------------
- # (untested)
- # OSFLAGS = -D_BSD_SIGNALS
- # LIBS = -lm
-
- ## RS6000 -----------------------------------
- # (untested)
- # OSFLAGS = -D_BSD_SIGNALS
- # LIBS = -lm
- #
- ##
-
- ## Optimization: set as appropriate for your compiler
- ## for debugging you should (usually) set this to -g
- ## to perform code optimization this setting is (usually) -O or -O<digit>
- #
- OPTIMIZ = -g
-
- ## Flags to be passed to the linker (usually cc). Add any special requirements
- ## for your system. this is hopefully oniform enough that there is no need
- ## to include all of the possibilities under the OS section. if you are using
- ## optimization, you may want to add -s to strip symbol tables and thus create
- ## a smaller binary.
- #
- LDFLAGS = $(OPTIMIZ)
-
- ## you shouldn't have to change anything below this line.
- ## (if you are lucky, and the gods of technology aren't angry with you...)
-
- CFLAGS = -w $(OPTIMIZ) -DINST=$(INST) $(OSFLAGS) $(AL_CFLAGS)
-
- EXTHDRS = /usr/include/arpa/inet.h \
- /usr/include/ctype.h \
- /usr/include/errno.h \
- /usr/include/fcntl.h \
- /usr/include/limits.h \
- /usr/include/malloc.h \
- /usr/include/math.h \
- /usr/include/memory.h \
- /usr/include/netdb.h \
- /usr/include/netinet/in.h \
- /usr/include/rpcsvc/ypclnt.h \
- /usr/include/stdio.h \
- /usr/include/stdlib.h \
- /usr/include/string.h \
- /usr/include/sys/errno.h \
- /usr/include/sys/fcntlcom.h \
- /usr/include/sys/param.h \
- /usr/include/sys/signal.h \
- /usr/include/sys/socket.h \
- /usr/include/sys/stat.h \
- /usr/include/sys/sysmacros.h \
- /usr/include/sys/time.h \
- /usr/include/sys/types.h \
- /usr/include/time.h \
-
- HDRS = declare.h extern.h portable.h tierra.h debug.h $(AL_HDRS)
-
- LINKER = cc
-
- MAKEFILE = Makefile
-
- PROGRAM = tierra
-
- OBJS = bookeep.o \
- extract.o \
- genebank.o \
- genio.o \
- parse.o \
- frontend.o \
- instruct.o \
- memalloc.o \
- portable.o \
- queues.o \
- slicers.o \
- tierra.o \
- trand.o \
- tsetup.o \
- $(AL_OBJS)
-
- SRCS = bookeep.c \
- extract.c \
- genebank.c \
- genio.c \
- parse.c \
- frontend.c \
- instruct.c \
- memalloc.c \
- portable.c \
- queues.c \
- slicers.c \
- tierra.c \
- trand.c \
- tsetup.c \
- $(AL_SRCS)
-
- DOCS = README.T1 README.T2 arg.1
-
- ARGOBJ = arg.o genio.o portable.o frontend.o $(AL_OBJS)
-
- all:;
- @echo " "
- @echo " Tierra Artificial Life system "
- @echo " "
- @echo " Please edit this Makefile, "
- @echo " un-commenting the line(s) for your machine type / OS. "
- @echo " and choice of options. "
- @echo " "
- @echo " Then say: "
- @echo " make programs "
- @echo " "
-
- tierra: $(OBJS)
- $(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o tierra
-
- arg: $(ARGOBJ)
- $(LINKER) $(LDFLAGS) $(ARGOBJ) $(LIBS) -o arg
-
- clean:; rm -f *.o
- rm -f $(ALMONDDIR)/*.o
-
- depend:; mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
-
- index:; ctags -wx $(HDRS) $(SRCS)
-
- install: $(PROGRAM)
- install -s $(PROGRAM) $(DEST)
-
- print:; $(PRINT) $(HDRS) $(SRCS)
-
- programs: tierra arg
-
- tags: $(HDRS) $(SRCS); ctags $(HDRS) $(SRCS)
-
- update: $(DEST)/$(PROGRAM)
-
- #distrib: $(SRCS) $(HDRS) $(DOCS) arg.c Makefile
- # cp $(SRCS) $(HDRS) $(DOCS) arg.c Makefile $(DEST)/src/distrib
- # cd $(DEST)/src/distrib;
-
- $(DEST)/$(PROGRAM): $(PROGRAM)
- @make -f $(MAKEFILE) DEST=$(DEST) install
- ###
- tlayer.o : $(ALMONDDIR)/tlayer.c
- cc -c $(CFLAGS) $(ALMONDDIR)/tlayer.c
-
- tlcomm.o : $(ALMONDDIR)/tlcomm.c
- cc -c $(CFLAGS) $(ALMONDDIR)/tlcomm.c
-
- allayer.o : $(ALMONDDIR)/allayer.c
- cc -c $(CFLAGS) $(ALMONDDIR)/allayer.c
-
- allcomm.o : $(ALMONDDIR)/allcomm.c
- cc -c $(CFLAGS) $(ALMONDDIR)/allcomm.c
-
- comm.o : $(ALMONDDIR)/comm.c
- cc -c $(CFLAGS) $(ALMONDDIR)/comm.c
-
-