home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip532.zip / win32 / Makefile < prev    next >
Makefile  |  1997-03-09  |  4KB  |  139 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:  9 Mar 97
  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 crc32.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. OBJF  = funzip.obj crc32.obj cryptf.obj globalsf.obj inflatef.obj ttyiof.obj
  46.  
  47. UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
  48.  
  49. # cvars = $(cvars) -nologo -DMSDOS -DNO_ASM -J
  50. #cvars = $(cvars) -nologo -DNO_ASM -J -DREENTRANT
  51. cvars = $(cvars) -nologo -DNO_ASM -J
  52. #cvars = $(cvars) -nologo -DASM_CRC -J
  53.  
  54. # USER32.LIB is needed for OemToChar and related routines
  55. conlibs=$(conlibs) user32.lib
  56.  
  57. # Some optimization (if not debugging)
  58. # [GRR 950816:  Steve suggests changing optimization flags to -O2, except for
  59. #  UnZipSFX (-01)]
  60. !IFDEF NODEBUG
  61. !IF "$(CPU)" == "i386"
  62. cdebug = -Ogityb2
  63. !ELSE
  64. cdebug = -Ogitb2
  65. !ENDIF
  66. !ENDIF
  67.  
  68. # How to compile sources
  69. .c.obj:
  70.     $(cc) $(cdebug) $(cflags) $(cvars) $<
  71.  
  72. # How to link
  73. .obj.exe:
  74.    $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@
  75.  
  76.  
  77. # Default target is all the executables
  78. unzips : unzip.exe funzip.exe unzipsfx.exe
  79.  
  80.  
  81. unzip.exe:  $(OBJS)
  82. unzipsfx.exe:    $(OBJX)
  83. funzip.exe:    $(OBJF)
  84.  
  85. crc32.obj:  crc32.c $(UNZIP_H) zip.h
  86. crctab.obj:    crctab.c $(UNZIP_H) zip.h
  87. crypt.obj:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
  88. envargs.obj:    envargs.c $(UNZIP_H)
  89. explode.obj:    explode.c $(UNZIP_H)
  90. extract.obj:    extract.c $(UNZIP_H) crypt.h
  91. fileio.obj:    fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  92. funzip.obj:    funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
  93. globals.obj:    globals.c $(UNZIP_H)
  94. inflate.obj:    inflate.c inflate.h $(UNZIP_H)
  95. match.obj:    match.c $(UNZIP_H)
  96. process.obj:    process.c $(UNZIP_H)
  97. ttyio.obj:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  98. unreduce.obj:    unreduce.c $(UNZIP_H)
  99. unshrink.obj:    unshrink.c $(UNZIP_H)
  100. unzip.obj:    unzip.c $(UNZIP_H) crypt.h version.h consts.h
  101. zipinfo.obj:    zipinfo.c $(UNZIP_H)
  102.  
  103. win32.obj:  win32\win32.c $(UNZIP_H) win32\nt.h
  104.     $(cc) $(cdebug) $(cflags) $(cvars) -I. win32\win32.c
  105.  
  106. nt.obj:  win32\nt.c win32\nt.h
  107.     $(cc) $(cdebug) $(cflags) $(cvars) -I. win32\nt.c
  108.  
  109. win32_.obj: win32\win32.c $(UNZIP_H) win32\nt.h            # unzipsfx only
  110.     $(cc) $(cdebug) $(cflags) $(cvars) -I. -DSFX win32\win32.c -Fo$@
  111.  
  112. cryptf.obj:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  113.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt.c -Fo$@
  114.  
  115. extract_.obj:    extract.c $(UNZIP_H) crypt.h            # unzipsfx only
  116.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX extract.c -Fo$@
  117.  
  118. globalsx.obj:    globals.c $(UNZIP_H)                # unzipsfx only
  119.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX globals.c -Fo$@
  120.  
  121. globalsf.obj:    globals.c $(UNZIP_H)                # funzip only
  122.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP globals.c -Fo$@
  123.  
  124. inflatef.obj:    inflate.c inflate.h $(UNZIP_H) crypt.h        # funzip only
  125.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate.c -Fo$@
  126.  
  127. process_.obj:    process.c $(UNZIP_H)                # unzipsfx only
  128.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX process.c -Fo$@
  129.  
  130. ttyiof.obj:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  131.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP ttyio.c -Fo$@
  132.  
  133. unzipsfx.obj:    unzip.c $(UNZIP_H) crypt.h version.h consts.h    # unzipsfx only
  134.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX unzip.c -Fo$@
  135.  
  136. clean:
  137.     del /q $(OBJS) unzip.exe $(OBJF) funzip.exe $(OBJX) unzipsfx.exe
  138.  
  139.