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

  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.11 and later                     Greg Roelofs and others
  3. # Version:  Microsoft C (5.x and later)                          11 August 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, 6.0ax, 6.0ax2, 7.*, 8.*).
  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. #    Optional nonstandard preprocessor flags (as -DCHECK_EOF or -DDOS_WILD)
  26. #    should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
  27. #    to the declaration of LOC here:
  28. LOC = $(LOCAL_UNZIP) 
  29.  
  30. # small model (should work now, but if problems, use L)
  31. MODEL=S
  32.  
  33. CC = cl        # -Ox does not work for inflate.c
  34. # add -G2(3,4) for 286 (386, 486) and/or -FPi87 for 80x87:
  35. CFLAGS = -nologo -DMSC $(LOC) -Oait -Gs -I.
  36.  
  37. LD = link
  38. LDFLAGS = /nologo/noi/e/st:0x0c00   # remove /e if you have LZEXE or PKLITE
  39. LDFLAGS2 = ,$*;
  40.  
  41. OBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
  42. OBJS2 = inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj
  43. OBJS3 = msdos.obj
  44. OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
  45.  
  46. OBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj\
  47.   msdos_.obj
  48.  
  49. OBJF = funzip.obj crypt_.obj inflate_.obj
  50.  
  51.  
  52. default:        unzip.exe funzip.exe unzipsfx.exe
  53.  
  54. .c.obj:
  55.         $(CC) -c -A$(MODEL) $(CFLAGS) $*.c
  56.  
  57. crypt.obj:        crypt.c unzip.h crypt.h zip.h
  58.  
  59. crypt_.obj:       crypt.c unzip.h crypt.h zip.h
  60.     $(CC) -c -AS $(CFLAGS) -DFUNZIP -Focrypt_.obj crypt.c
  61.  
  62. envargs.obj:      envargs.c unzip.h
  63.  
  64. explode.obj:      explode.c unzip.h
  65.  
  66. extract.obj:      extract.c unzip.h crypt.h
  67.  
  68. extract_.obj:     extract.c unzip.h crypt.h
  69.         $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Foextract_.obj extract.c
  70.  
  71. file_io.obj:      file_io.c unzip.h crypt.h tables.h
  72.  
  73. funzip.obj:       funzip.c unzip.h crypt.h tables.h
  74.         $(CC) -c -AS $(CFLAGS) funzip.c
  75.  
  76. inflate.obj:      inflate.c unzip.h
  77.  
  78. inflate_.obj:     inflate.c inflate.h unzip.h crypt.h
  79.     $(CC) -c -AS $(CFLAGS) -DFUNZIP -Foinflate_.obj inflate.c
  80.  
  81. match.obj:        match.c unzip.h
  82.  
  83. msdos.obj:        msdos/msdos.c unzip.h
  84.         $(CC) -c -A$(MODEL) $(CFLAGS) msdos/msdos.c
  85.  
  86. msdos_.obj:       msdos/msdos.c unzip.h
  87.         $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Fomsdos_.obj msdos/msdos.c
  88.  
  89. unreduce.obj:     unreduce.c unzip.h
  90.  
  91. unshrink.obj:     unshrink.c unzip.h
  92.  
  93. unzip.obj:        unzip.c unzip.h crypt.h version.h
  94.  
  95. unzip_.obj:       unzip.c unzip.h crypt.h version.h
  96.         $(CC) -c -A$(MODEL) $(CFLAGS) -DSFX -Founzip_.obj unzip.c
  97.  
  98. zipinfo.obj:      zipinfo.c unzip.h
  99.  
  100.  
  101. # MS make:
  102. # -------
  103. unzip.exe:      $(OBJS)
  104.     echo $(OBJS1)+ > unzip.rsp
  105.     echo $(OBJS2)+ >> unzip.rsp
  106.     echo $(OBJS3); >> unzip.rsp
  107.     $(LD) $(LDFLAGS) @unzip.rsp
  108.     del unzip.rsp
  109.     $(STRIP) unzip.exe
  110.  
  111. # better makes which know how to deal with 128 char limit on command line:
  112. # -----------------------------------------------------------------------
  113. #unzip.exe:     $(OBJS)
  114. #    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  115. #    $(STRIP) unzip.exe
  116.  
  117. # both makes:
  118. # ----------
  119. funzip.exe:     $(OBJF)
  120.     $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2)
  121.     $(STRIP) funzip.exe
  122.  
  123. unzipsfx.exe:     $(OBJX)
  124.     echo $(OBJX), $@; > unzipsfx.rsp
  125.     $(LD) $(LDFLAGS) @unzipsfx.rsp
  126.     del unzipsfx.rsp
  127.     $(STRIP) unzipsfx.exe
  128.