home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip540.zip / win32 / Makefile.bc < prev    next >
Makefile  |  1998-11-24  |  4KB  |  165 lines

  1. # Makefile for UnZip(SFX) and fUnZip for Borland C++ for Windows 95/NT
  2. # Version: 5.4 and later        Alvin Koh, Jim Knoble, Christian Spieler, etc.
  3. # Adapted from the MS-DOS makefile by E-Yen Tan
  4. #
  5. # Last revised:  24 Nov 98
  6. #
  7. #
  8.  
  9.  
  10. #    Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
  11. #    should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
  12. #    to the declaration of LOC here:
  13. LOC = $(LOCAL_UNZIP)
  14.  
  15. # Type for CPU required: 0: 8086, 1: 80186, 2: 80286, 3: 80386, etc.
  16. CPU_TYP = 4
  17.  
  18. # (De)Select inclusion of optimized assembler CRC32 routine:
  19. USE_ASMCRC = 0
  20.  
  21. # If you have bcc32i, you should define:
  22. # CC = bcc32i
  23. # This compiler generates a faster code.
  24. CC = bcc32
  25. AS = tasm32
  26.  
  27. !if $(USE_ASMCRC)
  28. ASMFLG = -DASM_CRC
  29. ASMOBJS = crc_i386.obj
  30. !else
  31. ASMFLG =
  32. ASMOBJS =
  33. !endif
  34.  
  35. !if $(UNCLEAN)
  36. DIRT = -DUSE_SMITH_CODE -DUSE_UNSHRINK
  37. !else
  38. DIRT =
  39. !endif
  40.  
  41. # compiler flags
  42.  
  43. ASCPUFLAG = __$(CPU_TYP)86
  44. !if $(CPU_TYP) != 0
  45. CC_CPUFLG = -$(CPU_TYP)
  46. !endif
  47. ASFLAGS = -ml -m2 -w0 -D$(ASCPUFLAG) $(LOC)
  48. CFLAGS = -O2 -w- $(CC_CPUFLG) -ff- -k- -P-.C -I. $(ASMFLG) $(LOC) $(DIRT)
  49. LDFLAGS = -lxncd -l-P        # for bcc
  50. UNFLAGS = $(CFLAGS)
  51. FUFLAGS = $(CFLAGS) -K -d
  52. SXFLAGS = $(CFLAGS)
  53.  
  54. # implicit rules
  55.  
  56. .asm.obj:
  57.     $(AS) $(ASFLAGS) $<
  58.  
  59. .c.obj:
  60.     $(CC) -c $(UNFLAGS) {$< }
  61.  
  62. # list macros
  63.  
  64. OBJU1 = unzip.obj crc32.obj crctab.obj crypt.obj envargs.obj explode.obj
  65. OBJU2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj
  66. OBJU3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj
  67. OBJUS = win32.obj nt.obj $(ASMOBJS)
  68. OBJU  = $(OBJU1) $(OBJU2) $(OBJU3) $(OBJUS)
  69. OBJF  = funzip.obj crc32.obj cryptf.obj globalsf.obj inflatef.obj \
  70.     ttyiof.obj win32f.obj $(ASMOBJS)
  71. OBJX1 = unzipsfx.obj crc32.obj crctab.obj crypt.obj extractx.obj fileio.obj
  72. OBJX2 = globals.obj inflate.obj match.obj processx.obj ttyio.obj
  73. OBJXS = win32x.obj ntx.obj $(ASMOBJS)
  74. OBJX  = $(OBJX1) $(OBJX2) $(OBJXS)
  75.  
  76. UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
  77.  
  78. # explicit rules
  79.  
  80. all:    unzip.exe funzip.exe unzipsfx.exe
  81.  
  82. unzip.exe:      $(OBJU)
  83.     $(CC) $(LDFLAGS) -eunzip.exe @&&|
  84. $(OBJU)
  85. |
  86.  
  87. funzip.exe:     $(OBJF)
  88.     $(CC) $(LDFLAGS) -efunzip.exe @&&|
  89. $(OBJF)
  90. |
  91.  
  92. unzipsfx.exe:   $(OBJX)
  93.     $(CC) $(LDFLAGS) -eunzipsfx.exe @&&|
  94. $(OBJX)
  95. |
  96.  
  97. clean:
  98.     rem Ignore any errors in the following...
  99.     -del *.obj
  100.     -del unzip.exe
  101.     -del funzip.exe
  102.     -del unzipsfx.exe
  103.  
  104. # individual file dependencies
  105.  
  106. crc32.obj:      crc32.c $(UNZIP_H) zip.h
  107. crctab.obj:     crctab.c $(UNZIP_H) zip.h
  108. crypt.obj:      crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
  109. envargs.obj:    envargs.c $(UNZIP_H)
  110. explode.obj:    explode.c $(UNZIP_H)
  111. extract.obj:    extract.c $(UNZIP_H) crypt.h
  112. fileio.obj:     fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  113. globals.obj:    globals.c $(UNZIP_H)
  114. inflate.obj:    inflate.c inflate.h $(UNZIP_H)
  115. list.obj:       list.c $(UNZIP_H)
  116. match.obj:      match.c $(UNZIP_H)
  117. process.obj:    process.c $(UNZIP_H)
  118. ttyio.obj:      ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  119. unreduce.obj:   unreduce.c $(UNZIP_H)
  120. unshrink.obj:   unshrink.c $(UNZIP_H)
  121. unzip.obj:      unzip.c $(UNZIP_H) crypt.h version.h consts.h
  122. zipinfo.obj:    zipinfo.c $(UNZIP_H)
  123.  
  124. crc_i386.obj:   win32/crc_i386.asm
  125.     $(AS) $(ASFLAGS) win32\crc_i386.asm, $*.obj ;
  126.  
  127. win32.obj:      win32/win32.c $(UNZIP_H)
  128.     $(CC) -c $(UNFLAGS) win32/win32.c
  129.  
  130. nt.obj:         win32/nt.c $(UNZIP_H)
  131.     $(CC) -c $(UNFLAGS) win32/nt.c
  132.  
  133. funzip.obj:     funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
  134.     $(CC) -c $(FUFLAGS) funzip.c
  135.  
  136. cryptf.obj:     crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
  137.     $(CC) -c $(FUFLAGS) -DFUNZIP -ocryptf.obj crypt.c
  138.  
  139. globalsf.obj:   globals.c $(UNZIP_H)
  140.     $(CC) -c $(FUFLAGS) -DFUNZIP -oglobalsf.obj globals.c
  141.  
  142. inflatef.obj:   inflate.c inflate.h $(UNZIP_H) crypt.h
  143.     $(CC) -c $(FUFLAGS) -DFUNZIP -oinflatef.obj inflate.c
  144.  
  145. ttyiof.obj:     ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  146.     $(CC) -c $(FUFLAGS) -DFUNZIP -ottyiof.obj ttyio.c
  147.  
  148. win32f.obj:     win32/win32.c $(UNZIP_H)
  149.     $(CC) -c $(FUFLAGS) -DFUNZIP -owin32f.obj win32/win32.c
  150.  
  151. unzipsfx.obj:   unzip.c $(UNZIP_H) crypt.h version.h consts.h
  152.     $(CC) -c $(SXFLAGS) -DSFX -ounzipsfx.obj unzip.c
  153.  
  154. extractx.obj:   extract.c $(UNZIP_H) crypt.h
  155.     $(CC) -c $(SXFLAGS) -DSFX -oextractx.obj extract.c
  156.  
  157. processx.obj:   process.c $(UNZIP_H)
  158.     $(CC) -c $(SXFLAGS) -DSFX -oprocessx.obj process.c
  159.  
  160. win32x.obj:     win32/win32.c $(UNZIP_H)
  161.     $(CC) -c $(SXFLAGS) -DSFX -owin32x.obj win32/win32.c
  162.  
  163. ntx.obj:        win32/nt.c $(UNZIP_H)
  164.     $(CC) -c $(SXFLAGS) -DSFX -ontx.obj win32/nt.c
  165.