home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip540.zip / flexos / makefile < prev    next >
Makefile  |  1997-07-17  |  5KB  |  194 lines

  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.2 and later                             Derek Fawcus
  3. # Version:  MetaWare High C with PAMAKE                        3 Jun 96
  4.  
  5. #
  6. ###########################################################################
  7. #
  8. #  Alter the first two macros to change the model
  9. #
  10.  
  11. MODEL        = big
  12. M        = b
  13.  
  14. #
  15. ###########################################################################
  16. #
  17. #  These two sets of prefixes are changed when swapping between the master
  18. #  and my machine.
  19. #
  20.  
  21. FL_PREFIX    = d:/flexos        # Where FlexOS is rooted
  22. #FL_PREFIX    = c:/.
  23.  
  24. #
  25. ###########################################################################
  26. #
  27. #  The following should not have to be changed - they should be automatic
  28. #  given correct values for the above.
  29. #
  30.  
  31. HC_LIB        = $(FL_PREFIX)/highc/$(MODEL)/hc$(M)e.l86
  32. PORT_LIB    = $(FL_PREFIX)/usr/portlib/$(MODEL)/prtlbhc$(M).l86
  33. PORT_OBJ    = $(FL_PREFIX)/usr/portlib/$(MODEL)/prtlbhc$(M).obj
  34.  
  35. HC_INC        = $(FL_PREFIX)/highc/inc
  36. PORT_INC    = $(FL_PREFIX)/usr/portlib/inc
  37. FLEX_INC    = $(FL_PREFIX)/usr/inc
  38.  
  39. +IPATH        = $(PORT_INC)/;$(FLEX_INC)/;
  40. #+IPATH        = $(PORT_INC)/;$(HC_INC)/;$(FLEX_INC)/;
  41.  
  42. #
  43. ###########################################################################
  44. #
  45. #  The programs to do the work.
  46. #
  47.  
  48. CC        = hc
  49. AS        = rasm86
  50. LD        = link86
  51.  
  52. #HCOPTS=-mm $(MODEL) -debug -pr flexos/hc.pro
  53. HCOPTS=-mm $(MODEL) -pr flexos/hc.pro
  54.  
  55. #
  56. ###########################################################################
  57. #
  58. #  The file extensions to build from
  59. #
  60.  
  61. .SUFFIXES:
  62. .SUFFIXES: .c .h .a86
  63.  
  64. #
  65. ###########################################################################
  66. #
  67.  
  68. # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
  69. CPU_TYP = 2
  70.  
  71. # Uncomment the following three macros to use the optimized CRC32 assembler
  72. # routine in UnZip and UnZipSFX:
  73. #ASMFLG = -DASM_CRC
  74. #ASMOBJS = crc_i86.obj
  75. #ASMOBJF = crc_i86_.obj
  76.  
  77. ASCPUFLAG = __$(CPU_TYP)86
  78.  
  79. UNZIP_H = unzip.h unzpriv.h globals.h flexos/flxcfg.h
  80.  
  81. default:        unzip.286
  82. #default:        unzip.286 funzip.286 unzipsfx.286
  83.  
  84. clean:
  85.     del *.ob?
  86.     del unzip.286
  87.     del funzip.286
  88.     del unzipsfx.*
  89.     del *.map
  90.     del *.lin
  91.     del *.sym
  92.     del *.dbg
  93.  
  94. #
  95. ###########################################################################
  96. #
  97.  
  98. .asm.obj:
  99.     $(AS) $(ASFLAGS) -D$(ASUNMODEL) $*.asm
  100.  
  101. .c.obj:
  102.     $(CC) $< $(HCOPTS) -ob $@
  103.  
  104. .c.obf:
  105.     $(CC) $< $(HCOPTS) -def FUNZIP -ob $@
  106.  
  107. .c.obs:
  108.     $(CC) $< $(HCOPTS) -def SFX -ob $@
  109.  
  110. #
  111. ###########################################################################
  112. #
  113.  
  114. crc_i86.obj: flexos/crc_i86.a86
  115.     $(AS) $(ASFLAGS) -D$(ASUNMODEL) flexos/crc_i86.a86, $*.obj ;
  116.  
  117. #
  118. #########################################################################
  119. #
  120. #  The objects to build from
  121. #
  122.  
  123. UNZIP_OBJS =    unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj \
  124.         explode.obj extract.obj fileio.obj globals.obj inflate.obj \
  125.         list.obj match.obj process.obj ttyio.obj unreduce.obj \
  126.         unshrink.obj zipinfo.obj flexos.obj $(ASMOBJS)
  127.  
  128. unzip.286: $(UNZIP_OBJS)
  129.     $(LD) $@[st[add[17e]]] = $-[input]
  130. $(PORT_OBJ),
  131. $+(${UNZIP_OBJS}),
  132. $(PORT_LIB),
  133. $(HC_LIB)
  134. <
  135.  
  136. UNZIPSFX_OBJS =    unzip.obs crc32.obj crctab.obj crypt.obj extract.obs \
  137.         fileio.obj globals.obj inflate.obj match.obj process.obs \
  138.         ttyio.obj flexos.obs $(ASMOBJS)
  139.  
  140. unzipsfx.286: $(UNZIPSFX_OBJS)
  141.     $(LD) $@[dbi,map[all],st[add[17e]]] = $-[input]
  142. $(PORT_OBJ),
  143. $+(${UNZIPSFX_OBJS}),
  144. $(PORT_LIB),
  145. $(HC_LIB)
  146. <
  147.  
  148. FUNZIP_OBJS =    funzip.obj crc32.obf crypt.obf globals.obf inflate.obf \
  149.         ttyio.obf $(ASMOBJF)
  150.  
  151. funzip.286: $(FUNZIP_OBJS)
  152.     $(LD) $@[dbi,map[all],st[add[17e]]] = $-[input]
  153. $(PORT_OBJ),
  154. $+(${FUNZIP_OBJS}),
  155. $(PORT_LIB),
  156. $(HC_LIB)
  157. <
  158.  
  159. #
  160. ###########################################################################
  161. #
  162.  
  163. unreduce.obj:    unreduce.c $(UNZIP_H)
  164. unshrink.obj:    unshrink.c $(UNZIP_H)
  165. unzip.obj:    unzip.c $(UNZIP_H) crypt.h version.h consts.h
  166. zipinfo.obj:    zipinfo.c $(UNZIP_H)
  167. process.obj:    process.c $(UNZIP_H)
  168. list.obj:    list.c $(UNZIP_H)
  169. match.obj:    match.c $(UNZIP_H)
  170. fileio.obj:    fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  171. envargs.obj:    envargs.c $(UNZIP_H)
  172. explode.obj:    explode.c $(UNZIP_H)
  173. extract.obj:    extract.c $(UNZIP_H) crypt.h
  174. crctab.obj:    crctab.c $(UNZIP_H) zip.h
  175.  
  176. flexos.obj:    flexos/flexos.c $(UNZIP_H)
  177. crc32.obj:    crc32.c $(UNZIP_H) zip.h
  178. crypt.obj:    crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h
  179. globals.obj:    globals.c $(UNZIP_H)
  180. inflate.obj:    inflate.c inflate.h $(UNZIP_H)
  181. ttyio.obj:    ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h
  182.  
  183. funzip.obj:    funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
  184. crc32.obf:    crc32.c $(UNZIP_H) zip.h
  185. crypt.obf:    crypt.c $(UNZIP_H) crypt.h ttyio.h zip.h
  186. globals.obf:    globals.c $(UNZIP_H)
  187. inflate.obf:    inflate.c inflate.h $(UNZIP_H) crypt.h
  188. ttyio.obf:    ttyio.c $(UNZIP_H) crypt.h ttyio.h zip.h
  189.  
  190. flexos.obs:    flexos/flexos.c $(UNZIP_H)
  191. extract.obs:    extract.c $(UNZIP_H) crypt.h
  192. process.obs:    process.c $(UNZIP_H)
  193. unzip.obs:    unzip.c $(UNZIP_H) crypt.h version.h consts.h
  194.