1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394
|
# Makefile for gzip (GNU zip) -*- Indented-Text -*-
# Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# $Id: Makefile.in,v 0.23 1993/06/24 11:51:47 jloup Exp $
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
ASCPP = @ASCPP@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
# Things you might add to DEFS (configure usually figures out what to do):
# -DGNU_STANDARD Behave as gzip even if invoked as gunzip (GNU standard)
# -DDIRENT Use <dirent.h> for recursion (-r)
# -DSYSDIR Use <sys/dir.h> for recursion (-r)
# -DSYSNDIR Use <sys/ndir.h> for recursion (-r)
# -DNDIR Use <ndir.h> for recursion (-r)
# -DSTDC_HEADERS Use <stdlib.h>
# -DHAVE_UNISTD_H Use <unistd.h>
# -DNO_FCNTL_H Don't use <fcntl.h>
# -DNO_UTIME_H Don't use <utime.h>
# -DHAVE_SYSUTIME_H Use <sys/utime.h>
# -DNO_MEMORY_H Don't use <memory.h>. Not needed if STDC_HEADERS.
# -DNO_STRING_H Use strings.h, not string.h. Not needed if STDC_HEADERS
# -DRETSIGTYPE=int Define this if signal handlers must return an int.
# -DNO_SYMLINK OS defines S_IFLNK but does not support symbolic links
# -DNO_MULTIPLE_DOTS System does not allow file names with multiple dots
# -DNO_UTIME System does not support setting file modification time
# -DNO_CHOWN System does not support setting file owner
# -DNO_DIR System does not support readdir()
# -DPROTO Force function prototypes even if __STDC__ not defined
# -DASMV Use asm version match.S
# -DMSDOS MSDOS specific
# -DOS2 OS/2 specific
# -DVAXC Vax/VMS with Vax C compiler
# -DVMS Vax/VMS with gcc
# -DDEBUG Debug code
# -DDYN_ALLOC Use dynamic allocation of large data structures
# -DMAXSEG_64K Maximum array size is 64K (for 16 bit system)
# -DRECORD_IO read() and write() are rounded to record sizes.
# -DNO_STDIN_FSTAT fstat() is not available on stdin
# -DNO_FSTAT fstat() is not available
# -DNO_SIZE_CHECK stat() does not give a reliable file size
DEFS = @DEFS@
LIBS = @LIBS@
# additional assembly sources for particular systems may be required.
OBJA = @OBJA@
SEDCMD = @SEDCMD@
CFLAGS = @CFLAGS@
# If you want debug on by default, use: CFLAGS="-g" ./configure
LDFLAGS = $(CFLAGS)
G=@G@
# To install znew, zmore, etc... as gznew, gzmore... use: G=g
ZCAT=@ZCAT@
# To install zcat executable and man page as gzcat, use: ZCAT=gzcat
X=
# For OS/2 or MSDOS, use: X=.exe
O=.o
# For OS/2 or MSDOS, use: O=.obj
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
scriptdir = $(bindir)
# scriptdir is the directory in which shell scripts should be installed
datadir = $(prefix)/lib
libdir = $(prefix)/lib
infodir = $(prefix)/info
# Extension (not including `.') for the installed manual page filenames.
manext = 1
# Where to install the manual pages.
mandir = $(prefix)/man/man$(manext)
# Use manlinks=so to use the .so method instead of soft links
manlinks = ln
alldirs = $(bindir) $(scriptdir) $(datadir) $(libdir) $(infodir) $(mandir)
#### End of system configuration section. ####
SHELL = /bin/sh
LOADLIBES = $(LIBS)
TAR = tar
SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
lzw.c unlzw.c unpack.c unlzh.c getopt.c match.S
OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
crypt$O lzw$O unlzw$O unpack$O unlzh$O getopt$O $(OBJA)
HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
GENFILES = README NEWS INSTALL Makefile.in configure.in configure COPYING \
TODO THANKS ChangeLog $(SRCS) $(HDRS) zmore.in znew.in zdiff.in zgrep.in \
zforce.in gzexe.in gzip.1 zdiff.1 zgrep.1 zmore.1 znew.1 gzexe.1 zforce.1 \
gzip.doc algorithm.doc gzip.texi texinfo.tex gpl.texinfo gzip.info zless.in
sampleFILES = sample/makecrc.c sample/zread.c sample/add.c sample/sub.c \
sample/ztouch sample/zfile
msdosFILES = msdos/tailor.c msdos/match.asm msdos/gzip.prj msdos/doturboc.bat \
msdos/Makefile.msc msdos/Makefile.bor msdos/Makefile.djg
os2FILES = os2/Makefile.os2 os2/gzip.def os2/gzip16.def
ntFILES = nt/Makefile.nt
vmsFILES = vms/Readme.vms vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com \
vms/Makefile.mms vms/vms.c vms/gzip.hlp
amigaFILES = amiga/Makefile.sasc amiga/Makefile.gcc amiga/tailor.c \
amiga/utime.h amiga/match.a
atariFILES = atari/Makefile.st
primosFILES = primos/readme primos/primos.c primos/ci.opts \
primos/build.cpl primos/include/errno.h primos/include/fcntl.h \
primos/include/stdlib.h primos/include/sysStat.h primos/include/sysTypes.h
DISTFILES = $(GENFILES) $(sampleFILES) $(msdosFILES) $(os2FILES) $(ntFILES)\
$(vmsFILES) $(amigaFILES) $(atariFILES) $(primosFILES)
SCRIPTS = $(G)zdiff $(G)zgrep $(G)zless $(G)zmore $(G)znew $(G)zforce gzexe
.c$O:
$(CC) -c $(DEFS) $(CFLAGS) $<
#.PHONY: default all force test check
#default: gzip$X
all: gzip$X $(G)zdiff $(G)zgrep $(G)zless $(G)zmore $(G)znew $(G)zforce gzexe
force:
#### Start of specific targets section. ####
#
# 'configure' works only on Unix systems. For other systems able to make
# sense of this makefile, you can define target specific entries here.
# For other systems such as MSDOS, separate Makefiles are
# provided in subdirectories.
# NeXT 2.x, 3.0, 3.1 thin. For gcc, replace -bsd with -D__STRICT_BSD__.
next:
$(MAKE) all CFLAGS="-O -bsd -DASMV" \
DEFS="-DNO_STDLIB_H -DNO_STRING_H -DNO_UTIME_H -DSYSDIR -DRETSIGTYPE=int"
# NeXT 3.1 fat (68k + 386). For gcc, replace -bsd with -D__STRICT_BSD__.
next-fat:
$(MAKE) all OBJA=match-next.o \
CFLAGS="-O2 -bsd -DASMV -fno-builtin -arch m68k -arch i386" \
DEFS="-DNO_STDLIB_H -DNO_STRING_H -DNO_UTIME_H -DSYSDIR -DRETSIGTYPE=int"
match-next.o: match.S
cat $(srcdir)/match.S > match-next.s
$(CC) -arch m68k -arch i386 -c match-next.s
rm -f match-next.s
# gcc with emx 0.8f kit (use by preference os2/Makefile.os2)
os2_gcc:
$(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"
# Xenix 2.3.2 for 286:
xenix_286:
$(MAKE) all CFLAGS="-LARGE -M2l"
# Coherent (with broken /bin/sh):
coherent:
$(MAKE) all OBJA=match.o DEFS=\
"-DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1"
#### End of specific targets section. ####
install: installdirs installbin installman
installbin: all
$(INSTALL_PROGRAM) gzip$X $(bindir)/gzip$X
for f in $(SCRIPTS); do \
$(INSTALL_PROGRAM) $${f} $(scriptdir)/$${f}; done
rm -f $(scriptdir)/$(G)zcmp; \
ln $(scriptdir)/$(G)zdiff $(scriptdir)/$(G)zcmp
for f in gunzip$X ungzip$X $(ZCAT)$X ; do \
rm -f $(bindir)/$${f}; done
@if echo $(DEFS) | grep GNU_STANDARD > /dev/null; then \
echo 'exec gzip -d $${1+"$$@"}' > $(bindir)/gunzip$X; \
echo 'exec gzip -dc $${1+"$$@"}' > $(bindir)/$(ZCAT)$X; \
chmod 755 $(bindir)/gunzip$X $(bindir)/$(ZCAT)$X; \
else \
ln $(bindir)/gzip$X $(bindir)/gunzip$X; \
ln $(bindir)/gzip$X $(bindir)/$(ZCAT)$X; \
fi
rm -f $(scriptdir)/zegrep$X $(scriptdir)/zfgrep$X
ln $(scriptdir)/zgrep$X $(scriptdir)/zegrep$X
ln $(scriptdir)/zgrep$X $(scriptdir)/zfgrep$X
installman: gzip.info
for f in gzip gunzip $(ZCAT) $(SCRIPTS) $(G)zcmp; do \
rm -f $(mandir)/$${f}.$(manext); done
-cd $(srcdir); for f in gzip gzexe; do \
$(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
-cd $(srcdir); for f in zdiff zgrep zless zmore znew zforce; do \
$(INSTALL_DATA) $${f}.1 $(mandir)/$(G)$${f}.$(manext); done
-cd $(mandir); if test $(manlinks) = so; then \
echo .so man$(manext)/gzip.$(manext) > $(ZCAT).$(manext);\
echo .so man$(manext)/$(G)zdiff.$(manext) > $(G)zcmp.$(manext);\
echo .so man$(manext)/gzip.$(manext) > gunzip.$(manext);\
chmod 644 $(ZCAT).$(manext) $(G)zcmp.$(manext) gunzip.$(manext);\
else \
ln -s gzip.$(manext) $(ZCAT).$(manext);\
ln -s $(G)zdiff.$(manext) $(G)zcmp.$(manext);\
ln -s gzip.$(manext) gunzip.$(manext);\
fi
-cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
$(infodir)/$${f}; done
uninstall: force
-cd $(bindir); rm -f gzip$X gunzip$X $(ZCAT)$X
-cd $(scriptdir); rm -f $(SCRIPTS) $(G)zcmp
-for f in gzip gunzip $(ZCAT) $(SCRIPTS) $(G)zcmp; do \
rm -f $(mandir)/$${f}.$(manext); done
-cd $(infodir); rm -f gzip.info*
# install all files and replace compress (not recommended)
# for Debian, what we really want is to install an uncompress link, but
# *not* a compress link, since there are places like the X11 build
# where you really need a real compress, but gzip is always installed
# and can do uncompress, so it makes sense for gzip to provide this link
install_compress: install
rm -f $(bindir)/uncompress$X
ln $(bindir)/gzip$X $(bindir)/uncompress$X
# Make sure all installation directories, e.g. $(bindir) actually exist by
# making them if necessary. At most one level is created (except for man).
installdirs:
-if test ! -d $(prefix)/man; then \
mkdir $(prefix)/man; fi
-for dir in $(alldirs) ; do \
if test ! -d $${dir}; then \
mkdir $${dir}; fi; \
done
test: check
check: gzip$X
./gzip -6 < $(srcdir)/texinfo.tex > _gztest.gz
@LANG=""; export LANG; if test `wc -c < _gztest.gz` -eq 30890; then \
true; \
else \
echo FAILED gzip test: incorrect size; \
fi
rm -f _gztest
./gzip -d _gztest.gz
@if cmp _gztest $(srcdir)/texinfo.tex; then \
echo gzip test OK; \
else \
echo FAILED gzip test: incorrect decompress; \
fi
rm -f _gztest*
TAGS: $(SRCS) $(HDRS)
cd $(srcdir); etags $(SRCS) $(HDRS)
Makefile: Makefile.in ./config.status
./config.status
./config.status: configure
$(srcdir)/configure --srcdir=$(srcdir) --no-create
configure: configure.in
@echo Warning: configure is out of date
# cd $(srcdir); autoconf
clean:
rm -f *$O gzip$X gunzip$X ungzip$X $(ZCAT)$X add$X sub$X a.out core
rm -f $(G)zcmp $(SCRIPTS) _gztest*
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
mostlyclean: clean
distclean: clean
rm -f Makefile config.status
realclean: distclean
rm -f TAGS gzip.info* gzip.doc
dist: $(DISTFILES) Makefile
d=gzip-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
-e q revision.h` ; \
rm -f ../$$d; \
ln -s `pwd` ../$$d; \
cd ..; \
files=""; \
for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
rm -f $$d
zipdist: $(DISTFILES) Makefile
zip -u9T gzip`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
-e s/[.]//g -e q revision.h` $(DISTFILES)
# Actual build-related targets
gzip$X: Makefile $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
rm -f gunzip$X $(ZCAT)$X
ln gzip$X gunzip$X
ln gzip$X $(ZCAT)$X
gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
gzip$O unlzw$O: revision.h lzw.h
bits$O unzip$O util$O zip$O: crypt.h
gzip$O getopt$O: getopt.h
match$O: match.S
$(ASCPP) $(srcdir)/match.S > _match.s
$(CC) -c _match.s
mv _match$O match$O
rm -f _match.s
$(G)zdiff: zdiff.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zdiff.in > $@
chmod 755 $@
$(G)zgrep: zgrep.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zgrep.in > $@
chmod 755 $@
$(G)zless: zless.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zless.in > $@
chmod 755 $@
$(G)zmore: zmore.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zmore.in > $@
chmod 755 $@
$(G)znew: znew.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/znew.in > $@
chmod 755 $@
$(G)zforce: zforce.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zforce.in > $@
chmod 755 $@
gzexe: gzexe.in
sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/gzexe.in > $@
chmod 755 $@
gzip.info: gzip.texi
cd $(srcdir); makeinfo gzip.texi
gzip.dvi: gzip.texi
cd $(srcdir); texi2dvi gzip.texi
gzip.doc: gzip.1
nroff -man $(srcdir)/gzip.1 | col -b | uniq > gzip.doc
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
# end of file
|