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

  1. # Makefile for UnZip(SFX) and fUnZip for Borland C++ 2.x/3.0 and Turbo C++ 1.0
  2. # Version: 5.11 and later                          Alvin Koh, Jim Knoble, etc.
  3. #
  4. # Last revised:  10 Jul 94
  5.  
  6.  
  7. # for Turbo C++ uncomment this and comment out the bcc line:
  8. #CC = tcc
  9.  
  10. # for Borland C++ uncomment this and comment out the tcc line:
  11. CC = bcc
  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. # compiler flags
  30.  
  31. CFLAGS = -O -ff- -k- -P-.C -I.
  32. UNFLAGS = -m$(UNMODEL) $(CFLAGS)
  33. FUFLAGS = -m$(FUMODEL) $(CFLAGS) -K -d
  34. LDFLAGS = -lxncd        # for tcc
  35. #LDFLAGS = -lxncd -l-P          # for bcc
  36.  
  37. # implicit rules
  38.  
  39. .c.obj:
  40.     $(CC) -c $(UNFLAGS) {$< }
  41.  
  42. # list macros
  43.  
  44. unzip_dependencies = \
  45.     unzip.obj \
  46.     crypt.obj \
  47.     envargs.obj \
  48.     explode.obj \
  49.     extract.obj \
  50.     file_io.obj \
  51.     inflate.obj \
  52.     match.obj \
  53.     unreduce.obj \
  54.     unshrink.obj \
  55.     zipinfo.obj \
  56.     msdos.obj
  57.  
  58. funzip_dependencies = \
  59.     funzip.obj \
  60.     crypt_.obj \
  61.     inflate_.obj
  62.  
  63. unzipsfx_dependencies = \
  64.     unzip_.obj \
  65.     crypt.obj \
  66.     extract_.obj \
  67.     file_io.obj \
  68.     inflate.obj \
  69.     match.obj \
  70.     msdos_.obj
  71.  
  72. # explicit rules
  73.  
  74. all:    unzip.exe funzip.exe unzipsfx.exe
  75.  
  76. unzip.exe:      $(unzip_dependencies)
  77.     $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzip.exe @&&|
  78. unzip.obj
  79. crypt.obj
  80. envargs.obj
  81. explode.obj
  82. extract.obj
  83. file_io.obj
  84. inflate.obj
  85. match.obj
  86. unreduce.obj
  87. unshrink.obj
  88. zipinfo.obj
  89. msdos.obj
  90. |
  91.     $(STRIP) unzip.exe
  92.  
  93. funzip.exe:    $(funzip_dependencies)
  94.     $(CC) -m$(FUMODEL) $(LDFLAGS) -efunzip.exe @&&|
  95. funzip.obj
  96. crypt_.obj
  97. inflate_.obj
  98. |
  99.     $(STRIP) funzip.exe
  100.  
  101. unzipsfx.exe:      $(unzipsfx_dependencies)
  102.     $(CC) -m$(UNMODEL) $(LDFLAGS) -eunzipsfx.exe @&&|
  103. unzip_.obj
  104. crypt.obj
  105. extract_.obj
  106. file_io.obj
  107. inflate.obj
  108. match.obj
  109. msdos_.obj
  110. |
  111.     $(STRIP) unzipsfx.exe
  112.  
  113. # individual file dependencies
  114.  
  115. crypt.obj:      crypt.c unzip.h zip.h crypt.h
  116. envargs.obj:    envargs.c unzip.h
  117. explode.obj:    explode.c unzip.h
  118. extract.obj:    extract.c unzip.h crypt.h
  119. file_io.obj:    file_io.c unzip.h crypt.h tables.h
  120. inflate.obj:    inflate.c inflate.h unzip.h
  121. match.obj:      match.c unzip.h
  122. unreduce.obj:   unreduce.c unzip.h
  123. unshrink.obj:   unshrink.c unzip.h
  124. unzip.obj:      unzip.c unzip.h crypt.h version.h
  125. zipinfo.obj:    zipinfo.c unzip.h
  126.  
  127. msdos.obj:      msdos/msdos.c unzip.h
  128.     $(CC) -c $(UNFLAGS) msdos/msdos.c
  129.  
  130. funzip.obj:     funzip.c unzip.h crypt.h tables.h
  131.     $(CC) -c $(FUFLAGS) funzip.c
  132.  
  133. crypt_.obj:     crypt.c unzip.h zip.h crypt.h
  134.     $(CC) -c $(FUFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  135.  
  136. inflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  137.     $(CC) -c $(FUFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  138.  
  139. unzip_.obj:     unzip.c unzip.h crypt.h version.h
  140.     $(CC) -c $(UNFLAGS) -DSFX -ounzip_.obj unzip.c
  141.  
  142. extract_.obj:   extract.c unzip.h crypt.h
  143.     $(CC) -c $(UNFLAGS) -DSFX -oextract_.obj extract.c
  144.  
  145. msdos_.obj:     msdos/msdos.c unzip.h
  146.     $(CC) -c $(UNFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
  147.