home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip51.zip / msdos / makefile.msc < prev    next >
Makefile  |  1994-01-27  |  3KB  |  104 lines

  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.1 and later                      Greg Roelofs and others
  3. # Version:  Microsoft C (5.x and later)                         27 January 1994
  4. #------------------------------------------------------------------------------
  5.  
  6. # Users of MSC 6/7 and NMAKE can use the Unix Makefile (target msc_dos),
  7. # if desired.  This makefile works just fine, too, however.  OS/2 users
  8. # can cross-compile using os2/makefile.os2 (target mscdos).  Note that
  9. # there is possibly a bug in MSC 6 which screws up funzip (goes into
  10. # infinite loop? --this has not been confirmed in over a year...).  There
  11. # is definitely a bug (internal compiler error) in MSC 6.00 while com-
  12. # piling explode.c.
  13.  
  14.  
  15. #    GNU make doesn't like the return value from "rem"
  16. #STRIP=rem
  17. STRIP=echo  Ignore this line.  
  18. #    If you don't have LZEXE or PKLITE, get one of them. Then define:
  19. #STRIP=lzexe
  20. #    or
  21. #STRIP=pklite
  22. #    and remove /e from LDFLAGS.  This makes a big difference in
  23. #    .exe size (and possibly load time).
  24.  
  25. # large model (use S for more speed but no ZipInfo; may run out of memory)
  26. MODEL=L
  27.  
  28. CC = cl                    # -Ox does not work for inflate.c
  29. CFLAGS = -nologo -DMSC -Oait -Gs -I.    # add -G2(3,4) and/or -FPi87 for x86/x87
  30.  
  31. LD = link
  32. LDFLAGS = /nologo/noi/e/st:0x0c00   # remove /e if you have LZEXE or PKLITE
  33. LDFLAGS2 = ,$*;
  34.  
  35. OBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
  36. OBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj
  37. OBJS3 = msdos.obj
  38. OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
  39.  
  40. OBJF = funzip.obj crypt_.obj inflate_.obj
  41.  
  42.  
  43. default:        unzip.exe funzip.exe
  44.  
  45. .c.obj:
  46.         $(CC) -c -A$(MODEL) $(CFLAGS) $*.c
  47.  
  48. crypt.obj:        crypt.c unzip.h crypt.h zip.h
  49.  
  50. crypt_.obj:       crypt.c unzip.h crypt.h zip.h
  51.     $(CC) -c -AS $(CFLAGS) -DFUNZIP -Focrypt_.obj crypt.c
  52.  
  53. envargs.obj:      envargs.c unzip.h
  54.  
  55. explode.obj:      explode.c unzip.h
  56.  
  57. extract.obj:      extract.c unzip.h crypt.h
  58.  
  59. file_io.obj:      file_io.c unzip.h crypt.h tables.h
  60.  
  61. funzip.obj:       funzip.c unzip.h crypt.h tables.h
  62.         $(CC) -c -AS $(CFLAGS) funzip.c
  63.  
  64. inflate.obj:      inflate.c unzip.h
  65.  
  66. inflate_.obj:     inflate.c inflate.h unzip.h crypt.h
  67.     $(CC) -c -AS $(CFLAGS) -DFUNZIP -Foinflate_.obj inflate.c
  68.  
  69. match.obj:        match.c unzip.h
  70.  
  71. msdos.obj:        msdos/msdos.c unzip.h
  72.         $(CC) -c -A$(MODEL) $(CFLAGS) msdos/msdos.c
  73.  
  74. unreduce.obj:     unreduce.c unzip.h
  75.  
  76. unshrink.obj:     unshrink.c unzip.h
  77.  
  78. unzip.obj:        unzip.c unzip.h
  79.  
  80. zipinfo.obj:      zipinfo.c unzip.h
  81.  
  82.  
  83. # MS make:
  84. # -------
  85. unzip.exe:      $(OBJS)
  86.     echo $(OBJS1)+ > unzip.rsp
  87.     echo $(OBJS2)+ >> unzip.rsp
  88.     echo $(OBJS3); >> unzip.rsp
  89.     $(LD) $(LDFLAGS) @unzip.rsp
  90.     del unzip.rsp
  91.     $(STRIP) unzip.exe
  92.  
  93. # better makes which know how to deal with 128 char limit on command line:
  94. # -----------------------------------------------------------------------
  95. #unzip.exe:     $(OBJS)
  96. #    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  97. #    $(STRIP) unzip.exe
  98.  
  99. # both makes:
  100. # ----------
  101. funzip.exe:     $(OBJF)
  102.     $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2)
  103.     $(STRIP) funzip.exe
  104.