home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / _archvrs / unix / unzip51 / msdos / makefile < prev    next >
Encoding:
Makefile  |  1992-10-15  |  3.9 KB  |  143 lines

  1. #------------------------------------------------------------------------------
  2. # Makefile for UnZip 5.x and ZipInfo 1.x                Greg Roelofs and others
  3. # Version:  Microsoft C 5.x / Turbo C                           15 October 1992
  4. #------------------------------------------------------------------------------
  5.  
  6. # Comment/uncomment appropriate sections for your compiler.  Users of MSC 6
  7. # and NMAKE can use the main Makefile (target msc_dos).  Note that there is
  8. # possibly a bug in MSC 6 which screws up funzip (goes into infinite loop?).
  9.  
  10.  
  11. #####################
  12. # MACRO DEFINITIONS #
  13. #####################
  14.  
  15. STRIP=rem
  16. #    If you don't have LZEXE or PKLITE, get one of them. Then define:
  17. #STRIP=lzexe
  18. #    or
  19. #STRIP=pklite
  20. #    and remove /e from LDFLAGS.  This makes a big difference in
  21. #    .exe size (and possibly load time).
  22.  
  23.  
  24. # MSC 5.x-7.x for MS-DOS:
  25. # ----------------------
  26. CC = cl                # -Ox does not work for inflate.c
  27. CFLAGS = -AS -Oait -Gs        # add -G2 (G3, G4) and/or -FPi87 for 80x86/80x87
  28. LD = link
  29. LDFLAGS = /NOI/e/st:0x1000    # remove /e if you have LZEXE or PKLITE
  30. LDFLAGS2 = ,$*;
  31.  
  32. # Turbo C 2.0 for MS-DOS:
  33. # ----------------------
  34. ## tcc is usually configured with -I and -L set appropriately...
  35. #INCL = #-Ic:\turboc\include
  36. #LIBS = c:\turboc\lib\cs.lib    # or \tc\lib\cs.lib, or ... (truly necessary?)
  37. #CC = tcc
  38. #CFLAGS = -ms -O -Z $(INCL)    # add -1 for 80286 instructions
  39. #LD = tlink
  40. #LDFLAGS = /c/x
  41. #LDFLAGS2 = $(LIBS)
  42.  
  43.  
  44. OBJS1 = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj
  45. OBJS2 = inflate.obj mapname.obj match.obj misc.obj unreduce.obj unshrink.obj
  46. OBJS3 = msdos.obj
  47. OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
  48.  
  49. OBJZ = zipinfo.obj envargs.obj match.obj
  50.  
  51. OBJF = funzip.obj inflate.obj
  52.  
  53.  
  54. ###############################################
  55. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  56. ###############################################
  57.  
  58. default:        unzip.exe zipinfo.exe funzip.exe
  59.  
  60. .c.obj:
  61.         $(CC) -c $(CFLAGS) $*.c
  62.  
  63. crypt.obj:      crypt.c unzip.h crypt.h zip.h
  64.  
  65. envargs.obj:    envargs.c unzip.h
  66.  
  67. explode.obj:    explode.c unzip.h
  68.  
  69. extract.obj:    extract.c unzip.h crypt.h
  70.  
  71. file_io.obj:    file_io.c unzip.h crypt.h
  72.  
  73. funzip.obj:     funzip.c unzip.h crypt.h crypt.c zip.h
  74.  
  75. inflate.obj:    inflate.c unzip.h
  76.  
  77. mapname.obj:    mapname.c unzip.h
  78.  
  79. match.obj:      match.c unzip.h
  80.  
  81. misc.obj:       misc.c unzip.h
  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
  88.  
  89. zipinfo.obj:    zipinfo.c unzip.h file_io.c misc.c
  90.  
  91.  
  92.  
  93. # DOS/MS make:
  94. # -----------
  95. unzip.exe:      $(OBJS)
  96.     echo $(OBJS1)+ > unzip.rsp
  97.     echo $(OBJS2)+ >> unzip.rsp
  98.     echo $(OBJS3); >> unzip.rsp
  99.     $(LD) $(LDFLAGS) @unzip.rsp
  100.     del unzip.rsp
  101.     $(STRIP) unzip.exe
  102.  
  103. # DOS/Borland tmake:   (is there a way to do this using the OBJS macros?)
  104. # -----------------
  105. #unzip.exe:     $(OBJS)
  106. #    echo \tc\lib\c0s.obj+ > unzip.rsp
  107. #    echo unzip+          >> unzip.rsp
  108. #    echo crypt+          >> unzip.rsp
  109. #    echo envargs+        >> unzip.rsp
  110. #    echo explode+        >> unzip.rsp
  111. #    echo extract+        >> unzip.rsp
  112. #    echo file_io+        >> unzip.rsp
  113. #    echo inflate+        >> unzip.rsp
  114. #    echo mapname+        >> unzip.rsp
  115. #    echo match+          >> unzip.rsp
  116. #    echo misc+           >> unzip.rsp
  117. #    echo unreduce+       >> unzip.rsp
  118. #    echo unshrink+       >> unzip.rsp
  119. #    echo msdos           >> unzip.rsp
  120. #    echo $(LDFLAGS)      >> unzip.rsp
  121. #    echo unzip.exe       >> unzip.rsp
  122. ##    echo $(LDFLAGS2)     >> unzip.rsp   # is this line (cs.lib) necessary?
  123. #    $(LD) @unzip.rsp
  124. #    del unzip.rsp
  125. #    $(STRIP) unzip.exe
  126.  
  127. # DOS/better makes which know how to deal with 128 char limit on command line:
  128. # ---------------------------------------------------------------------------
  129. #unzip.exe:     $(OBJS)
  130. #    $(LD) $(LDFLAGS) $(OBJS) $(LDFLAGS2)
  131.  
  132.  
  133.  
  134. # Both makes:
  135. # ----------
  136. zipinfo.exe:    $(OBJZ)
  137.     $(LD) $(LDFLAGS) $(OBJZ) $(LDFLAGS2)
  138.     $(STRIP) zipinfo.exe
  139.  
  140. funzip.exe:     $(OBJF)
  141.     $(LD) $(LDFLAGS) $(OBJF) $(LDFLAGS2)
  142.     $(STRIP) funzip.exe
  143.