Makefile.qdos 3.7 KB

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