source: trunk/essentials/app-arch/gzip/msdos/Makefile.djg

Last change on this file was 3325, checked in by bird, 18 years ago

gzip 1.3.11

File size: 5.6 KB
Line 
1# Makefile for gzip (GNU zip) -*- Indented-Text -*-
2# Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
3# Modified for GNUish make/MS_SH200/DJGPP 1.09+ by Eric Backus
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2, or (at your option)
8# any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19# $Id: Makefile.djg,v 1.3 1993/06/22 15:43:24 jloup Exp $
20
21#### Start of system configuration section. ####
22
23.SUFFIXES: .o
24LONGARGS = gcc:rm
25
26srcdir = .
27VPATH = .
28
29CC = gcc
30CPP = gcc -O -E
31
32INSTALL = install -c
33INSTALL_PROGRAM = $(INSTALL)
34INSTALL_DATA = $(INSTALL) -m 644
35
36# tailor.h defines things for DJGPP so nothing is needed here
37DEFS =
38LIBS =
39
40# additional assembly sources for particular systems may be required.
41OBJA = match.o
42
43SEDCMD = 1d
44
45CFLAGS = -O2 -finline-functions -fomit-frame-pointer
46LDFLAGS = -s
47
48X=.exe
49# For OS/2 or MSDOS, use: X=.exe
50
51O=.o
52# For OS/2 or MSDOS, use: O=.obj
53
54prefix = /usr/local
55exec_prefix = $(prefix)
56
57bindir = $(exec_prefix)/bin
58datadir = $(prefix)/lib
59libdir = $(prefix)/lib
60infodir = $(prefix)/info
61
62# Extension (not including `.') for the installed manual page filenames.
63manext = 1
64# Where to install the manual pages.
65mandir = $(prefix)/man/man$(manext)
66
67#### End of system configuration section. ####
68
69SHELL = /bin/sh
70
71LOADLIBES = $(LIBS)
72
73TAR = tar
74
75SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
76 lzw.c unlzw.c unpack.c unlzh.c makecrc.c getopt.c match.S
77
78OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
79 util$(O)
80OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA)
81
82HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
83
84.c$O:
85 $(CC) -c $(DEFS) $(CFLAGS) $<
86
87#.PHONY: default all force test check
88
89default: all
90all: gzip$X zcmp zdiff zmore znew zforce gzexe
91force:
92
93install: all
94 for f in gzip$X zcmp zdiff zmore znew zforce gzexe; do \
95 $(INSTALL_PROGRAM) $${f} $(bindir)/$${f}; done
96 for f in gunzip$X zcat$X ; do \
97 rm -f $(bindir)/$${f}; ln $(bindir)/gzip$X $(bindir)/$${f}; done
98 -cd $(srcdir); \
99 for f in gzip gunzip zcat zcmp zmore znew zforce gzexe; do \
100 rm -f $(mandir)/$${f}.$(manext); \
101 $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
102 -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
103 $(infodir)/$${f}; done
104
105uninstall: force
106 -cd $(bindir); rm -f gzip$X gunzip$X zcat$X \
107 zcmp zdiff zmore znew zforce gzexe
108 -for f in gzip gunzip zcat zcmp zmore znew gzexe; do \
109 rm -f $(mandir)/$${f}.$(manext); done
110 -cd $(infodir); rm -f gzip.info*
111
112# install all files and replace compress (not recommended)
113install_compress: install
114 -test -f $(bindir)/compress.old || \
115 mv $(bindir)/compress$X $(bindir)/compress.old
116 ln $(bindir)/gzip$X $(bindir)/compress$X
117 rm -f $(bindir)/uncompress$X
118 ln $(bindir)/gzip$X $(bindir)/uncompress$X
119
120test: check
121check: all
122 ./gzip -5 < $(srcdir)/texinfo.tex > _gztest.z
123 # Either GNUish make or MS_SH has trouble with backquotes
124 #@if test `wc -c < _gztest.z` -ne 30890; then \
125 # echo FAILED gzip test: incorrect size; rm -f _gztest*; exit 1; \
126 # else :; fi
127 @echo Should be 30890:\\c
128 @wc -c < _gztest.z
129 rm -f _gztest
130 ./gzip -d _gztest.z
131 @if cmp _gztest $(srcdir)/texinfo.tex; then \
132 echo gzip test OK; \
133 else \
134 echo FAILED gzip test: incorrect decompress; \
135 fi
136 rm -f _gztest*
137
138TAGS: $(SRCS) $(HDRS)
139 cd $(srcdir); etags $(SRCS) $(HDRS)
140
141Makefile: Makefile.in ./config.status
142 ./config.status
143
144./config.status: configure
145 $(srcdir)/configure --srcdir=$(srcdir) --no-create
146
147configure: configure.in
148 @echo Warning: configure is out of date
149# cd $(srcdir); autoconf
150
151clean:
152 rm -f *$O gzip$X gunzip$X zcat$X a.out core gzip
153 rm -f zcmp zdiff zmore znew zforce gzexe _gztest*
154 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
155 rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
156
157mostlyclean: clean
158
159distclean: clean
160 rm -f Makefile config.status
161
162realclean: distclean
163 rm -f TAGS gzip.info*
164
165# Actual build-related targets
166
167gzip$X: gzip
168 aout2exe gzip
169
170gzip: $(OBJ1) $(OBJ2)
171 echo $(OBJ1) > gzip.rsp
172 echo $(OBJ2) $(LIBS) >> gzip.rsp
173 $(CC) $(LDFLAGS) -o $@ @gzip.rsp
174 del gzip.rsp
175
176gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
177util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
178
179gzip$O unlzw$O: revision.h lzw.h
180
181bits$O unzip$O util$O zip$O: crypt.h
182
183gzip$O getopt$O: getopt.h
184
185match$O: match.S
186 $(CC) -c match.S
187
188zcmp: zcmp.in
189 sed "$(SEDCMD)" $(srcdir)/zcmp.in > zcmp
190 chmod 755 zcmp
191
192zdiff: zdiff.in
193 sed "$(SEDCMD)" $(srcdir)/zdiff.in > zdiff
194 chmod 755 zdiff
195
196zmore: zmore.in
197 sed "$(SEDCMD)" $(srcdir)/zmore.in > zmore
198 chmod 755 zmore
199
200znew: znew.in
201 sed "$(SEDCMD)" $(srcdir)/znew.in > znew
202 chmod 755 znew
203
204zforce: zforce.in
205 sed "$(SEDCMD)" $(srcdir)/zforce.in > zforce
206 chmod 755 zforce
207
208gzexe: gzexe.in
209 sed "$(SEDCMD)" $(srcdir)/gzexe.in > gzexe
210 chmod 755 gzexe
211
212gzip.info: gzip.texi
213 cd $(srcdir); makeinfo gzip.texi
214
215gzip.dvi: gzip.texi
216 cd $(srcdir); texi2dvi gzip.texi
217
218gzip.doc: gzip.1
219 cd $(srcdir); nroff -man gzip.1 | col -b | uniq > gzip.doc
220
221# Prevent GNU make v3 from overflowing arg limit on SysV.
222.NOEXPORT:
223
224# end of file
Note: See TracBrowser for help on using the repository browser.