home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip512.zip / msdos / makefile.bc < prev    next >
Makefile  |  1994-08-12  |  3KB  |  153 lines

  1. # Makefile for UnZip(SFX) and fUnZip for Borland C++ 2.x/3.0 and Turbo C++ 1.0
  2. # Version: 5.12 and later        Alvin Koh, Jim Knoble, Christian Spieler, etc.
  3. #
  4. # Last revised:  11 Aug 94
  5.  
  6.  
  7. # for Borland C++ uncomment this and comment out the tcc line:
  8. CC = bcc
  9.  
  10. # for Turbo C++ uncomment this and comment out the bcc line:
  11. #CC = tcc
  12.  
  13. #TASM = tasm    # not used
  14.  
  15. #UNMODEL = s     # small model for UnZip and ZipInfo, now that strings moved
  16. UNMODEL = l     # large model for UnZip (M. Lawler/BC 4.0:  _text > 64K w/ "s")
  17. FUMODEL = s     # always use small model for fUnZip
  18.  
  19. #    GNU make doesn't like the return value from "rem"
  20. #STRIP=rem
  21. STRIP=echo  Ignore this line.  
  22. #    If you don't have LZEXE or PKLITE, get one of them. Then define:
  23. #STRIP=lzexe
  24. #    or
  25. #STRIP=pklite
  26. #    This makes a big difference in .exe size (and possibly load time).
  27.  
  28.  
  29. #    Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
  30. #    should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
  31. #    to the declaration of LOC here:
  32. LOC = $(LOCAL_UNZIP)
  33.  
  34.  
  35. # compiler flags
  36.  
  37. CFLAGS = -O -ff- -k- -P-.C -I. $(LOC)
  38. UNFLAGS = -m$(UNMODEL) $(CFLAGS)
  39. FUFLAGS = -m$(FUMODEL) $(CFLAGS) -K -d
  40. LDFLAGS = -lxncd -l-P          # for bcc
  41. #LDFLAGS = -lxncd        # for tcc
  42.  
  43. # implicit rules
  44.  
  45. .c.obj:
  46.     $(CC) -c $(UNFLAGS) {$< }
  47.  
  48. # list macros
  49.  
  50. unzip_dependencies = \
  51.     unzip.obj \
  52.     crypt.obj \
  53.     envargs.obj \
  54.     explode.obj \
  55.     extract.obj \
  56.     file_io.obj \
  57.     inflate.obj \
  58.     match.obj \
  59.     unreduce.obj \
  60.     unshrink.obj \
  61.     zipinfo.obj \
  62.     msdos.obj
  63.  
  64. funzip_dependencies = \
  65.     funzip.obj \
  66.     crypt_.obj \
  67.     inflate_.obj
  68.  
  69. unzipsfx_dependencies = \
  70.     unzip_.obj \
  71.     crypt.obj \
  72.     extract_.obj \
  73.     file_io.obj \
  74.     inflate.obj \
  75.     match.obj \
  76.     msdos_.obj
  77.  
  78. # explicit rules
  79.  
  80. all:    unzip.exe funzip.exe unzipsfx.exe
  81.  
  82. unzip.exe:      $(unzip_dependencies)
  83.     $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzip.exe @&&|
  84. unzip.obj
  85. crypt.obj
  86. envargs.obj
  87. explode.obj
  88. extract.obj
  89. file_io.obj
  90. inflate.obj
  91. match.obj
  92. unreduce.obj
  93. unshrink.obj
  94. zipinfo.obj
  95. msdos.obj
  96. |
  97.     $(STRIP) unzip.exe
  98.  
  99. funzip.exe:    $(funzip_dependencies)
  100.     $(CC) -m$(FUMODEL) $(LDFLAGS) -efunzip.exe @&&|
  101. funzip.obj
  102. crypt_.obj
  103. inflate_.obj
  104. |
  105.     $(STRIP) funzip.exe
  106.  
  107. unzipsfx.exe:      $(unzipsfx_dependencies)
  108.     $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzipsfx.exe @&&|
  109. unzip_.obj
  110. crypt.obj
  111. extract_.obj
  112. file_io.obj
  113. inflate.obj
  114. match.obj
  115. msdos_.obj
  116. |
  117.     $(STRIP) unzipsfx.exe
  118.  
  119. # individual file dependencies
  120.  
  121. crypt.obj:      crypt.c unzip.h zip.h crypt.h
  122. envargs.obj:    envargs.c unzip.h
  123. explode.obj:    explode.c unzip.h
  124. extract.obj:    extract.c unzip.h crypt.h
  125. file_io.obj:    file_io.c unzip.h crypt.h tables.h
  126. inflate.obj:    inflate.c inflate.h unzip.h
  127. match.obj:      match.c unzip.h
  128. unreduce.obj:   unreduce.c unzip.h
  129. unshrink.obj:   unshrink.c unzip.h
  130. unzip.obj:      unzip.c unzip.h crypt.h version.h
  131. zipinfo.obj:    zipinfo.c unzip.h
  132.  
  133. msdos.obj:      msdos/msdos.c unzip.h
  134.     $(CC) -c $(UNFLAGS) msdos/msdos.c
  135.  
  136. funzip.obj:     funzip.c unzip.h crypt.h tables.h
  137.     $(CC) -c $(FUFLAGS) funzip.c
  138.  
  139. crypt_.obj:     crypt.c unzip.h zip.h crypt.h
  140.     $(CC) -c $(FUFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  141.  
  142. inflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  143.     $(CC) -c $(FUFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  144.  
  145. unzip_.obj:     unzip.c unzip.h crypt.h version.h
  146.     $(CC) -c $(UNFLAGS) -DSFX -ounzip_.obj unzip.c
  147.  
  148. extract_.obj:   extract.c unzip.h crypt.h
  149.     $(CC) -c $(UNFLAGS) -DSFX -oextract_.obj extract.c
  150.  
  151. msdos_.obj:     msdos/msdos.c unzip.h
  152.     $(CC) -c $(UNFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
  153.