home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip22.zip / qdos / Makefile.qdos < prev    next >
Makefile  |  1997-10-24  |  4KB  |  144 lines

  1. include /etc/ql.mak
  2.  
  3. # Makefile for Zip, ZipNote, ZipCloak and ZipSplit
  4.  
  5. MAKE = make
  6. SHELL = /bin/sh
  7.  
  8. #
  9. BIND = $(CC)
  10.  
  11. # probably can change this to 'install' if you have it
  12. INSTALL = cp
  13.  
  14. # target directories - where to install executables and man pages to
  15. BINDIR =
  16. manext=1
  17. MANDIR =
  18. ZIPMANUAL = MANUAL
  19.  
  20. # flags
  21. #   CFLAGS    flags for C compile
  22. #   LFLAGS1   flags after output file spec, before obj file list
  23. #   LFLAGS2   flags after obj file list (libraries, etc)
  24. CFLAGS = -O -DASMV -DASM_CRC
  25. LFLAGS1 = -v
  26. #LFLAGS2 = -lutime
  27.  
  28. all: zip
  29.  
  30. # object file lists
  31. OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o qdos.o ttyio.o
  32. OBJI = deflate.o trees.o bits.o qfileio.o crctab.o
  33. OBJA = config.o crc68.o match.o
  34. #  crc32.o
  35. OBJQ = qdos_.o config.o qfileio_.o
  36. OBJU = zipfile_.o zipup_.o fileio_.o util_.o globals.o $(OBJQ)
  37. OBJN = zipnote.o  $(OBJU)
  38. OBJC = zipcloak.o $(OBJU) crypt_.o
  39. OBJS = zipsplit.o $(OBJU)
  40.  
  41.  
  42. # suffix rules
  43. .SUFFIXES:
  44. .SUFFIXES: _.o .o .c .doc .1
  45. .c_.o:
  46.     rm -f $*_.c; ln $< $*_.c
  47.     $(CC) $(CFLAGS) -DUTIL -c $*_.c
  48.     rm -f $*_.c
  49. .c.o:
  50.     $(CC) $(CFLAGS) -c $<
  51.  
  52. .1.doc:
  53.     nroff -man $< | col -b | uniq > $@
  54.  
  55. # rules for zip, zipnote, zipcloak, zipsplit, and zip.doc.
  56. $(OBJZ): zip.h ziperr.h tailor.h
  57. $(OBJI): zip.h ziperr.h tailor.h
  58. $(OBJN): zip.h ziperr.h tailor.h
  59. $(OBJS): zip.h ziperr.h tailor.h
  60. $(OBJC): zip.h ziperr.h tailor.h
  61. zip.o zipup.o crypt.o bits.o zipup_.o zipcloak.o crypt_.o:  crypt.h
  62.  
  63. qfileio.o: qdos/qfileio.c
  64.     cp qdos/qfileio.c qfileio.c
  65.     $(CC) $(CFLAGS) -c qfileio.c
  66.     rm -f qfileio.c
  67.  
  68. qfileio_.o: qdos/qfileio.c
  69.     cp qdos/qfileio.c qfileio_.c
  70.     $(CC) $(CFLAGS) -c qfileio_.c
  71.     rm -f qfileio_.c
  72.  
  73. match.o: qdos/match.s
  74.     cp qdos/match.s ./_match.s
  75.     $(AS) _match.s -o match.o
  76.     rm -f _match.s
  77.  
  78. crc68.o: qdos/crc68.s
  79.     cp qdos/crc68.s ./crc68.s
  80.     $(AS) crc68.s -o crc68.o
  81.     rm -f crc68.s
  82.  
  83. config.o: qdos/config.s
  84.     cp qdos/config.s ./config.s
  85.     $(CC) -c -DZIP config.s -o config.o
  86.     rm -f config.s
  87.  
  88. ZIPS = zip$E zipnote$E zipsplit$E zipcloak$E
  89.  
  90. zip.o zipup.o zipnote.o zipcloak.o zipsplit.o: revision.h
  91. zips: $(ZIPS)
  92. zipsman: $(ZIPS) $(ZIPMANUAL)
  93.  
  94. qdos.o:   qdos/qdos.c
  95.     cp qdos/qdos.c .
  96.     $(CC) -c -oqdos.o qdos.c
  97.     rm -f qdos.c
  98.  
  99. qdos_.o:  qdos/qdos.c
  100.     cp qdos/qdos.c ./qdos_.c
  101.     $(CC) -DUTIL -c -oqdos_.o qdos_.c
  102.     rm -f qdos_.c
  103.  
  104. zip$E: $(OBJZ) $(OBJI) $(OBJA)
  105.     $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
  106. zipnote$E: $(OBJN)
  107.     $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2)
  108. zipcloak$E: $(OBJC)
  109.     $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2)
  110. zipsplit$E: $(OBJS)
  111.     $(BIND) -o zipsplit$E $(LFLAGS1) $(OBJS) $(LFLAGS2)
  112.  
  113. $(ZIPMANUAL): man/zip.1
  114.     nroff -man man/zip.1 | col -b | uniq > $(ZIPMANUAL)
  115.  
  116. # install
  117. install:        $(ZIPS)
  118.     $(INSTALL) $(ZIPS) $(BINDIR)
  119.     $(INSTALL) man/zip.1 $(MANDIR)/zip.$(manext)
  120.  
  121. uninstall:
  122.     -cd $(BINDIR); rm -f $(ZIPS)
  123.     -cd $(MANDIR); rm -f zip.$(manext)
  124.  
  125. flags:  configure
  126.     sh configure flags
  127.  
  128. # These symbols, when #defined using -D have these effects on compilation:
  129. # ZMEM          - includes C language versions of memset(), memcpy(), and
  130. #                 memcmp() (util.c).
  131. # SYSV          - use <sys/dirent.h> and the library opendir()
  132. # DIRENT        - use <sys/dirent.h> and getdents() instead of <sys/dir.h>
  133. #                 and opendir(), etc. (fileio.c).
  134. # NODIR         - used for 3B1, which has neither getdents() nor opendir().
  135. # NDIR          - use "ndir.h" instead of <sys/dir.h> (fileio.c).
  136. # UTIL          - select routines for utilities (note, cloak, and split).
  137. # PROTO         - enable function prototypes.
  138. # RMDIR         - remove directories using a system("rmdir ...") call.
  139. # CONVEX        - for Convex make target.
  140. # AIX           - for AIX make target.
  141. # LINUX         - for linux make target.
  142.  
  143. # end of Makefile
  144.