home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia: Special Games / INFESPGAMES.mdf / os2 / backgam / source / makefile.ori < prev    next >
Encoding:
Makefile  |  1992-09-22  |  6.1 KB  |  208 lines

  1. # TinyFugue Makefile
  2.  
  3. FLAGS = -g -DTERMCAP -DMAILDELAY=60 -D_STRSTR
  4. # CONNECT = -DCONNECT_BSD
  5.  
  6. ### If your version of Make does not import the environment, define HOME here.
  7. # HOME=
  8.  
  9. ### Single-user default file locations and settings
  10.  
  11. EXE       = $(HOME)/tf
  12. TFCONNECT = $(HOME)/.tf.connect
  13. TFLIBRARY = $(HOME)/.tf.library
  14. HELPFILE  = $(HOME)/.tf.help
  15.  
  16. ## If you plan to let others use your copy of tf, use the umask 22 line.
  17. # UMASK   = umask 22;
  18. UMASK     =
  19.  
  20. # The next 2 macros may be left blank, if you don't want the man page.
  21. # MANTYPE is either "nroff" or "cat" (vt100).
  22. MANTYPE   = nroff
  23. MANPAGE   = $(HOME)/tf.1
  24.  
  25.  
  26. ### Preferred settings for public installation
  27.  
  28. # EXE       = /usr/local/bin/tf
  29. # TFCONNECT = /usr/local/bin/tf.connect
  30. # TFLIBRARY = /usr/local/lib/tf.library
  31. # HELPFILE  = /usr/local/lib/tf.help
  32. # UMASK     = umask 22;
  33. # # The next 2 macros may be left blank, if you don't want the man page.
  34. # # MANTYPE is either "nroff" or "cat" (vt100).
  35. # MANTYPE   = nroff
  36. # MANPAGE   = /usr/local/man/man1/tf.1
  37.  
  38.  
  39. ### traditional C
  40. CC = cc
  41. CCFLAGS =
  42.  
  43. ### GNU C
  44. # CC = gcc
  45. # GCCFLAGS = -ansi
  46.  
  47. LIBRARIES = -ltermcap
  48. MAKE = make
  49.  
  50. #################################################################
  51. #### You should not need to modify anything below this point ####
  52. #################################################################
  53.  
  54. FILES      = -DTFLIBRARY=\"$(TFLIBRARY)\" -DTFCONNECT=\"$(TFCONNECT)\"
  55. CFLAGS     = $(FLAGS) $(GCCFLAGS) $(CCFLAGS) $(FILES) $(CONNECT)
  56. SHELL      = /bin/sh
  57. MAKEFILE   = Makefile
  58. SOURCE     = main.c world.c util.c socket.c keyboard.c macro.c \
  59.              command1.c command2.c special.c history.c process.c output.c \
  60.              expand.c dstring.c help.c signal.c
  61. OBJECTS    = main.o world.o util.o socket.o keyboard.o macro.o \
  62.              command1.o command2.o special.o history.o process.o output.o \
  63.              expand.o dstring.o help.o signal.o
  64. CONSOURCE  = tf.connect.c
  65.  
  66.  
  67. all:
  68.     @echo 'Please read the INSTALLATION file before compiling.'
  69.  
  70. tf:     $(OBJECTS)
  71.     $(UMASK) $(CC) $(CFLAGS) -o tf $(OBJECTS) $(LIBRARIES)
  72.  
  73. install: $(EXE) $(TFCONNECT) $(TFLIBRARY) HELP $(MANPAGE)
  74.     @echo
  75.     @echo '**** TinyFugue installation complete.'
  76.  
  77. uninstall:
  78.     rm -f $(EXE) $(TFCONNECT) $(TFLIBRARY) $(MANPAGE)
  79.     rm -f $(HELPFILE) $(HELPFILE).index
  80.  
  81. EXE $(EXE): tf
  82.     @echo '**** installing TF executable in $(EXE)'
  83.     $(UMASK) cp tf $(EXE)
  84.  
  85. tf.connect: tf.connect.c tf.connect.h opensock.c prototype.h $(MAKEFILE)
  86.     @if [ "$(CONNECT)" ]; then \
  87.         echo '**** compiling Connector';\
  88.     fi
  89.     if [ "$(CONNECT)" ]; then \
  90.         $(UMASK) $(CC) $(CFLAGS) -o tf.connect tf.connect.c $(LIBRARIES);\
  91.     fi
  92.  
  93. TFCONNECT $(TFCONNECT): tf.connect
  94.     @if [ "$(CONNECT)" ]; then \
  95.         echo '**** installing Connector in $(TFCONNECT)';\
  96.     fi
  97.     if [ "$(CONNECT)" ]; then \
  98.         $(UMASK) cp tf.connect $(TFCONNECT);\
  99.     fi
  100.  
  101. TFLIBRARY $(TFLIBRARY): $(MAKEFILE) tf.library
  102.     @echo '**** installing macro library in $(TFLIBRARY)'
  103.     rm -f $(TFLIBRARY)
  104.     $(UMASK) sed '/__HELPFILE__/s;;$(HELPFILE);g' <tf.library> $(TFLIBRARY)
  105.     chmod ugo-w $(TFLIBRARY)
  106.  
  107. MANPAGE $(MANPAGE): $(MAKEFILE) tf.1.$(MANTYPE)man
  108.     @if [ "$(MANPAGE)" ]; then \
  109.         echo '**** installing manpage in $(MANPAGE) ($(MANTYPE) format)';\
  110.     fi
  111.     if [ "$(MANPAGE)" ]; then \
  112.         $(UMASK) cp tf.1.$(MANTYPE)man $(MANPAGE);\
  113.     fi
  114.  
  115. HELP: $(HELPFILE) $(HELPFILE).index
  116.  
  117. $(HELPFILE).index: $(HELPFILE) tf.help.index
  118.     @if [ "$(HELPFILE)" ]; then\
  119.         echo '**** installing help index in $(HELPFILE).index';\
  120.     fi
  121.     if [ "$(HELPFILE)" ]; then\
  122.         $(UMASK) cp tf.help.index $(HELPFILE).index;\
  123.     fi
  124.  
  125. tf.help.index: tf.help
  126.     $(MAKE) makehelp
  127.     $(UMASK) ./makehelp
  128.  
  129. $(HELPFILE): $(MAKEFILE) tf.help
  130.     @if [ "$(HELPFILE)" ]; then\
  131.         echo '**** installing help file in $(HELPFILE)';\
  132.     fi
  133.     if [ "$(HELPFILE)" ]; then\
  134.         $(UMASK) cp tf.help $(HELPFILE);\
  135.     fi
  136.  
  137. makehelp: makehelp.c $(MAKEFILE)
  138.     @echo '**** compiling index builder'
  139.     $(CC) $(CFLAGS) -o makehelp makehelp.c
  140.  
  141. $(MAKEFILE):
  142.  
  143. clean:
  144.     rm -f $(OBJECTS) makehelp
  145.  
  146.  
  147. command1.o: command1.c tf.h dstring.h util.h history.h world.h socket.h \
  148.             output.h macro.h help.h process.h keyboard.h \
  149.             prototype.h $(MAKEFILE)
  150.  
  151. command2.o: command2.c tf.h dstring.h util.h macro.h keyboard.h output.h \
  152.             command1.h history.h world.h socket.h \
  153.             prototype.h $(MAKEFILE)
  154.  
  155. dstring.o: dstring.c tf.h dstring.h util.h \
  156.             prototype.h $(MAKEFILE)
  157.  
  158. expand.o: expand.c tf.h dstring.h util.h macro.h socket.h command1.h output.h \
  159.             prototype.h $(MAKEFILE)
  160.  
  161. help.o: help.c tf.h dstring.h util.h output.h \
  162.             prototype.h $(MAKEFILE)
  163.  
  164. history.o: history.c tf.h dstring.h util.h history.h world.h socket.h macro.h \
  165.            output.h \
  166.             prototype.h $(MAKEFILE)
  167.  
  168. keyboard.o: keyboard.c tf.h dstring.h util.h macro.h output.h history.h \
  169.            socket.h expand.h \
  170.             prototype.h $(MAKEFILE)
  171.  
  172. macro.o: macro.c tf.h dstring.h util.h history.h world.h socket.h macro.h \
  173.            keyboard.h output.h expand.h command1.h \
  174.             prototype.h $(MAKEFILE)
  175.  
  176. main.o: main.c tf.h dstring.h util.h history.h world.h socket.h macro.h \
  177.            output.h signal.h keyboard.h command1.h command2.h \
  178.             prototype.h $(MAKEFILE)
  179.  
  180. output.o: output.c tf.h dstring.h util.h history.h world.h socket.h macro.h \
  181.            output.h \
  182.             prototype.h $(MAKEFILE)
  183.  
  184. process.o: process.c tf.h dstring.h util.h history.h world.h socket.h macro.h \
  185.            expand.h output.h \
  186.             prototype.h $(MAKEFILE)
  187.  
  188. signal.o: signal.c tf.h dstring.h util.h history.h world.h process.h socket.h \
  189.            keyboard.h output.h \
  190.             prototype.h $(MAKEFILE)
  191.  
  192. socket.o: socket.c tf.h dstring.h util.h history.h world.h socket.h output.h \
  193.            process.h macro.h keyboard.h command1.h command2.h special.h \
  194.            signal.h tf.connect.h opensock.c \
  195.             prototype.h $(MAKEFILE)
  196.  
  197. special.o: special.c tf.h dstring.h util.h history.h world.h socket.h macro.h \
  198.            output.h \
  199.             prototype.h $(MAKEFILE)
  200.  
  201. util.o: util.c tf.h dstring.h util.h output.h macro.h socket.h keyboard.h \
  202.             prototype.h $(MAKEFILE)
  203.  
  204. world.o: world.c tf.h dstring.h util.h history.h world.h output.h macro.h \
  205.            process.h \
  206.             prototype.h $(MAKEFILE)
  207.  
  208.