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