|
|
1.1 root 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.14 1993/02/24 18:23:13 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: # -DNO_UTIME_H Don't use <utime.h>
41: # -DHAVE_SYSUTIME_H Use <sys/utime.h>
42: # -DNO_MEMORY_H Don't use <memory.h>. Not needed if STDC_HEADERS.
43: # -DNO_STRING_H Use strings.h, not string.h. Not needed if STDC_HEADERS
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: # -DVAXC Vax/VMS with Vax C compiler
55: # -DVMS Vax/VMS with gcc
56: # -DDEBUG Debug code
57: # -DDYN_ALLOC Use dynamic allocation of large data structures
58: # -DMAXSEG_64K Maximum array size is 64K (for 16 bit system)
59: # -DRECORD_IO read() and write() are rounded to record sizes.
60: # -DNO_STDIN_FSTAT fstat() is not available on stdin
61: # -DNO_SIZE_CHECK stat() does not give a reliable file size
62:
63: DEFS = @DEFS@
64: LIBS = @LIBS@
65: ALLOCA = @ALLOCA@
66:
67: # additional assembly sources for particular systems may be required.
68: OBJA = @OBJA@
69:
70: SEDCMD = @SEDCMD@
71:
72: CFLAGS =
73: # If you want debug on by default, define: CFLAGS=-g
74: LDFLAGS = $(CFLAGS)
75:
76: X=
77: # For OS/2 or MSDOS, use: X=.exe
78:
79: O=.o
80: # For OS/2 or MSDOS, use: O=.obj
81:
82: prefix = /usr/local
83: exec_prefix = $(prefix)
84:
85: bindir = $(exec_prefix)/bin
86: datadir = $(prefix)/lib
87: libdir = $(prefix)/lib
88: infodir = $(prefix)/info
89:
90: # Extension (not including `.') for the installed manual page filenames.
91: # If you change it to a value other than 1, you should also update
92: # zcat.1 and gunzip.1.
93: manext = 1
94: # Where to install the manual pages.
95: mandir = $(prefix)/man/man$(manext)
96:
97: #### End of system configuration section. ####
98:
99: SHELL = /bin/sh
100:
101: LOADLIBES = $(LIBS)
102:
103: TAR = tar
104:
105: SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
106: lzw.c unlzw.c unpack.c getopt.c alloca.c match.S makecrc.c zread.c
107:
108: OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
109: crypt$O lzw$O unlzw$O unpack$O getopt$O $(OBJA) $(ALLOCA)
110:
111: HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
112:
113: GENFILES = README NEWS INSTALL Makefile.in configure.in configure COPYING \
114: TODO THANKS ChangeLog $(SRCS) $(HDRS) zcmp.in zmore.in znew.in zdiff.in \
115: zforce.in gzexe.in gzip.1 gunzip.1 zcat.1 zcmp.1 zmore.1 znew.1 gzexe.1 \
116: zforce.1 gzip.doc algorithm.doc gzip.texi texinfo.tex gpl.texinfo gzip.info \
117: gzip-tar.patch
118:
119: msdosFILES = msdos/tailor.c msdos/match.asm msdos/gzip.prj msdos/doturboc.bat \
120: msdos/Makefile.msc msdos/Makefile.bor msdos/Makefile.djg
121:
122: os2FILES = os2/Makefile.os2
123:
124: vmsFILES = vms/Makefile.vms vms/makegzip.com vms/gzip.hlp
125:
126: amigaFILES = amiga/Makefile.sasc amiga/Makefile.gcc amiga/tailor.c \
127: amiga/utime.h
128:
129: atariFILES = atari/Makefile.st
130:
131: DISTFILES = $(GENFILES) $(msdosFILES) $(os2FILES) $(vmsFILES) $(amigaFILES) \
132: $(atariFILES)
133:
134: .c$O:
135: $(CC) -c $(DEFS) $(CFLAGS) $(CPPFLAGS) $<
136:
137: #.PHONY: default all force test check
138:
139: default: all
140: all: gzip$X zcmp zdiff zmore znew zforce gzexe
141: force:
142:
143: #### Start of specific targets section. ####
144: #
145: # 'configure' works only on Unix systems. For other systems able to make
146: # sense of this makefile, you can define target specific entries here.
147: # For other systems such as MSDOS, separate Makefiles are
148: # provided in subdirectories.
149:
150: # gcc with emx 0.8f kit:
151: os2_gcc:
152: $(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"
153:
154: # Xenix 2.3.2 for 286:
155: xenix_286:
156: $(MAKE) all CFLAGS="-LARGE -M2l"
157:
158: # Coherent (with broken /bin/sh):
159: coherent:
160: $(MAKE) all OBJA=match.o DEFS=\
161: "-DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1"
162:
163: #### End of specific targets section. ####
164:
165: install: all gzip.info
166: for f in gzip$X zcmp zdiff zmore znew zforce gzexe; do \
167: $(INSTALL_PROGRAM) $${f} $(bindir)/$${f}; done
168: for f in gunzip$X zcat$X ; do \
169: rm -f $(bindir)/$${f}; ln $(bindir)/gzip$X $(bindir)/$${f}; done
170: -cd $(srcdir); \
171: for f in gzip gunzip zcat zcmp zmore znew zforce gzexe; do \
172: rm -f $(mandir)/$${f}.$(manext); \
173: $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
174: -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
175: $(infodir)/$${f}; done
176:
177: uninstall: force
178: -cd $(bindir); rm -f gzip$X gunzip$X zcat$X \
179: zcmp zdiff zmore znew zforce gzexe
180: -for f in gzip gunzip zcat zcmp zmore znew gzexe; do \
181: rm -f $(mandir)/$${f}.$(manext); done
182: -cd $(infodir); rm -f gzip.info*
183:
184: # install all files and replace compress (not recommended)
185: install_compress: install
186: -test -f $(bindir)/compress.old || \
187: mv $(bindir)/compress$X $(bindir)/compress.old
188: ln $(bindir)/gzip$X $(bindir)/compress$X
189: rm -f $(bindir)/uncompress$X
190: ln $(bindir)/gzip$X $(bindir)/uncompress$X
191:
192: test: check
193: check: all
194: ./gzip -5 < $(srcdir)/texinfo.tex > _gztest.z
195: @if test `wc -c < _gztest.z` -eq 30890; then \
196: true; \
197: else \
198: echo FAILED gzip test: incorrect size; \
199: fi
200: rm -f _gztest
201: ./gzip -d _gztest.z
202: @if cmp _gztest $(srcdir)/texinfo.tex; then \
203: echo gzip test OK; \
204: else \
205: echo FAILED gzip test: incorrect decompress; \
206: fi
207: rm -f _gztest*
208:
209: TAGS: $(SRCS) $(HDRS)
210: cd $(srcdir); etags $(SRCS) $(HDRS)
211:
212: Makefile: Makefile.in ./config.status
213: ./config.status
214:
215: ./config.status: configure
216: $(srcdir)/configure --srcdir=$(srcdir) --no-create
217:
218: configure: configure.in
219: @echo Warning: configure is out of date
220: # cd $(srcdir); autoconf
221:
222: clean:
223: rm -f *$O gzip$X gunzip$X zcat$X a.out core
224: rm -f zcmp zdiff zmore znew zforce gzexe _gztest*
225: rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
226: rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
227:
228: mostlyclean: clean
229:
230: distclean: clean
231: rm -f Makefile config.status
232:
233: realclean: distclean
234: rm -f TAGS gzip.info*
235:
236: dist: $(DISTFILES) Makefile
237: d=gzip-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
238: -e q revision.h` ; \
239: rm -rf $$d; \
240: mkdir $$d; chmod 777 $$d; ln $(GENFILES) $$d; \
241: mkdir $$d/msdos; chmod 777 $$d/msdos; ln $(msdosFILES) $$d/msdos; \
242: mkdir $$d/os2; chmod 777 $$d/os2; ln $(os2FILES) $$d/os2; \
243: mkdir $$d/vms; chmod 777 $$d/vms; ln $(vmsFILES) $$d/vms; \
244: mkdir $$d/amiga; chmod 777 $$d/amiga; ln $(amigaFILES) $$d/amiga; \
245: mkdir $$d/atari; chmod 777 $$d/atari; ln $(atariFILES) $$d/atari; \
246: $(TAR) chofz $$d.tar.z $$d ; \
247: rm -rf $$d
248:
249: zipdist: $(DISTFILES) Makefile
250: zip -u9T gzip`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
251: -e s/[.]//g -e q revision.h` $(DISTFILES)
252:
253: # Actual build-related targets
254:
255: gzip$X: Makefile $(OBJS)
256: $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
257:
258: gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
259: util$O lzw$O unlzw$O unpack$O crypt$O: gzip.h tailor.h
260:
261: gzip$O unlzw$O: revision.h lzw.h
262:
263: bits$O unzip$O util$O zip$O: crypt.h
264:
265: gzip$O getopt$O: getopt.h
266:
267: match$O: match.S
268: $(CPP) $(srcdir)/match.S > _match.s
269: $(CC) -c _match.s
270: mv _match$O match$O
271: rm -f _match.s
272:
273: zcmp: zcmp.in
274: sed "$(SEDCMD)" $(srcdir)/zcmp.in > zcmp
275: chmod 755 zcmp
276:
277: zdiff: zdiff.in
278: sed "$(SEDCMD)" $(srcdir)/zdiff.in > zdiff
279: chmod 755 zdiff
280:
281: zmore: zmore.in
282: sed "$(SEDCMD)" $(srcdir)/zmore.in > zmore
283: chmod 755 zmore
284:
285: znew: znew.in
286: sed "$(SEDCMD)" $(srcdir)/znew.in > znew
287: chmod 755 znew
288:
289: zforce: zforce.in
290: sed "$(SEDCMD)" $(srcdir)/zforce.in > zforce
291: chmod 755 zforce
292:
293: gzexe: gzexe.in
294: sed "$(SEDCMD)" $(srcdir)/gzexe.in > gzexe
295: chmod 755 gzexe
296:
297: gzip.info: gzip.texi
298: cd $(srcdir); makeinfo gzip.texi
299:
300: gzip.dvi: gzip.texi
301: cd $(srcdir); texi2dvi gzip.texi
302:
303: gzip.doc: gzip.1
304: cd $(srcdir); nroff -man gzip.1 | col -b | uniq > gzip.doc
305:
306: # Prevent GNU make v3 from overflowing arg limit on SysV.
307: .NOEXPORT:
308:
309: # end of file
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.