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

  1. # Makefile for UnZip and fUnZip for Turbo C++ 1.0 and Borland C++ 2.x/3.0
  2. # Version: 5.1 and later                                         Alvin Koh
  3. #
  4. # Last revised:  6 Feb 94
  5.  
  6.  
  7. # for Turbo C++ uncomment these and comment out the bcc lines:
  8. #CC = tcc
  9. #TLINK = tlink
  10.  
  11. # for Borland C++ uncomment these and comment out the tcc lines:
  12. CC = bcc
  13. TLINK = tlink /P-
  14.  
  15. #TASM = tasm    # not used
  16.  
  17. #MODEL = s    # small model for UnZip (no ZipInfo)
  18. MODEL = l    # large model for UnZip (code doesn't fit in compact anymore)
  19.  
  20. #    GNU make doesn't like the return value from "rem"
  21. #STRIP=rem
  22. STRIP=echo  Ignore this line.  
  23. #    If you don't have LZEXE or PKLITE, get one of them. Then define:
  24. #STRIP=lzexe
  25. #    or
  26. #STRIP=pklite
  27. #    This makes a big difference in .exe size (and possibly load time).
  28.  
  29.  
  30. # compiler flags
  31.  
  32. CFLAGS = -O -ff- -k- -P-.C -I.
  33. UNFLAGS = -m$(MODEL) $(CFLAGS)
  34. FUFLAGS = -ms $(CFLAGS) -K -d    # funzip is always small-model
  35.  
  36. # implicit rules
  37.  
  38. .c.obj:
  39.     $(CC) -c $(UNFLAGS) {$< }
  40.  
  41. # list macros
  42.  
  43. unzip_dependencies = \
  44.     unzip.obj \
  45.     crypt.obj \
  46.     envargs.obj \
  47.     explode.obj \
  48.     extract.obj \
  49.     file_io.obj \
  50.     inflate.obj \
  51.     match.obj \
  52.     unreduce.obj \
  53.     unshrink.obj \
  54.     zipinfo.obj \
  55.     msdos.obj
  56.  
  57. funzip_dependencies = \
  58.     funzip.obj \
  59.     crypt_.obj \
  60.     inflate_.obj
  61.  
  62. # explicit rules
  63.  
  64. all:    unzip.exe funzip.exe
  65.  
  66. unzip.exe:      $(unzip_dependencies)
  67.     $(TLINK) /x/n/c/d @&&|
  68. c0$(MODEL).obj+
  69. unzip.obj+
  70. crypt.obj+
  71. envargs.obj+
  72. explode.obj+
  73. extract.obj+
  74. file_io.obj+
  75. inflate.obj+
  76. match.obj+
  77. unreduce.obj+
  78. unshrink.obj+
  79. zipinfo.obj+
  80. msdos.obj
  81. unzip.exe
  82.                 # no map file
  83. emu.lib+
  84. math$(MODEL).lib+
  85. c$(MODEL).lib
  86. |
  87.     $(STRIP) unzip.exe
  88.  
  89. funzip.exe:    $(funzip_dependencies)
  90.     $(TLINK) /x/n/c/d @&&|
  91. c0s.obj+
  92. funzip.obj+
  93. crypt_.obj+
  94. inflate_.obj
  95. funzip.exe
  96.                 # no map file
  97. emu.lib+
  98. maths.lib+
  99. cs.lib
  100. |
  101.     $(STRIP) funzip.exe
  102.  
  103. # individual file dependencies
  104.  
  105. crypt.obj:      crypt.c unzip.h zip.h crypt.h
  106. envargs.obj:    envargs.c unzip.h
  107. explode.obj:    explode.c unzip.h
  108. extract.obj:    extract.c unzip.h crypt.h
  109. file_io.obj:    file_io.c unzip.h crypt.h tables.h
  110. inflate.obj:    inflate.c inflate.h unzip.h
  111. match.obj:      match.c unzip.h
  112. unreduce.obj:   unreduce.c unzip.h
  113. unshrink.obj:   unshrink.c unzip.h
  114. unzip.obj:      unzip.c unzip.h
  115. zipinfo.obj:    zipinfo.c unzip.h
  116.  
  117. msdos.obj:      msdos/msdos.c unzip.h
  118.     $(CC) -c $(UNFLAGS) msdos/msdos.c
  119.  
  120. funzip.obj:     funzip.c unzip.h crypt.h tables.h
  121.     $(CC) -c $(FUFLAGS) funzip.c
  122.  
  123. crypt_.obj:     crypt.c unzip.h zip.h crypt.h
  124.     $(CC) -c $(FUFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  125.  
  126. inflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  127.     $(CC) -c $(FUFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  128.