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

  1. # Makefile for gzip (GNU zip)    -*- Indented-Text -*-
  2. # Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # $Id: Makefile.in,v 0.13 1993/02/11 09:47:02 jloup Exp $
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22.  
  23. srcdir = @srcdir@
  24. VPATH = @srcdir@
  25.  
  26. CC = @CC@
  27. CPP = @CPP@
  28.  
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32.  
  33. # Things you might add to DEFS (configure usually figures out what to do):
  34. # -DDIRENT              Use <dirent.h>  for recursion (-r)
  35. # -DSYSDIR              Use <sys/dir.h> for recursion (-r)
  36. # -DSYSNDIR             Use <sys/ndir.h> for recursion (-r)
  37. # -DNDIR                Use <ndir.h> for recursion (-r)
  38. # -DSTDC_HEADERS        Use <stdlib.h>
  39. # -DHAVE_UNISTD_H    Use <unistd.h>
  40. # -DHAVE_UTIME_H    Use <utime.h>
  41. # -DHAVE_SYSUTIME_H    Use <sys/utime.h>
  42. # -DNEED_MEMORY_H       Use <memory.h>
  43. # -DHAVE_STRING_H       Use <string.h> (otherwise use strings.h)
  44. # -DRETSIGTYPE=int      Define this if signal handlers must return an int.
  45. # -DNO_SYMLINK          OS defines S_IFLNK but does not support symbolic links
  46. # -DNO_MULTIPLE_DOTS    System does not allow file names with multiple dots
  47. # -DNO_UTIME        System does not support setting file modification time
  48. # -DNO_CHOWN        System does not support setting file owner
  49. # -DNO_DIR        System does not support readdir()
  50. # -DPROTO        Force function prototypes even if __STDC__ not defined
  51. # -DASMV        Use asm version match.S
  52. # -DMSDOS        MSDOS specific
  53. # -DOS2            OS/2 specific
  54. # -DVMS            Vax/VMS specific
  55. # -DDEBUG        Debug code
  56. # -DDYN_ALLOC        Use dynamic allocation of large data structures
  57. # -DMAXSEG_64K        Maximum array size is 64K (for 16 bit system)
  58. # -DRECORD_IO           read() and write() are rounded to record sizes.
  59. # -DNO_STDIN_FSTAT      fstat() is not available on stdin
  60. # -DNO_SIZE_CHECK       stat() does not give a reliable file size
  61.  
  62. DEFS = @DEFS@
  63. LIBS = @LIBS@
  64. ALLOCA = @ALLOCA@ 
  65.  
  66. # additional assembly sources for particular systems may be required.
  67. OBJA = @OBJA@
  68.  
  69. SEDCMD = @SEDCMD@
  70.  
  71. CFLAGS = -g
  72. LDFLAGS = $(CFLAGS)
  73.  
  74. X=
  75. # For OS/2 or MSDOS, use: X=.exe
  76.  
  77. O=.o
  78. # For OS/2 or MSDOS, use: O=.obj
  79.  
  80. prefix = /usr/local
  81. exec_prefix = $(prefix)
  82.  
  83. bindir = $(exec_prefix)/bin
  84. datadir = $(prefix)/lib
  85. libdir = $(prefix)/lib
  86. infodir = $(prefix)/info
  87.  
  88. # Extension (not including `.') for the installed manual page filenames.
  89. manext = 1
  90. # Where to install the manual pages.
  91. mandir = $(prefix)/man/man$(manext)
  92.  
  93. #### End of system configuration section. ####
  94.  
  95. SHELL = /bin/sh
  96.  
  97. LOADLIBES = $(LIBS)
  98.  
  99. TAR = tar
  100.  
  101. SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
  102.        lzw.c unlzw.c unpack.c makecrc.c getopt.c alloca.c match.S
  103.  
  104. OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
  105.        crypt$O lzw$O unlzw$O unpack$O getopt$O $(OBJA) $(ALLOCA)
  106.  
  107. HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
  108.  
  109. GENFILES =  README NEWS INSTALL Makefile.in configure.in configure COPYING \
  110.   TODO THANKS ChangeLog $(SRCS) $(HDRS) zcmp.in zmore.in znew.in zdiff.in \
  111.   gzexe.in gzip.1 gunzip.1 gzcat.1 zcmp.1 zmore.1 znew.1 gzip.doc \
  112.   algorithm.doc gzip.texi texinfo.tex gpl.texinfo gzip.info gzip-tar.patch
  113.  
  114. msdosFILES = msdos/tailor.c msdos/match.asm msdos/gzip.prj msdos/doturboc.bat \
  115.   msdos/Makefile.msc msdos/Makefile.bor
  116.  
  117. os2FILES = os2/Makefile.os2
  118.  
  119. vmsFILES = vms/Makefile.vms vms/makegzip.com vms/gzip.hlp
  120.  
  121. amigaFILES = amiga/Makefile.sasc  amiga/tailor.c
  122.  
  123. DISTFILES = $(GENFILES) $(msdosFILES) $(os2FILES) $(vmsFILES) $(amigaFILES)
  124.  
  125. .c$O:
  126.     $(CC) -c $(DEFS) $(CFLAGS) $(CPPFLAGS) $<
  127.  
  128. .PHONY: default all force test check
  129.  
  130. default:  all
  131. all:    gzip$X zcmp zdiff zmore znew gzexe
  132. force:
  133.  
  134. #### Start of specific targets section. ####
  135. #
  136. # 'configure' works only on Unix systems. For other systems able to make
  137. # sense of this makefile, you can define target specific entries here.
  138. # For other systems such as MSDOS, separate Makefiles are
  139. # provided in subdirectories.
  140.  
  141. # gcc with emx 0.8f kit:
  142. os2_gcc:
  143.     $(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"
  144.  
  145. # Xenix 2.3.2 for 286:
  146. xenix_286:
  147.     $(MAKE) all CFLAGS="-LARGE -M2l"
  148.  
  149. #### End of specific targets section. ####
  150.  
  151. install: all gzip.info
  152.     for f in gzip$X zcmp zdiff zmore znew gzexe; do \
  153.       $(INSTALL_PROGRAM) $${f} $(bindir)/$${f}; done
  154.     for f in uncompress$X gunzip$X zcat$X ; do \
  155.       rm -f $(bindir)/$${f}; ln $(bindir)/gzip$X $(bindir)/$${f}; done
  156.     -cd $(srcdir); for f in gzip gunzip gzcat zcmp zmore znew; do \
  157.       $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
  158.     -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
  159.       $(infodir)/$${f}; done
  160.  
  161. uninstall: force
  162.     -cd $(bindir); \
  163.       rm -f gzip$X zcmp zdiff zmore znew uncompress$X gunzip$X zcat$X
  164.     -for f in gzip gunzip gzcat zcmp zmore znew; do \
  165.       rm -f $(mandir)/$${f}.$(manext); done
  166.     -cd $(infodir); rm -f gzip.info*
  167.  
  168. # install all files and replace compress (not recommended)
  169. install_compress: install
  170.     -test -f $(bindir)/compress.old || \
  171.       mv $(bindir)/compress$X $(bindir)/compress.old
  172.     ln $(bindir)/gzip$X $(bindir)/compress$X
  173.  
  174. test: check
  175. check:    all
  176.     ./gzip -5 < $(srcdir)/texinfo.tex > _gztest.z
  177.     @if test `wc -c < _gztest.z` -ne 30890; then \
  178.        echo FAILED gzip test: incorrect size; rm -f _gztest*; exit 1; \
  179.        else :; fi
  180.     rm -f _gztest
  181.     ./gzip -d _gztest.z
  182.     @if cmp _gztest $(srcdir)/texinfo.tex; then \
  183.        echo gzip test OK; else \
  184.        echo FAILED gzip test: incorrect decompress; fi
  185.     rm -f _gztest*
  186.  
  187. TAGS: $(SRCS) $(HDRS)
  188.     cd $(srcdir); etags $(SRCS) $(HDRS)
  189.  
  190. Makefile: Makefile.in ./config.status
  191.     ./config.status
  192.  
  193. ./config.status: configure
  194.     $(srcdir)/configure --srcdir=$(srcdir) --no-create
  195.  
  196. configure: configure.in
  197.     @echo Warning: configure is out of date
  198. #    cd $(srcdir); autoconf
  199.  
  200. clean:
  201.     rm -f *$O gzip$X gunzip$X zcat$X a.out core
  202.     rm -f zcmp zdiff zmore znew gzexe _gztest*
  203.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  204.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  205.  
  206. mostlyclean: clean
  207.  
  208. distclean: clean
  209.     rm -f Makefile config.status
  210.  
  211. realclean: distclean
  212.     rm -f TAGS gzip.info*
  213.  
  214. dist: $(DISTFILES) Makefile
  215.     d=gzip-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  216.                 -e q revision.h` ; \
  217.     rm -rf $$d; \
  218.     mkdir $$d;       chmod 777 $$d;       ln $(GENFILES)   $$d; \
  219.     mkdir $$d/msdos; chmod 777 $$d/msdos; ln $(msdosFILES) $$d/msdos; \
  220.     mkdir $$d/os2;   chmod 777 $$d/os2;   ln $(os2FILES)   $$d/os2; \
  221.     mkdir $$d/vms;   chmod 777 $$d/vms;   ln $(vmsFILES)   $$d/vms; \
  222.     mkdir $$d/amiga; chmod 777 $$d/amiga; ln $(amigaFILES) $$d/amiga; \
  223.     $(TAR) chofz $$d.tar.z $$d ; \
  224.     rm -rf $$d
  225.  
  226. zipdist: $(DISTFILES) Makefile
  227.     zip -u9T gzip`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  228.               -e s/[.]//g -e q revision.h` $(DISTFILES)
  229.  
  230. # Actual build-related targets
  231.  
  232. gzip$X:    Makefile $(OBJS)
  233.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  234.  
  235. gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
  236. util$O lzw$O unlzw$O unpack$O crypt$O: gzip.h tailor.h
  237.  
  238. gzip$O unlzw$O: revision.h lzw.h
  239.  
  240. bits$O unzip$O util$O zip$O: crypt.h
  241.  
  242. gzip$O getopt$O: getopt.h
  243.  
  244. match$O: match.S
  245.     $(CPP) $(srcdir)/match.S > _match.s
  246.     $(CC) -c _match.s
  247.     mv _match$O match$O
  248.     rm -f _match.s
  249.  
  250. zcmp: zcmp.in
  251.     sed "$(SEDCMD)" $(srcdir)/zcmp.in > zcmp
  252.     chmod 775 zcmp
  253.  
  254. zdiff: zdiff.in
  255.     sed "$(SEDCMD)" $(srcdir)/zdiff.in > zdiff
  256.     chmod 775 zdiff
  257.  
  258. zmore: zmore.in
  259.     sed "$(SEDCMD)" $(srcdir)/zmore.in > zmore
  260.     chmod 775 zmore
  261.  
  262. znew: znew.in
  263.     sed "$(SEDCMD)" $(srcdir)/znew.in > znew
  264.     chmod 775 znew
  265.  
  266. gzexe: gzexe.in
  267.     sed "$(SEDCMD)" $(srcdir)/gzexe.in > gzexe
  268.     chmod 775 gzexe
  269.  
  270. gzip.info: gzip.texi
  271.     cd $(srcdir); makeinfo gzip.texi
  272.  
  273. gzip.dvi: gzip.texi
  274.     cd $(srcdir); texi2dvi gzip.texi
  275.  
  276. gzip.doc: gzip.1
  277.     cd $(srcdir); nroff -man gzip.1 | col -b | uniq > gzip.doc
  278.  
  279. # Prevent GNU make v3 from overflowing arg limit on SysV.
  280. .NOEXPORT:
  281.  
  282. # end of file
  283.