home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip51.zip / msdos / makefile.tc < prev    next >
Makefile  |  1993-12-21  |  3KB  |  108 lines

  1. #-----------------------------------------------------------------------------
  2. # Makefile for UnZip 5.1 and later                            Jean-loup Gailly
  3. # Version:  Turbo C (use makefile.bc for Turbo C++)           21 December 1993
  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 (use s for speed & no ZipInfo; may run out of memory)
  16. #MODEL = s
  17. MODEL = l
  18.  
  19. CC = tcc
  20. LD = $(CC)
  21.  
  22. UCFLAGS = -m$(MODEL) -O -Z -I.
  23. ULDFLAGS = -m$(MODEL)
  24.  
  25. # funzip is always small-model
  26. FCFLAGS = -ms -O -Z -I.
  27. FLDFLAGS = -ms
  28.  
  29. LDFLAGS2 =
  30.  
  31. OBJS = unzip.obj crypt.obj envargs.obj explode.obj extract.obj file_io.obj \
  32.     inflate.obj match.obj unreduce.obj unshrink.obj zipinfo.obj msdos.obj
  33.  
  34. OBJF = funzip.obj crypt_.obj inflate_.obj
  35.  
  36. default:        unzip.exe funzip.exe
  37.  
  38. clean:
  39.     rem Ignore any errors in the following...
  40.     del *.ob
  41.     del *.obj
  42.     del unzip.exe
  43.     del funzip.exe
  44.  
  45. .c.obj:
  46.         $(CC) -c $(UCFLAGS) $*.c
  47.  
  48. crypt.obj:      crypt.c unzip.h crypt.h zip.h
  49.  
  50. crypt_.obj:     crypt.c unzip.h crypt.h zip.h
  51.     $(CC) -c $(FCFLAGS) -DFUNZIP -ocrypt_.obj crypt.c
  52.  
  53. envargs.obj:    envargs.c unzip.h
  54.  
  55. explode.obj:    explode.c unzip.h
  56.  
  57. extract.obj:    extract.c unzip.h crypt.h
  58.  
  59. file_io.obj:    file_io.c unzip.h crypt.h tables.h
  60.  
  61. funzip.obj:     funzip.c unzip.h crypt.h tables.h
  62.     $(CC) -c $(FCFLAGS) funzip.c
  63.  
  64. inflate_.obj:   inflate.c inflate.h unzip.h crypt.h
  65.     $(CC) -c $(FCFLAGS) -DFUNZIP -oinflate_.obj inflate.c
  66.  
  67. inflate.obj:    inflate.c inflate.h unzip.h
  68.  
  69. match.obj:      match.c unzip.h
  70.  
  71. msdos.obj:      msdos/msdos.c unzip.h
  72.         $(CC) -c $(UCFLAGS) msdos/msdos.c
  73.  
  74. unreduce.obj:   unreduce.c unzip.h
  75.  
  76. unshrink.obj:   unshrink.c unzip.h
  77.  
  78. unzip.obj:      unzip.c unzip.h
  79.  
  80. zipinfo.obj:    zipinfo.c unzip.h
  81.  
  82.  
  83. # Turbo Make which cannot deal with the MS-DOS 128 byte limit:
  84. # -----------------------------------------------------------
  85. unzip.exe: $(OBJS)
  86.     rem   Ignore any warnings in the following commands:
  87.     del funzip.ob
  88.     ren funzip.obj *.ob
  89.     del crypt_.ob
  90.     ren crypt_.obj *.ob
  91.     del inflate_.ob
  92.     ren inflate_.obj *.ob
  93.     $(LD) $(ULDFLAGS) -eunzip.exe *.obj
  94.     ren *.ob *.obj
  95.     $(STRIP) unzip.exe
  96.  
  97. # better makes which know how to deal with 128 char limit on command line:
  98. # -----------------------------------------------------------------------
  99. #unzip.exe:     $(OBJS)
  100. #    $(LD) $(ULDFLAGS) $(OBJS) $(LDFLAGS2)
  101. #    $(STRIP) unzip.exe
  102.  
  103. # both makes:
  104. # ----------
  105. funzip.exe:     $(OBJF)
  106.     $(LD) $(FLDFLAGS) $(OBJF) $(LDFLAGS2)
  107.     $(STRIP) funzip.exe
  108.