home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip511.zip / msdos / makefile.msc < prev    next >
Makefile  |  1994-07-11  |  4KB  |  122 lines

  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.11 and later                     Greg Roelofs and others
  3. # Version:  Microsoft C (5.x and later)                            10 July 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 (fixed in 6.0a and 6.0ax).
  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. # small model (should work now, but if problems, use L)
  26. MODEL=S
  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. OBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj\
  41.   msdos_.obj
  42.  
  43. OBJF = funzip.obj crypt_.obj inflate_.obj
  44.  
  45.  
  46. default:        unzip.exe funzip.exe unzipsfx.exe
  47.  
  48. .c.obj:
  49.         $(CC) -c -A$(MODEL) $(CFLAGS) $*.c
  50.  
  51. crypt.obj:        crypt.c unzip.h crypt.h zip.h
  52.  
  53. crypt_.obj:       crypt.c unzip.h crypt.h zip.h
  54.     $(CC) -c -AS $(CFLAGS) -DFUNZIP -Focrypt_.obj crypt.c
  55.  
  56. envargs.obj:      envargs.c unzip.h
  57.  
  58. explode.obj:      explode.c unzip.h
  59.  
  60. extract.obj:      extract.c unzip.h crypt.h
  61.  
  62. extract_.obj:     extract.c unzip.h crypt.h
  63.         $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Foextract_.obj extract.c
  64.  
  65. file_io.obj:      file_io.c unzip.h crypt.h tables.h
  66.  
  67. funzip.obj:       funzip.c unzip.h crypt.h tables.h
  68.         $(CC) -c -AS $(CFLAGS) funzip.c
  69.  
  70. inflate.obj:      inflate.c unzip.h
  71.  
  72. inflate_.obj:     inflate.c inflate.h unzip.h crypt.h
  73.     $(CC) -c -AS $(CFLAGS) -DFUNZIP -Foinflate_.obj inflate.c
  74.  
  75. match.obj:        match.c unzip.h
  76.  
  77. msdos.obj:        msdos/msdos.c unzip.h
  78.         $(CC) -c -A$(MODEL) $(CFLAGS) msdos/msdos.c
  79.  
  80. msdos_.obj:       msdos/msdos.c unzip.h
  81.         $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Fomsdos_.obj msdos/msdos.c
  82.  
  83. unreduce.obj:     unreduce.c unzip.h
  84.  
  85. unshrink.obj:     unshrink.c unzip.h
  86.  
  87. unzip.obj:        unzip.c unzip.h crypt.h version.h
  88.  
  89. unzip_.obj:       unzip.c unzip.h crypt.h version.h
  90.         $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Founzip_.obj unzip.c
  91.  
  92. zipinfo.obj:      zipinfo.c unzip.h
  93.  
  94.  
  95. # MS make:
  96. # -------
  97. unzip.exe:      $(OBJS)
  98.     echo $(OBJS1)+ > unzip.rsp
  99.     echo $(OBJS2)+ >> unzip.rsp
  100.     echo $(OBJS3); >> unzip.rsp
  101.     $(LD) $(LDFLAGS) @unzip.rsp
  102.     del unzip.rsp
  103.     $(STRIP) unzip.exe
  104.  
  105. # better makes which know how to deal with 128 char limit on command line:
  106. # -----------------------------------------------------------------------
  107. #unzip.exe:     $(OBJS)
  108. #    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  109. #    $(STRIP) unzip.exe
  110.  
  111. # both makes:
  112. # ----------
  113. funzip.exe:     $(OBJF)
  114.     $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2)
  115.     $(STRIP) funzip.exe
  116.  
  117. unzipsfx.exe:     $(OBJX)
  118.     echo $(OBJX), $@; > unzipsfx.rsp
  119.     $(LD) $(LDFLAGS) @unzipsfx.rsp
  120.     del unzipsfx.rsp
  121.     $(STRIP) unzipsfx.exe
  122.