home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / UNZP50P1.ZIP / MSDOS / makefile < prev    next >
Makefile  |  1993-01-23  |  3KB  |  126 lines

  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.x and ZipInfo 1.x                Greg Roelofs and others
  3. # Version:  Microsoft C 5.x / Turbo C                              24 June 1992
  4. #------------------------------------------------------------------------------
  5.  
  6. # Comment/uncomment appropriate sections for your compiler.  Users of MSC 6
  7. # and NMAKE should use the main Makefile, targets msc_dos and zi_dos.
  8. #
  9. # Latest revisions:  26 June 1992
  10.  
  11.  
  12. #####################
  13. # MACRO DEFINITIONS #
  14. #####################
  15.  
  16. CRYPTF =
  17. CRYPTO =
  18. # Uncomment the following two lines for decryption version:
  19. #CRYPTF = -DCRYPT
  20. #CRYPTO = crypt.obj
  21.  
  22. STRIP=rem
  23. #    If you don't have lzexe, get it. Then define:
  24. #STRIP=lzexe
  25. #    and remove /e from LDFLAGS
  26. #    This makes a big difference in .exe size (and possibly load time).
  27.  
  28.  
  29. # MSC for MS-DOS:
  30. # --------------
  31. CC = cl
  32. CFLAGS = -AS -Oait -Gs -G2 $(CRYPTF)   # add -G2 and/or -FPi87 for 80286/80x87
  33. INCL =                                 # (-Ox does not work for inflate.c)
  34. LD = link
  35. LDFLAGS = /NOI/e/st:0x1000
  36. # remove /e in above line if you have lzexe
  37. LDFLAGS2 = ,$*;
  38.  
  39. # Turbo C 2.0 for MS-DOS:
  40. # ----------------------
  41. ## tcc is usually configured with -I and -L set appropriately...
  42. #CC = tcc
  43. #CFLAGS = -ms -O -Z $(CRYPTF)           # add -1 for 80286 instructions
  44. #INCL = #-Ic:\turboc\include
  45. #LD = tcc
  46. #LDFLAGS = -ms #-Lc:\turboc\lib
  47. #LDFLAGS2 =
  48.  
  49.  
  50. OBJS1 = unzip.obj $(CRYPTO) envargs.obj explode.obj extract.obj file_io.obj
  51. OBJS2 = inflate.obj mapname.obj match.obj misc.obj unreduce.obj unshrink.obj
  52.  
  53. ZI_OBJS = zipinfo.obj envargs.obj match.obj misc_.obj
  54.  
  55.  
  56. ###############################################
  57. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  58. ###############################################
  59.  
  60. default:        unzip.exe zipinfo.exe
  61.  
  62. .c.obj:
  63.         $(CC) -c $(CFLAGS) $(INCL) $*.c
  64.  
  65. unzip.obj:      unzip.c unzip.h
  66.  
  67. crypt.obj:      crypt.c unzip.h zip.h    # may or may not be in distribution
  68.  
  69. envargs.obj:    envargs.c unzip.h
  70.  
  71. explode.obj:    explode.c unzip.h
  72.  
  73. extract.obj:    extract.c unzip.h
  74.  
  75. file_io.obj:    file_io.c unzip.h
  76.  
  77. inflate.obj:    inflate.c unzip.h
  78.  
  79. mapname.obj:    mapname.c unzip.h
  80.  
  81. match.obj:      match.c unzip.h
  82.  
  83. misc.obj:       misc.c unzip.h
  84.  
  85. misc_.obj:      misc.c unzip.h
  86.     copy misc.c misc_.c
  87.         $(CC) -c $(CFLAGS) -DZIPINFO $(INCL) misc_.c
  88.     del misc_.c
  89.  
  90. unreduce.obj:   unreduce.c unzip.h
  91.  
  92. unshrink.obj:   unshrink.c unzip.h
  93.  
  94.  
  95.  
  96. # DOS/MS make:
  97. # -----------
  98. unzip.exe:      $(OBJS1) $(OBJS2)
  99.     echo $(OBJS1)+ > unzip.rsp
  100.     echo $(OBJS2); >> unzip.rsp
  101.     $(LD) $(LDFLAGS) @unzip.rsp
  102.     del unzip.rsp
  103.     $(STRIP) unzip.exe
  104.  
  105. # DOS/Borland tmake:  (not tested:  may need to use tlink instead)
  106. # -----------------
  107. #unzip.exe:     $(OBJS1) $(OBJS2)
  108. #    $(LD) $(LDFLAGS) @&&|
  109. #$(OBJS1)+
  110. #$(OBJS2)
  111. #|
  112. #    $(STRIP) unzip.exe
  113.  
  114. # DOS/better makes which know how to deal with 128 char limit on command line:
  115. # ---------------------------------------------------------------------------
  116. #unzip.exe:     $(OBJS)
  117. #    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  118.  
  119.  
  120.  
  121. # Both makes:  (not tested)
  122. # ----------
  123. zipinfo.exe:    $(ZI_OBJS)
  124.     $(LD) $(LDFLAGS) $(ZI_OBJS) $(LDFLAGS2)
  125.     $(STRIP) zipinfo.exe
  126.