home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / z / zcrypt10.zip / MAKEFILE < prev    next >
Text File  |  1991-10-03  |  5KB  |  159 lines

  1. # Makefile for Zip, ZipNote, ZipCloak, ZipSplit, and Ship.
  2.  
  3. # what you can make ...
  4. default:
  5.     @echo ''
  6.     @echo 'Make what?  You must say what system to make Zip for--e.g.'
  7.     @echo '"make bsd".  Choices: bsd, bsdold, sysv, sun, next, next10,'
  8.     @echo 'hpux, dnix, cray, 3b1, zilog, aux, convex, aix, and minix.'
  9.     @echo 'See the file zip.doc for more information.'
  10.     @echo ''
  11.  
  12. # variables (to use the Gnu compiler, change cc to gcc in CC and BIND)
  13. MAKE = make
  14. CC = cc
  15. BIND = cc
  16. RENAME = mv
  17.  
  18. # flags
  19. #   CFLAGS    flags for C compile
  20. #   LFLAGS1   flags after output file spec, before obj file list
  21. #   LFLAGS2   flags after obj file list (libraries, etc)
  22. CFLAGS =
  23. LFLAGS1 =
  24. LFLAGS2 = -s
  25.  
  26. # object file lists
  27. OBJZ = zip.o zipfile.o zipup.o fileio.o util.o tempf.o shrink.o crypt.o globals.o
  28. OBJI = implode.o im_lmat.o im_ctree.o im_bits.o
  29. OBJN = zipnote.o zipfile_.o zipup_.o fileio_.o globals.o
  30. OBJC = zipcloak.o zipfile_.o zipup_.o fileio_.o util_.o crypt_.o globals.o
  31. OBJS = zipsplit.o zipfile_.o zipup_.o fileio_.o globals.o
  32.  
  33. # suffix rules
  34. .SUFFIXES:
  35. .SUFFIXES: _.o .o .c .doc .1
  36. .c_.o:
  37.     $(RENAME) $< $*_.c
  38.     $(CC) $(CFLAGS) -DUTIL -c $*_.c
  39.     $(RENAME) $*_.c $<
  40. .c.o:
  41.     $(CC) $(CFLAGS) -c $<
  42. .1.doc:
  43.     nroff -man $< | col -b > $@
  44.  
  45. # rules for zip, zipnote, zipcloak, zipsplit, and zip.doc.
  46. $(OBJZ): zip.h ziperr.h tempf.h tailor.h
  47. $(OBJI): implode.h crypt.h ziperr.h tempf.h tailor.h
  48. $(OBJN): zip.h ziperr.h tailor.h
  49. $(OBJC): zip.h ziperr.h tailor.h
  50. $(OBJS): zip.h ziperr.h tailor.h
  51. zip.o zipup.o zipnote.o zipcloak.o zipsplit.o: revision.h
  52. zips: zip zipnote zipcloak zipsplit ship
  53. zipsman: zip zipnote zipcloak zipsplit ship zip.doc
  54. zip: $(OBJZ) $(OBJI)
  55.     $(BIND) -o zip $(LFLAGS1) $(OBJZ) $(OBJI) $(LFLAGS2)
  56. zipnote: $(OBJN)
  57.     $(BIND) -o zipnote $(LFLAGS1) $(OBJN) $(LFLAGS2)
  58. zipcloak: $(OBJC)
  59.     $(BIND) -o zipcloak $(LFLAGS1) $(OBJC) $(LFLAGS2)
  60. zipsplit: $(OBJS)
  61.     $(BIND) -o zipsplit $(LFLAGS1) $(OBJS) $(LFLAGS2)
  62. ship: ship.c
  63.     $(CC) $(CFLAGS) -o ship $(LFLAGS1) ship.c $(LFLAGS2)
  64.  
  65. # These symbols, when #defined using -D have these effects on compilation:
  66. # ZMEM        - includes C language versions of memset(), memcpy(), and
  67. #          memcmp() (util.c).
  68. # DIRENT    - use <sys/dirent.h> and getdents() instead of <sys/dir.h>
  69. #          and opendir(), etc. (fileio.c).
  70. # NODIR        - used for 3B1, which has neither getdents() nor opendir().
  71. # NDIR        - use "ndir.h" instead of <sys/dir.h> (fileio.c).
  72. # UTIL        - select routines for utilities (note, cloak, and split).
  73. # PROTO        - enable function prototypes.
  74. # RMDIR        - remove directories using a system("rmdir ...") call.
  75. # CONVEX    - for Convex make target.
  76. # AIX        - for AIX make target.
  77. # EXPORT    - leave out the encryption code.
  78.  
  79. # BSD 4.3 (also Unisys 7000--AT&T System V with heavy BSD 4.2)
  80. bsd:
  81.     $(MAKE) zips CFLAGS="-O"
  82.  
  83. # BSD, but missing memset(), memcmp().
  84. bsdold:
  85.     $(MAKE) zips CFLAGS="-O -DZMEM"
  86.  
  87. # AT&T System V, Rel 3.  Also SCO, Xenix, OpenDeskTop, ETA-10P*, SGI.
  88. sysv:
  89.     $(MAKE) zips CFLAGS="-O -DDIRENT"
  90.  
  91. # DNIX 5.x: like System V but optimization is messed up.
  92. dnix:
  93.     $(MAKE) zips CFLAGS="-DDIRENT"
  94.  
  95. # Sun OS 4.x: BSD, but use getdents().
  96. sun:
  97.     $(MAKE) zips CFLAGS="-O -DDIRENT"
  98.  
  99. # NeXT 1.0: BSD, but use shared library.
  100. next10:
  101.     $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -lsys_s"
  102.  
  103. # NeXT 2.0: BSD, but use MH_OBJECT format for smaller executables.
  104. next:
  105.     $(MAKE) zips CFLAGS="-O" LFLAGS2="-s -object"
  106.  
  107. # HPUX: System V, but use <ndir.h> and opendir(), etc.
  108. hpux:
  109.     $(MAKE) zips CFLAGS="-O -DNDIR"
  110.  
  111. # Cray Unicos 5.1.10 & 6.0.11, Standard C compiler 2.0
  112. cray:
  113.     $(MAKE) zips CFLAGS="-O -DDIRENT" CC="scc"
  114.  
  115. # AT&T 3B1: System V, but missing a few things.
  116. 3b1:
  117.     $(MAKE) zips CFLAGS="-O -DNODIR -DRMDIR"
  118.  
  119. # zilog zeus 3.21
  120. zilog:
  121.     $(MAKE) zips CFLAGS="-O -DZMEM -DNDIR -DRMDIR" CC="scc -i"
  122.  
  123. # SCO 386 cross compile for MS-DOS
  124. # Note: zip.exe should be lzexe'd on DOS to reduce its size
  125. scodos:
  126.     $(MAKE) zips CFLAGS="-O -Ms -dos -DNO_ASM" LFLAGS1="-Ms -dos" \
  127.      LFLAGS2=""
  128.     $(RENAME) zip zip.exe
  129.  
  130. # A/UX:
  131. aux:
  132.     $(MAKE) zips CFLAGS="-O -DTERMIO"
  133.  
  134. # Convex C220, OS 9.0
  135. convex:
  136.     $(MAKE) zips CFLAGS="-O2 -rl -DCONVEX"
  137.  
  138. # AIX Version 3.1 for RISC System/6000 
  139. aix:
  140.     $(MAKE) zips CC="c89" BIND="c89" \
  141.        CFLAGS="-O -D_POSIX_SOURCE -D_ALL_SOURCE -D_BSD -DAIX"
  142.  
  143. # MINIX 1.5.10 with Bruce Evans 386 patches and gcc/GNU make
  144. minix:
  145.     $(MAKE) zips CFLAGS="-O -DDIRENT -DMINIX" CC=gcc BIND=gcc
  146.     chmem =262144 zip
  147.  
  148. # clean up after making stuff and installing it
  149. clean:
  150.     rm -f *.o
  151.     rm -f zip zipnote zipcloak zipsplit ship
  152.  
  153. # This one's for my own use during development.
  154. it:
  155.     $(MAKE) zipsman CFLAGS="-O -Wall -DPROTO" LFLAGS2="-s -object"\
  156.     VPATH="${HOME}/Unix/bin"
  157.  
  158. # end of Makefile
  159.