home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR40 / GNUZIP_.ZIP / MAKEFILE.BOR < prev    next >
Text File  |  1993-03-28  |  3KB  |  116 lines

  1. # Makefile for gzip
  2. # Borland (Turbo) C++.
  3. # Warning: this file is not suitable for Turbo C 2.0. In this case, read
  4. # then invoke the file doturboc.bat.
  5.  
  6. # To use, do "make -fmakefile.bor"
  7.  
  8. # WARNING: the small model is not supported. The compact model is used
  9. # here. If you want to use the large model, add -D__LARGE__ to ASFLAGS
  10. # Add -DSMALL_MEM or -DMEDIUM_MEM to CFLAGS if you wish to reduce the memory
  11. # requirements. Add -DNO_ASM to CFLAGS and remove match.obj from OBJA if
  12. # you do not have tasm.
  13.  
  14. # ------------- Turbo C++, Borland C++ -------------
  15. MODEL=-mc
  16. #CFLAGS=-w -w-eff -w-def -w-sig -w-cln -a -d -G -O -Z $(MODEL)
  17. CFLAGS=-O2 -Z $(MODEL)
  18. CC=bcc
  19. LD=bcc
  20. #   replace bcc with tcc for Turbo C++ 1.0
  21. LDFLAGS=$(MODEL)
  22. AS=tasm
  23. ASFLAGS=-ml -t -DDYN_ALLOC -DSS_NEQ_DS
  24. LIB = c:\bcc\lib
  25.  
  26. # ------------- Common declarations:
  27. STRIP=rem
  28. #    If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
  29. #    in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
  30. #STRIP=lzexe
  31. #    Or if you've registered PKLITE, then define:
  32. #STRIP=pklite
  33. #    This makes a big difference in .exe size (and possibly load time)
  34.  
  35. O=.obj
  36. OBJA=match$(O) tailor$(O) $(LIB)\wildargs.obj
  37. # To get the file wildargs.obj, do:
  38. #   pkunpak \tcc\startup wildargs.obj
  39. # pkunpak is available in wuarchive.wustl.edu:/mirrors/msdos/starter/pk361.exe
  40. ALLOCA=alloca$(O)
  41.  
  42. # ------------- Used by install rule
  43. # set BIN to the directory you want to install the executables to
  44. BIN = c:\bin
  45.  
  46. # variables
  47. OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
  48.        util$(O)
  49. OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) getopt$(O) $(OBJA) $(ALLOCA)
  50.  
  51. all: gzip.exe
  52.  
  53. gzip.obj: gzip.c gzip.h tailor.h crypt.h revision.h lzw.h
  54.     $(CC) -c $(CFLAGS) $*.c
  55.  
  56. zip.obj: zip.c gzip.h tailor.h crypt.h
  57.     $(CC) -c $(CFLAGS) $*.c
  58.  
  59. deflate.obj: deflate.c gzip.h tailor.h
  60.     $(CC) -c $(CFLAGS) $*.c
  61.  
  62. trees.obj: trees.c gzip.h tailor.h
  63.     $(CC) -c $(CFLAGS) $*.c
  64.  
  65. bits.obj: bits.c gzip.h tailor.h crypt.h
  66.     $(CC) -c $(CFLAGS) $*.c
  67.  
  68. unzip.obj: unzip.c gzip.h tailor.h crypt.h
  69.     $(CC) -c $(CFLAGS) $*.c
  70.  
  71. inflate.obj: inflate.c gzip.h tailor.h
  72.     $(CC) -c $(CFLAGS) $*.c
  73.  
  74. util.obj: util.c gzip.h tailor.h crypt.h
  75.     $(CC) -c $(CFLAGS) $*.c
  76.  
  77. crypt.obj: crypt.c gzip.h tailor.h crypt.h
  78.     $(CC) -c $(CFLAGS) $*.c
  79.  
  80. lzw.obj: lzw.c gzip.h tailor.h
  81.     $(CC) -c $(CFLAGS) $*.c
  82.  
  83. unlzw.obj: unlzw.c gzip.h tailor.h lzw.h
  84.     $(CC) -c $(CFLAGS) $*.c
  85.  
  86. unpack.obj: unpack.c gzip.h tailor.h
  87.     $(CC) -c $(CFLAGS) $*.c
  88.  
  89. tailor.obj: tailor.c gzip.h tailor.h
  90.     $(CC) -c $(CFLAGS) $*.c
  91.  
  92. getopt.obj: getopt.c getopt.h
  93.     $(CC) -c $(CFLAGS) $*.c
  94.  
  95. alloca.obj: alloca.c
  96.      $(CC) -c $(CFLAGS) $*.c
  97.  
  98. match.obj:    match.asm
  99.     $(AS) $(ASFLAGS) match;
  100.  
  101. # we must cut the command line to fit in the MS/DOS 128 byte limit:
  102. gzip.exe: $(OBJ1) $(OBJ2)
  103.     echo $(OBJ1) > gzip.rsp
  104.     echo $(OBJ2) >> gzip.rsp
  105.     $(LD) $(LDFLAGS) @gzip.rsp
  106.     del gzip.rsp
  107.     $(STRIP) gzip.exe
  108.  
  109. install: gzip.exe
  110.     copy /b gzip.exe $(BIN)
  111.     copy /b gzip.exe $(BIN)\gunzip.exe
  112.  
  113. clean:
  114.     del *.obj
  115.     del *.exe
  116.