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

  1. #-----------------------------------------------------------------------------
  2. # Makefile for UnZip 5.11 and later                           Jean-loup Gailly
  3. # Version:  Turbo C (edit and use makefile.bc for Turbo C++)      10 July 1994
  4. #-----------------------------------------------------------------------------
  5.  
  6. #    GNU make doesn't like the return value from "rem"
  7. #STRIP=rem
  8. STRIP=echo  Ignore this line.  
  9. #    If you don't have LZEXE or PKLITE, get one of them. Then define:
  10. #STRIP=lzexe
  11. #    or
  12. #STRIP=pklite
  13. #    This makes a big difference in .exe size (and possibly load time).
  14.  
  15. # memory model for UnZip (conflicting reports on whether Turbo C can or
  16. # cannot put strings into far memory; for now assume it can and use small
  17. # model *with* ZipInfo enabled...if fails, either define NO_ZIPINFO or
  18. # use large model)   [GRR 940712:  sigh, no go--inflate fails.  Back to
  19. # large model...]
  20. #MODEL = s
  21. MODEL = l
  22.  
  23. CC = tcc
  24. LD = $(CC)
  25.  
  26. UCFLAGS = -m$(MODEL) -O -Z -I. -DFar=
  27. ULDFLAGS = -m$(MODEL)
  28.  
  29. # funzip is always small-model
  30. FCFLAGS = -ms -O -Z -I.
  31. FLDFLAGS = -ms
  32.  
  33. LDFLAGS2 =
  34.  
  35. OBJS = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj \
  36.     inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj msdos.obj
  37.  
  38. OBJX = unzip_.obj crypt.obj extract_.obj file_io.obj inflate.obj match.obj \
  39.     msdos_.obj
  40.  
  41. OBJF = funzip.obj crypt_.obj inflate_.obj
  42.  
  43. default:        unzip.exe funzip.exe unzipsfx.exe
  44.  
  45. clean:
  46.     rem Ignore any errors in the following...
  47.     del *.ob
  48.     del *.obj
  49.     del unzip.exe
  50.     del funzip.exe
  51.  
  52. .c.obj:
  53.         $(CC) -c $(UCFLAGS) $*.c
  54.  
  55. crypt.obj:      crypt.c unzip.h crypt.h zip.h
  56.  
  57. crypt_.obj:     crypt.c unzip.h crypt.h zip.h
  58.     $(CC) -c $(FCFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  59.  
  60. envargs.obj:    envargs.c unzip.h
  61.  
  62. explode.obj:    explode.c unzip.h
  63.  
  64. extract.obj:    extract.c unzip.h crypt.h
  65.  
  66. extract_.obj:   extract.c unzip.h crypt.h
  67.     $(CC) -c $(UCFLAGS) -DSFX -oextract_.obj extract.c
  68.  
  69. file_io.obj:    file_io.c unzip.h crypt.h tables.h
  70.  
  71. funzip.obj:     funzip.c unzip.h crypt.h tables.h
  72.     $(CC) -c $(FCFLAGS) funzip.c
  73.  
  74. inflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  75.     $(CC) -c $(FCFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  76.  
  77. inflate.obj:    inflate.c inflate.h unzip.h
  78.  
  79. match.obj:      match.c unzip.h
  80.  
  81. msdos.obj:      msdos/msdos.c unzip.h
  82.         $(CC) -c $(UCFLAGS) msdos/msdos.c
  83.  
  84. msdos_.obj:     msdos/msdos.c unzip.h
  85.     $(CC) -c $(UCFLAGS) -DSFX -omsdos_.obj msdos/msdos.c
  86.  
  87. unreduce.obj:   unreduce.c unzip.h
  88.  
  89. unshrink.obj:   unshrink.c unzip.h
  90.  
  91. unzip.obj:      unzip.c unzip.h crypt.h version.h
  92.  
  93. unzip_.obj:     unzip.c unzip.h crypt.h version.h
  94.     $(CC) -c $(UCFLAGS) -DSFX -ounzip_.obj unzip.c
  95.  
  96. zipinfo.obj:    zipinfo.c unzip.h
  97.  
  98.  
  99. # Turbo Make which cannot deal with the MS-DOS 128 byte limit:
  100. # -----------------------------------------------------------
  101. unzip.exe: $(OBJS)
  102.     rem   Ignore any warnings in the following commands:
  103.     del funzip.ob
  104.     ren funzip.obj *.ob
  105.     del crypt_.ob
  106.     ren crypt_.obj *.ob
  107.     del inflate_.ob
  108.     ren inflate_.obj *.ob
  109.     $(LD) $(ULDFLAGS) -eunzip.exe *.obj
  110.     ren *.ob *.obj
  111.     $(STRIP) unzip.exe
  112.  
  113. # better makes which know how to deal with 128 char limit on command line:
  114. # -----------------------------------------------------------------------
  115. #unzip.exe:     $(OBJS)
  116. #    $(LD) $(ULDFLAGS) $(OBJS) $(LDFLAGS2)
  117. #    $(STRIP) unzip.exe
  118.  
  119. # both makes:
  120. # ----------
  121. funzip.exe:     $(OBJF)
  122.     $(LD) $(FLDFLAGS) $(OBJF) $(LDFLAGS2)
  123.     $(STRIP) funzip.exe
  124.  
  125. unzipsfx.exe:     $(OBJX)
  126.     $(LD) $(ULDFLAGS) $(OBJX) $(LDFLAGS2)
  127.     rename unzip_.exe unzipsfx.exe
  128.     $(STRIP) unzipsfx.exe
  129.