home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / SOURCE / MAKEFILE.IN < prev    next >
Text File  |  1996-06-04  |  7KB  |  212 lines

  1. # DIST: This is the distribution Makefile for WILD Life.  configure
  2. # DIST: can make most of the changes to this file you might want, so
  3. # DIST: try that first.
  4.  
  5. SHELL        = /bin/sh
  6. @SET_MAKE@
  7. CC        = @CC@
  8. CFLAGS        = @CFLAGS@
  9. CPPFLAGS    = @CPPFLAGS@
  10. LDFLAGS        = @LDFLAGS@
  11. LIBS        = @LIBS@
  12. DEFS        = @DEFS@
  13. RANLIB        = @RANLIB@
  14. INSTALL        = @INSTALL@
  15. MKDIRHIER    = @MKDIRHIER@
  16. prefix        = @prefix@
  17. exec_prefix    = @exec_prefix@
  18. bindir        = ${exec_prefix}/bin
  19. libdir        = ${prefix}/lib/life
  20. srcdir        = @srcdir@
  21. VPATH        = @srcdir@
  22. X_CFLAGS    = @X_CFLAGS@
  23. X_LIBS        = @X_LIBS@
  24. X_EXTRA_LIBS    = @X_EXTRA_LIBS@
  25. X_PRE_LIBS    = @X_PRE_LIBS@
  26. XLIBS        = ${X_PRE_LIBS} ${X_LIBS} -lX11 ${X_EXTRA_LIBS}
  27. XLIBRARIES    = @XLIBRARIES@
  28. MKDEP        = @MKDEP@
  29. SETUPDIR    = ${libdir}
  30. SETUP        = ${SETUPDIR}/Source/.set_up
  31. INCLUDE_PATHS    = @x_includes@
  32. XSOURCE        = @XSOURCE@
  33. XOBJECT        = @XOBJECT@
  34. XINCLUDE    = @XINCLUDE@
  35. DBMSOURCE    = @DBMSOURCE@
  36. DBMOBJECT    = @DBMOBJECT@
  37.  
  38. #=====================================================================
  39. # For Linux:
  40. # The following variable should contain the pathname of the GCC include
  41. # directory.  Run 'gcc -v' to find where gcc's directories are, then edit
  42. # the sample pathname below to be correct.
  43. #INCLUDE_PATHS    = -I/usr/lib/gcc-lib/i[34]86-linux/<version>/include
  44. #
  45. # For Linux (continued):
  46. # This is an example of a definition that works on a Gateway 2000 machine:
  47. #INCLUDE_PATHS = -I/usr/lib/gcc-lib/i486-linux/2.4.5/include -I/usr/include/bsd
  48. #
  49. # For Solaris
  50. #INCLUDE_PATHS = -I/usr/openwin/include
  51. #=====================================================================
  52.  
  53. #=====================================================================
  54. # -DNORAW
  55. # Add this if the low-level (unbuffered) terminal input file (raw.c) won't
  56. # compile on your system.  On SunOS for some reason this file will include some
  57. # library files twice. This does not seem to make any difference.
  58. #
  59. # -DNEED_TRUNC
  60. # If defined, adds a definition of the 'trunc' function.
  61. # -DX11
  62. # If defined, will cause the X interface to be linked in.  If it is not
  63. # defined then the system will contain no X interface.  -lX11 should be
  64. # removed from LOADFLAGS in that case (see below).
  65. #
  66. # -DGARBCOL
  67. # If defined will cause the garbage collector to be called when memory is low.
  68. #
  69. # -DUNIF_DEBUG
  70. # If defined causes the 'debug' mode to show matching and unification sub-goals.
  71. #=====================================================================
  72.  
  73. COMPILE.c    = $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c
  74. XCOMPILE.c    = $(CC) $(CFLAGS) $(X_CFLAGS) $(CPPFLAGS) $(DEFS) -c
  75. .c.o:
  76.     $(COMPILE.c) -o $@ $<
  77.  
  78. #=====================================================================
  79. # MEMORY is the number of words that the system will allocate.
  80. # Because of the half-space GC, Wild-LIFE will actually allocate twice that
  81. # many words. So on a 32-bit system, multiply by 8 to obtain the real memory
  82. # usage in bytes.  The default size results in about 17MB virtual memory size.
  83. # If this is too big for your system then redefine MEMORY as suggested below.
  84. #
  85. # The memory size given by MEMORY is overridden by
  86. # the command line argument: "-memoryNNNNNNNN"
  87. #
  88. # Normal version (totals about 17 MB virtual)
  89. #MEMORY = 2097152
  90. #
  91. # Smaller versions--take your pick.
  92. # The smallest totals about 5 MB virtual.
  93. # Under Linux, one of the smaller versions may run better--it depends on
  94. # how much RAM and swap space your machine has.
  95. #MEMORY = 1048576
  96. #MEMORY = 524288
  97. #=====================================================================
  98.  
  99. PROGRAM = wild_life
  100.  
  101. XSRC = xpred.c xdisplaylist.c
  102. XOBJ = xpred.o xdisplaylist.o
  103. XINC = xpred.h xdisplaylist.h
  104.  
  105. LIBSOURCE = \
  106.     arity.c bi_math.c bi_sys.c bi_type.c built_ins.c copy.c error.c \
  107.     hash_table.c info.c interrupt.c lefun.c lib.c list.c login.c \
  108.     lub.c memory.c modules.c parser.c print.c raw.c sys.c templates.c \
  109.     token.c trees.c types.c $(XSOURCE) $(DBMSOURCE)
  110.  
  111. LIBOBJECT = \
  112.     arity.o bi_math.o bi_sys.o bi_type.o built_ins.o copy.o error.o \
  113.     hash_table.o Info.o interrupt.o lefun.o Lib.o list.o login.o \
  114.     lub.o memory.o modules.o parser.o print.o raw.o sys.o templates.o \
  115.     token.o trees.o types.o $(XOBJECT) $(DBMOBJECT)
  116.  
  117. LIBINCLUDE = \
  118.     built_ins.h c_life.h copy.h error.h extern.h info.h interrupt.h \
  119.     lefun.h list.h login.h memory.h modules.h parser.h print.h raw.h \
  120.     templates.h token.h trees.h types.h $(XINCLUDE) \
  121.     sys.h
  122.  
  123. REINCLUDE = regexp.h
  124.  
  125. PROGINCLUDE = $(LIBINCLUDE)
  126. PROGSOURCE  = $(LIBSOURCE) life.c
  127. PROGOBJECT  = $(LIBOBJECT) life.o
  128.  
  129. PROGSOURCELIFE = built_ins.lf term_expansion.lf onlinedoc.lf
  130.  
  131. MANPAGE = $(PROGRAM).1
  132.  
  133. LIBA = c_life.a
  134.  
  135. # Please don't change this so we can tell which release you are using.
  136. DATE        = Fri Jul  7 13:57:49 PDT 1995
  137. VERSION     = 1.02
  138.  
  139. all: $(LIBA) $(PROGRAM) .set_up Demo
  140.     @echo
  141.     @echo "Life generation done"
  142.     @echo
  143.  
  144. Demo:
  145.     cd ../Demo; $(MAKE) SETUPDIR="$(SETUPDIR)"
  146.  
  147. regexp/regexp.o regexp/regsub.o: RegExp
  148.     @echo "Regular Expression Package: $@ done"
  149. RegExp:
  150.     cd regexp; $(MAKE) r CC="$(CC)" CFLAGS="$(CFLAGS)"
  151.  
  152. $(PROGRAM): $(LIBA) Life.o
  153.     $(CC) -o $(PROGRAM) Life.o $(LIBA) $(LDFLAGS) $(LIBS) $(XLIBRARIES)
  154.  
  155. .set_up: .set_up_basis
  156.     sed -e "s%+SETUPDIR+%$(SETUPDIR)%g" < .set_up_basis > .set_up
  157.  
  158. clean:
  159.     -rm *~ *.o *.a .set_up Life.c Lib.c $(PROGRAM)
  160.     cd regexp; $(MAKE) clean
  161.  
  162. veryclean: clean
  163.     -rm *.cache *.status Makefile
  164.     cd regexp; $(MAKE) veryclean
  165.  
  166. Life.c: life.c Makefile
  167.     sed -e "s%+SETUP+%$(SETUP)%" < life.c > Life.c
  168.  
  169. Lib.c:    lib.c Makefile
  170.     sed -e "s%+SETUP+%$(SETUP)%" < lib.c > Lib.c
  171.  
  172. Info.c: $(PROGSOURCE) $(PROGINCLUDE)
  173.     @echo Don\'t be surprised, info is compiled "for ${DATE} because" something has changed
  174.     sed -e "s/+VERSION+/$(VERSION)/" \
  175.         -e "s/+DATE+/$(DATE)/" < info.c > Info.c
  176.  
  177. $(LIBA): regexp/regexp.o regexp/regsub.o $(LIBOBJECT)
  178.     -rm -f $(LIBA)
  179.     ar cr $(LIBA) $(LIBOBJECT) regexp/regexp.o regexp/regsub.o
  180.     $(RANLIB) $(LIBA)
  181.  
  182. xpred.o: xpred.c
  183.     $(XCOMPILE.c) -o $@ $<
  184.  
  185. xdisplaylist.o: xdisplaylist.c
  186.     $(XCOMPILE.c) -o $@ $<
  187.  
  188. MKINSTALL = $(MAKE) MKDIRHIER="$(MKDIRHIER)"\
  189.  libdir="$(libdir)" INSTALL="$(INSTALL)" srcdir="$(srcdir)" install
  190.  
  191. install: $(PROGRAM) .set_up
  192.     test -d $(bindir)          || $(MKDIRHIER) $(bindir)
  193.     $(INSTALL) -m 755 $(PROGRAM) $(bindir)/$(PROGRAM)
  194.     test -d $(libdir)          || $(MKDIRHIER) $(libdir)
  195.     test -d $(libdir)/Source   || $(MKDIRHIER) $(libdir)/Source
  196.     $(INSTALL) -m 744 .set_up           $(libdir)/Source
  197.     $(INSTALL) -m 744 built_ins.lf      $(libdir)/Source
  198.     $(INSTALL) -m 744 onlinedoc.lf      $(libdir)/Source
  199.     $(INSTALL) -m 744 term_expansion.lf $(libdir)/Source
  200.     cd $(srcdir)/../Lib;      $(MKINSTALL)
  201.     cd $(srcdir)/../Tools;    $(MKINSTALL)
  202.     cd $(srcdir)/../Examples; $(MKINSTALL)
  203.     cd $(srcdir)/../Doc;      $(MKINSTALL)
  204.     cd $(srcdir)/../Demo;     $(MKINSTALL)
  205.  
  206. #=====================================================================
  207. # Dependencies
  208.  
  209. depend:
  210.     $(MKDEP) $(CPPFLAGS) $(DEFS) $(INCLUDE_PATHS) $(PROGSOURCE)
  211.