home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip512.zip / nt / Makefile < prev    next >
Makefile  |  1994-07-11  |  3KB  |  101 lines

  1. # NMAKE Makefile for Windows NT
  2. #   D. Feinleib 7/92 t-davefe@microsoft.com
  3. #   H. Gessau 9/93 <henryg@kullmar.kullmar.se>
  4. #
  5. # Last revised:  10 Jul 94
  6. #
  7. # Tested with NT SDK, VC++ 1.0 for NT, and DEC C/C++ beta.
  8. #
  9. # For DEC C/C++, comment out the "cdebug = -Ogityb2" line (or 
  10. # define debug?).  [Jack Stansbury]
  11.  
  12. # Nmake macros for building Windows NT applications
  13. # To build with debug info use 'nmake debug=1'
  14. !IFNDEF debug
  15. NODEBUG=1
  16. !ENDIF
  17. !include <ntwin32.mak>
  18.  
  19. # object files
  20. OBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
  21. OBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj nt.obj
  22. OBJS  = $(OBJS1) $(OBJS2)
  23. OBJX1 = unzipsfx.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj
  24. OBJX2 = nt_.obj
  25. OBJX  = $(OBJX1) $(OBJX2)
  26. OBJF  = funzip.obj crypt_.obj inflate_.obj
  27.  
  28. # cvars = $(cvars) -nologo -DMSDOS -DNO_ASM -J
  29. cvars = $(cvars) -nologo -DNO_ASM -J
  30.  
  31. # Some optimization (if not debugging)
  32. !IFDEF NODEBUG
  33. cdebug = -Ogityb2
  34. !ENDIF
  35.  
  36. # How to compile sources
  37. .c.obj:
  38.     $(cc) $(cdebug) $(cflags) $(cvars) $<
  39.  
  40. # How to link
  41. .obj.exe:
  42.     $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@
  43.  
  44.  
  45. # Default target is all the executables
  46. unzips : unzip.exe funzip.exe unzipsfx.exe
  47.  
  48.  
  49. unzip.exe:    $(OBJS)
  50. unzipsfx.exe:    $(OBJX)
  51. funzip.exe:    $(OBJF)
  52.  
  53. crypt.obj:    crypt.c unzip.h zip.h crypt.h
  54. envargs.obj:    envargs.c unzip.h
  55. explode.obj:    explode.c unzip.h
  56. extract.obj:    extract.c unzip.h crypt.h
  57. file_io.obj:    file_io.c unzip.h crypt.h tables.h
  58. funzip.obj:    funzip.c unzip.h crypt.h tables.h
  59. inflate.obj:    inflate.c inflate.h unzip.h
  60. match.obj:    match.c unzip.h
  61. unreduce.obj:    unreduce.c unzip.h
  62. unshrink.obj:    unshrink.c unzip.h
  63. unzip.obj:    unzip.c unzip.h crypt.h version.h
  64. zipinfo.obj:    zipinfo.c unzip.h
  65.  
  66. nt.obj:     nt\nt.c unzip.h
  67.     $(cc) $(cdebug) $(cflags) $(cvars) -I. nt\nt.c
  68.     
  69. nt_.obj:     nt\nt.c unzip.h                    # unzipsfx only
  70.     copy nt\nt.c nt_.c
  71.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX nt_.c
  72.     del nt_.c
  73.     
  74. crypt_.obj:    crypt.c unzip.h zip.h crypt.h            # funzip only
  75.     copy crypt.c crypt_.c
  76.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt_.c
  77.     del crypt_.c
  78.  
  79. extract_.obj:    extract.c unzip.h crypt.h            # unzipsfx only
  80.     copy extract.c extract_.c
  81.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX extract_.c
  82.     del extract_.c
  83.  
  84. inflate_.obj:    inflate.c inflate.h unzip.h crypt.h        # funzip only
  85.     copy inflate.c inflate_.c
  86.     $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate_.c
  87.     del inflate_.c
  88.  
  89. unzipsfx.obj:    unzip.c unzip.h    crypt.h version.h        # unzipsfx only
  90.     copy unzip.c unzipsfx.c
  91.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX unzipsfx.c
  92.     del unzipsfx.c
  93.   
  94. zipinfo_.obj:    zipinfo.c unzip.h                # unzipsfx only
  95.     copy zipinfo.c zipinfo_.c
  96.     $(cc) $(cdebug) $(cflags) $(cvars) -DSFX zipinfo_.c
  97.     del zipinfo_.c
  98.   
  99. clean:
  100.     del /q $(OBJS) unzip.exe $(OBJF) funzip.exe $(OBJX) unzipsfx.exe
  101.