home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOO21E.EXE / MAKEFILE < prev    next >
Text File  |  1991-07-11  |  10KB  |  262 lines

  1. # derived from: @(#) makefile 2.2 88/01/27 19:37:59
  2. # $Id: makefile,v 1.22 91/07/09 04:10:38 dhesi Exp $
  3. # Make Zoo
  4. #
  5. #The contents of this makefile are hereby released to the public domain.
  6. #                                  -- Rahul Dhesi 1991/07/05
  7. #
  8. # This makefile expects two macro names, `CFLAGS' and `EXTRA', to hold
  9. # all the switches to be supplied to the C compiler.  It also expects
  10. # a macro `LDFLAGS' to hold the switch for the loader when invoked.
  11. # The macro "MODEL" holds switches needed for both compile and link,
  12. # such as "memory model" for Intel and Z8000 processors. OPTIM is the
  13. # optimize option and may be set on the make command line to -O2 or
  14. # whatever your compiler thinks is nice.
  15. #
  16. # To run lint, select an appropriate lint_* target (e.g. "make lint_sysv").
  17.  
  18.  
  19. MAKE = make          # needed for some systems e.g. older BSD
  20.  
  21. CC = cc
  22. CFLAGS =
  23. MODEL =
  24. EXTRA = -DBIG_MEM -DNDEBUG
  25. LINTFLAGS = -DLINT
  26. OPTIM = -O
  27. DESTDIR = /usr/local/bin
  28.  
  29. #List of all object files created for Zoo
  30. ZOOOBJS = addbfcrc.o addfname.o basename.o comment.o crcdefs.o \
  31.         getfile.o lzc.o lzd.o machine.o makelist.o misc.o misc2.o \
  32.         nextfile.o needed.o options.o parse.o portable.o prterror.o \
  33.         version.o zoo.o zooadd.o zooadd2.o zoodel.o zooext.o zoofilt.o \
  34.         zoolist.o zoopack.o io.o lzh.o maketbl.o maketree.o huf.o \
  35.         encode.o decode.o
  36.  
  37. FIZOBJS = fiz.o addbfcrc.o portable.o crcdefs.o
  38.  
  39. .c.o :
  40.     $(CC) $(CFLAGS) $(MODEL) $(EXTRA) $*.c
  41.  
  42. all :
  43.     @echo 'There is no default.  Please specify an appropriate target from'
  44.     @echo 'the makefile, or type "make help" for more information'
  45.  
  46. help :
  47.     @echo "Possible targets are as follows.  Please examine the makefile"
  48.     @echo "for more information."
  49.     @echo ' '
  50.     @echo "generic:      generic **IX environment, minimal functionlity"
  51.     @echo "bsd:          4.3BSD or reasonable equivalent"
  52.     @echo "bsdansi:      4.3BSD with ANSI C"
  53.     @echo "ultrix:       ULTRIX 4.1"
  54.     @echo "convex:       Convex C200 series"
  55.     @echo "sysv:         System V Release 2 or 3; or SCO Xenix"
  56.     @echo "scodos:       Cross-compiler under SCO Xenix/UNIX for MS-DOS"
  57.     @echo "xenix286:     Older Xenix/286 (not tested)"
  58.     @echo "xenix68k:     Xenix/68000 (not tested)"
  59.     @echo ' '
  60.     @echo "install:      Move zoo to $(DESTDIR)/tzoo (alpha test)"
  61.     @echo "inst_beta:    Move zoo to $(DESTDIR)/bzoo (beta test)"
  62.     @echo "inst_prod:    Move zoo to $(DESTDIR)/zoo  (production)"
  63.     @echo ' '
  64.     @echo "lint_sysv:    Run lint for System V"
  65.     @echo "lint_bsd:     Run lint for 4.3BSD"
  66.     @echo "lint_generic: Run lint for generic **IX"
  67.     @echo "lint_turboc:  Run lint under **IX for checking Turbo C/MSDOS code"
  68.  
  69. # install alpha zoo as "tzoo"
  70. install:
  71.     mv zoo $(DESTDIR)/tzoo
  72.  
  73. # install beta zoo as "bzoo"
  74. inst_beta:
  75.     mv zoo $(DESTDIR)/bzoo
  76.  
  77. # install production zoo as "zoo"
  78. inst_prod:
  79.     mv zoo $(DESTDIR)/zoo
  80.  
  81. # executable targets
  82. TARGETS = zoo fiz
  83.  
  84. #######################################################################
  85. # SYSTEM-SPECIFIC TARGETS
  86. #######################################################################
  87.  
  88. # A generic system -- may have less than full functionality.
  89. # Compile with -g, since debugging will probably be needed.
  90. generic:
  91.     $(MAKE) CFLAGS="-c -g -DGENERIC" $(TARGETS)
  92.  
  93. # Reasonably generic BSD 4.3
  94. bsd:
  95.     $(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3" $(TARGETS)
  96.  
  97. # ULTRIX 4.1
  98. ultrix:
  99.     $(MAKE) CFLAGS="-c $(OPTIM) -DULTRIX" $(TARGETS)
  100.  
  101. # BSD with ANSI C - works on MIPS and Ultrix/RISC compilers
  102. bsdansi:
  103.     $(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)
  104.  
  105. # Convex C200 series
  106. convex:
  107.     $(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)
  108.  
  109. # SysV.2, V.3, SCO Xenix
  110. sysv:
  111.     $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS)
  112.  
  113. # DOS version cross compiled from SCO Xenix/UNIX
  114. scodos:
  115.     $(MAKE) CFLAGS="-c $(OPTIM) -DTURBOC -DANSI_HDRS -DBIG_MEM" \
  116.         EXTRA="-dos -Ml" LDFLAGS="-o zoo.exe" $(TARGETS)
  117.  
  118. # Tested for zoo 2.01 on: Xenix 3.4 on Greg Laskin's Intel 310/286;
  119. # SCO Xenix 2.2 on Robert Cliff's AT.
  120. # `-Ml' for large memory model, `-M2' to generate code for 80286 cpu,
  121. # `-F xxxx' for xxxx (hex) bytes of stack space.
  122. xenix286:
  123.     @echo "Warning: xenix286 is not fully functional"
  124.     $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" \
  125.         MODEL="-Ml -M2 -Md" \
  126.         LDFLAGS="-s -n -Md -Mt500 -F 5000" $(TARGETS)
  127.  
  128. # Radio Shack Model 16 with Xenix/68000 3.01.01. "-DM_VOID" tells not
  129. # to try to do a typedef of `void'. "-Dvoid=int" because compiler doesn't
  130. # know about `void'.  `-s -n' strips and makes it shareable.  Used to work
  131. # with zoo 2.01; not tested with 2.1.
  132. xenix68k:
  133.     $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V -DM_VOID -Dvoid=int" \
  134.         LDFLAGS="-s -n" $(TARGETS)
  135.  
  136. #######################################################################
  137. # CLEANUP TARGETS
  138. #######################################################################
  139.  
  140. # standard clean -- remove all transient files
  141. clean :
  142.     rm -f core a.out $(ZOOOBJS) $(FIZOBJS)
  143.  
  144. # object clean only -- just remove object files
  145. objclean:
  146.     rm -f *.o
  147.  
  148. #######################################################################
  149. # BINARY TARGETS
  150. #######################################################################
  151.  
  152. zoo: $(ZOOOBJS)
  153.     $(CC) -o zoo $(MODEL) $(LDFLAGS) $(ZOOOBJS)
  154.  
  155. fiz: $(FIZOBJS)
  156.     $(CC) -o fiz $(MODEL) $(LDFLAGS) $(FIZOBJS)
  157.  
  158. #######################################################################
  159. # SELECTED TARGETS FOR LINT
  160. #######################################################################
  161.  
  162. # generic system V
  163. lint_sysv:
  164.     echo $(ZOOOBJS) | sed -e 's/\.o/.c/g' | \
  165.     xargs lint -DSYS_V $(EXTRA) $(LINTFLAGS) | \
  166.     grep -v 'possible pointer alignment problem'
  167.  
  168. # generic BSD
  169. lint_bsd:
  170.     echo $(ZOOOBJS) | sed -e 's/\.o/.c/g' | \
  171.     xargs lint -DBSD4_3 $(EXTRA) $(LINTFLAGS) | \
  172.     grep -v 'possible pointer alignment problem'
  173.  
  174. # generic **IX
  175. lint_generic:
  176.     echo $(ZOOOBJS) | sed -e 's/\.o/.c/g' | \
  177.     xargs lint -DGENERIC $(EXTRA) $(LINTFLAGS) | \
  178.     grep -v 'possible pointer alignment problem'
  179.  
  180. # Cross-lint for checking Turbo C code under **IX.  For checking only;
  181. # compilation requires separate makefile called "makefile.tcc"
  182. lint_turboc:
  183.     echo $(ZOOOBJS) turboc.c | sed -e 's/\.o/.c/g' | \
  184.     xargs lint -DTURBOC -DCROSS_LINT $(EXTRA) $(LINTFLAGS)
  185.  
  186. #######################################################################
  187. # DEPENDENCIES
  188. #######################################################################
  189. # DO NOT DELETE THIS LINE -- it marks the beginning of this dependency list
  190.  
  191. addbfcrc.o: options.h
  192. addfname.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h
  193. addfname.o: zoomem.h
  194. basename.o: /usr/include/stdio.h assert.h debug.h options.h parse.h various.h
  195. basename.o: zoo.h zoofns.h zooio.h
  196. bsd.o: /usr/include/sys/stat.h /usr/include/sys/time.h
  197. bsd.o: /usr/include/sys/types.h nixmode.i nixtime.i
  198. comment.o: /usr/include/signal.h /usr/include/stdio.h
  199. comment.o: /usr/include/sys/signal.h errors.i options.h portable.h various.h
  200. comment.o: zoo.h zoofns.h zooio.h
  201. crcdefs.o: options.h
  202. decode.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h
  203. encode.o: /usr/include/assert.h /usr/include/stdio.h ar.h errors.i lzh.h
  204. encode.o: options.h zoo.h
  205. fiz.o: /usr/include/stdio.h options.h portable.h various.h zoo.h zoofns.h
  206. fiz.o: zooio.h
  207. generic.o: /usr/include/sys/stat.h /usr/include/sys/types.h
  208. generic.o: /usr/include/time.h nixmode.i nixtime.i
  209. getfile.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h
  210. getfile.o: zoomem.h
  211. huf.o: /usr/include/stdio.h ar.h errors.i lzh.h options.h zoo.h
  212. io.o: /usr/include/stdio.h ar.h errors.i lzh.h options.h portable.h zoo.h
  213. io.o: zooio.h
  214. lzc.o: /usr/include/stdio.h assert.h debug.h lzconst.h options.h various.h
  215. lzc.o: zoo.h zoofns.h zooio.h zoomem.h
  216. lzd.o: /usr/include/stdio.h assert.h debug.h lzconst.h options.h various.h
  217. lzd.o: zoo.h zoofns.h zooio.h zoomem.h
  218. lzh.o: /usr/include/stdio.h ar.h errors.i options.h zoo.h
  219. machine.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h
  220. makelist.o: /usr/include/stdio.h assert.h debug.h errors.i options.h
  221. makelist.o: portable.h various.h zoo.h zoofns.h zooio.h
  222. maketbl.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h
  223. maketree.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h
  224. misc.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
  225. misc.o: errors.i options.h portable.h various.h zoo.h zoofns.h zooio.h
  226. misc2.o: /usr/include/stdio.h errors.i options.h portable.h various.h zoo.h
  227. misc2.o: zoofns.h zooio.h zoomem.h
  228. msdos.o: /usr/include/stdio.h errors.i options.h zoo.h zoofns.h zooio.h
  229. needed.o: /usr/include/stdio.h debug.h options.h portable.h various.h zoo.h
  230. needed.o: zoofns.h zooio.h
  231. nextfile.o: /usr/include/stdio.h options.h various.h zoo.h
  232. options.o: /usr/include/stdio.h errors.i options.h various.h zoo.h zoofns.h
  233. options.o: zooio.h
  234. parse.o: /usr/include/stdio.h assert.h options.h parse.h various.h zoo.h
  235. parse.o: zoofns.h zooio.h
  236. portable.o: /usr/include/stdio.h assert.h debug.h machine.h options.h
  237. portable.o: portable.h various.h zoo.h zoofns.h zooio.h
  238. prterror.o: /usr/include/stdio.h /usr/include/varargs.h options.h various.h
  239. prterror.o: zoofns.h zooio.h
  240. sysv.o: /usr/include/sys/stat.h /usr/include/sys/types.h /usr/include/time.h
  241. sysv.o: nixmode.i nixtime.i
  242. turboc.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
  243. vms.o: /usr/include/time.h
  244. vmstime.o: /usr/include/stdio.h
  245. zoo.o: /usr/include/stdio.h errors.i options.h various.h zoo.h zoofns.h
  246. zoo.o: zooio.h zoomem.h
  247. zooadd.o: /usr/include/stdio.h debug.h errors.i options.h parse.h portable.h
  248. zooadd.o: various.h zoo.h zoofns.h zooio.h zoomem.h
  249. zooadd2.o: /usr/include/stdio.h assert.h debug.h errors.i options.h parse.h
  250. zooadd2.o: various.h zoo.h zoofns.h zooio.h
  251. zoodel.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
  252. zoodel.o: errors.i options.h portable.h various.h zoo.h zoofns.h zooio.h
  253. zooext.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h
  254. zooext.o: errors.i machine.h options.h parse.h portable.h various.h zoo.h
  255. zooext.o: zoofns.h zooio.h
  256. zoofilt.o: options.h
  257. zoolist.o: /usr/include/stdio.h errors.i options.h portable.h various.h zoo.h
  258. zoolist.o: zoofns.h zooio.h zoomem.h
  259. zoopack.o: /usr/include/signal.h /usr/include/stdio.h
  260. zoopack.o: /usr/include/sys/signal.h errors.i options.h portable.h various.h
  261. zoopack.o: zoo.h zoofns.h zooio.h
  262.