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

  1. # NMAKE Makefile for Windows NT/Windows 95
  2. #   D. Feinleib 7/92 <t-davefe@microsoft.com>
  3. #   H. Gessau 9/93 <henryg@kullmar.kullmar.se>
  4. #   J. Lee 8/95 (johnnyl@microsoft.com)
  5. #
  6. # Last revised:  24 Nov 98
  7. #
  8. # Tested with VC++ 2.0 for NT for MIPS and Alpha, Visual C++ 2.2 for Intel CPUs
  9. #
  10.  
  11. # Nmake macros for building Windows NT applications
  12. # To build with debug info use 'nmake debug=1'
  13. !IFNDEF debug
  14. NODEBUG=1
  15. !ENDIF
  16.  
  17. !IF "$(CPU)" == ""  &&  "$(PROCESSOR_ARCHITECTURE)" == "x86"
  18. CPU = i386
  19. !ENDIF
  20. !IF "$(CPU)" == ""  &&  "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
  21. CPU = $(PROCESSOR_ARCHITECTURE)
  22. !ENDIF
  23. !IF "$(CPU)" == ""  &&  "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
  24. CPU = $(PROCESSOR_ARCHITECTURE)
  25. !ENDIF
  26. !IF "$(CPU)" == ""  &&  "$(PROCESSOR_ARCHITECTURE)" == "PPC"
  27. CPU = $(PROCESSOR_ARCHITECTURE)
  28. !ENDIF
  29. !IF "$(CPU)" == ""
  30. CPU = i386
  31. !ENDIF
  32.  
  33. !include <ntwin32.mak>
  34.  
  35. # object files
  36. OBJS1 = unzip.obj $(CRC32).obj crctab.obj crypt.obj envargs.obj explode.obj
  37. OBJS2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj
  38. OBJS3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj
  39. OBJS4 = win32.obj nt.obj
  40. OBJS  = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
  41. OBJX1 = unzipsfx.obj $(CRC32X).obj crctab.obj crypt.obj extract_.obj fileio.obj
  42. OBJX2 = globalsx.obj inflate.obj match.obj process_.obj ttyio.obj
  43. OBJX3 = win32_.obj nt.obj
  44. OBJX  = $(OBJX1) $(OBJX2) $(OBJX3)
  45. OBJF1 = funzip.obj $(CRC32F).obj cryptf.obj globalsf.obj inflatef.obj ttyiof.obj
  46. OBJF2 = win32f.obj
  47. OBJF  = $(OBJF1) $(OBJF2)
  48.  
  49. UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
  50.  
  51. #CF_LOC = -DMSDOS -DNO_ASM -J
  52. #CF_LOC = -nologo -DNO_ASM -J -DREENTRANT
  53. CF_LOC = -nologo -DNO_ASM -J
  54. #CF_LOC = -nologo -DASM_CRC -J
  55.  
  56. cvars = $(cvars) $(CF_LOC)
  57.  
  58. CRC32 = crc32
  59. #CRC32 = crc_i386
  60. CRC32X = $(CRC32)
  61. CRC32F = $(CRC32)
  62.  
  63. # USER32.LIB is needed for OemToChar and related routines
  64. conlibs=$(conlibs) user32.lib
  65.  
  66. # Some optimization (if not debugging)
  67. # [GRR 950816:  Steve suggests changing optimization flags to -O2, except for
  68. #  UnZipSFX (-01)]
  69. !IFDEF NODEBUG
  70. !IF "$(CPU)" == "i386"
  71. cdebug = -Ogityb2
  72. !ELSE
  73. cdebug = -Ogitb2
  74. !ENDIF
  75. !ENDIF
  76.  
  77. # How to compile sources
  78. .c.obj:
  79.     $(cc) $(cdebug) $(cflags) $(cvars) -o $@ $<
  80.  
  81. # How to link
  82. .obj.exe:
  83.    $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@
  84.  
  85.  
  86. # Default target is all the executables
  87. unzips : unzip.exe funzip.exe unzipsfx.exe
  88.  
  89.  
  90. unzip.exe:  $(OBJS)
  91. unzipsfx.exe:    $(OBJX)
  92. funzip.exe:    $(OBJF)
  93.  
  94. crc32.obj:    crc32.c $(UNZIP_H) zip.h
  95. crctab.obj:    crctab.c $(UNZIP_H) zip.h
  96. crypt.obj:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
  97. envargs.obj:    envargs.c $(UNZIP_H)
  98. explode.obj:    explode.c $(UNZIP_H)
  99. extract.obj:    extract.c $(UNZIP_H) crypt.h
  100. fileio.obj:    fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  101. funzip.obj:    funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
  102. globals.obj:    globals.c $(UNZIP_H)
  103. inflate.obj:    inflate.c inflate.h $(UNZIP_H)
  104. match.obj:    match.c $(UNZIP_H)
  105. process.obj:    process.c $(UNZIP_H)
  106. ttyio.obj:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  107. unreduce.obj:    unreduce.c $(UNZIP_H)
  108. unshrink.obj:    unshrink.c $(UNZIP_H)
  109. unzip.obj:    unzip.c $(UNZIP_H) crypt.h version.h consts.h
  110. zipinfo.obj:    zipinfo.c $(UNZIP_H)
  111.  
  112. win32.obj:  win32\win32.c $(UNZIP_H) win32\nt.h
  113.     $(cc) $(cdebug) $(cflags) $(cvars) -I. win32\win32.c
  114.  
  115. nt.obj:  win32\nt.c win32\nt.h
  116.     $(cc) $(cdebug) $(cflags) $(cvars) -I. win32\nt.c
  117.  
  118. crc_i386.obj:    win32/crc_i386.asm
  119.     masm -ml win32/crc_i386.asm,$@;
  120.  
  121. win32_.obj: win32\win32.c $(UNZIP_H) win32\nt.h            # unzipsfx only
  122.     $(cc) $(cdebug) $(cflags) $(cvars) -I. -DSFX win32\win32.c -Fo$@
  123.  
  124. win32f.obj: win32\win32.c $(UNZIP_H) win32\nt.h            # funzip only
  125.     $(cc) $(cdebug) $(cflags) $(cvars) -I. -DFUNZIP win32\win32.c -Fo$@
  126.  
  127. cryptf.obj:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  128.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt.c -Fo$@
  129.  
  130. extract_.obj:    extract.c $(UNZIP_H) crypt.h            # unzipsfx only
  131.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX extract.c -Fo$@
  132.  
  133. globalsx.obj:    globals.c $(UNZIP_H)                # unzipsfx only
  134.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX globals.c -Fo$@
  135.  
  136. globalsf.obj:    globals.c $(UNZIP_H)                # funzip only
  137.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP globals.c -Fo$@
  138.  
  139. inflatef.obj:    inflate.c inflate.h $(UNZIP_H) crypt.h        # funzip only
  140.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate.c -Fo$@
  141.  
  142. process_.obj:    process.c $(UNZIP_H)                # unzipsfx only
  143.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX process.c -Fo$@
  144.  
  145. ttyiof.obj:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  146.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP ttyio.c -Fo$@
  147.  
  148. unzipsfx.obj:    unzip.c $(UNZIP_H) crypt.h version.h consts.h    # unzipsfx only
  149.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX unzip.c -Fo$@
  150.  
  151. clean:
  152.     del /q $(OBJS) unzip.exe $(OBJF) funzip.exe $(OBJX) unzipsfx.exe
  153.  
  154.