2 # Makefile for the Bash library
5 # Copyright (C) 1998-2002 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
24 BUILD_DIR = @BUILD_DIR@
26 BASHINCDIR = ${topdir}/include
29 INSTALL_PROGRAM = @INSTALL_PROGRAM@
30 INSTALL_DATA = @INSTALL_DATA@
43 LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
45 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
47 PROFILE_FLAGS = @PROFILE_FLAGS@
50 LOCAL_DEFS = @LOCAL_DEFS@
52 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir)
54 CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \
57 GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
58 -Wcast-align -Wstrict-prototypes -Wconversion \
59 -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
62 $(CC) -c $(CCFLAGS) $<
64 # The name of the library target.
65 LIBRARY_NAME = libsh.a
67 # The C code source files for this library.
68 CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
69 strcasecmp.c strerror.c strtod.c strtol.c strtoul.c \
70 vprint.c itos.c rename.c zread.c zwrite.c shtty.c \
71 inet_aton.c netconn.c netopen.c strpbrk.c timeval.c makepath.c \
72 pathcanon.c pathphys.c tmpfile.c stringlist.c stringvec.c spell.c \
73 shquote.c strtrans.c strindex.c snprintf.c mailstat.c \
74 fmtulong.c fmtullong.c fmtumax.c \
75 strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c \
76 mktime.c strftime.c xstrchr.c zcatfd.c
78 # The header files for this library.
81 # The object files contained in $(LIBRARY_NAME)
83 OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o \
84 itos.o zread.o zwrite.o shtty.o \
85 netconn.o netopen.o timeval.o makepath.o pathcanon.o \
86 pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \
87 strtrans.o strindex.o snprintf.o mailstat.o fmtulong.o \
88 fmtullong.o fmtumax.o xstrchr.o zcatfd.o ${LIBOBJS}
94 $(LIBRARY_NAME): $(OBJECTS)
96 $(AR) $(ARFLAGS) $@ $(OBJECTS)
97 -test -n "$(RANLIB)" && $(RANLIB) $@
101 # The rule for 'includes' is written funny so that the if statement
102 # always returns TRUE unless there really was an error installing the
107 $(RM) $(OBJECTS) $(LIBRARY_NAME)
109 realclean distclean maintainer-clean: clean
116 # rules for losing makes, like SunOS
119 fmtullong.o: fmtullong.c
120 fmtulong.o: fmtulong.c
124 inet_aton.o: inet_aton.c
126 mailstat.o: mailstat.c
127 makepath.o: makepath.c
133 pathcanon.o: pathcanon.c
134 pathphys.o: pathphys.c
136 setlinebuf.o: setlinebuf.c
139 snprintf.o: snprintf.c
141 strcasecmp.o: strcasecmp.c
142 strerror.o: strerror.c
143 strftime.o: strftime.c
144 strindex.o: strindex.c
145 stringlist.o: stringlist.c
146 stringvec.o: stringvec.c
149 strtoimax.o: strtoimax.c
153 strtoull.o: strtoull.c
154 strtoumax.o: strtoumax.c
155 strtrans.o: strtrans.c
165 # dependencies for c files that include other c files
166 fmtullong.o: fmtulong.c
167 fmtumax.o: fmtulong.c
172 # all files in the library depend on config.h
173 clktck.o: ${BUILD_DIR}/config.h
174 clock.o: ${BUILD_DIR}/config.h
175 fmtullong.o: ${BUILD_DIR}/config.h
176 fmtulong.o: ${BUILD_DIR}/config.h
177 fmtumax.o: ${BUILD_DIR}/config.h
178 getcwd.o: ${BUILD_DIR}/config.h
179 getenv.o: ${BUILD_DIR}/config.h
180 inet_aton.o: ${BUILD_DIR}/config.h
181 itos.o: ${BUILD_DIR}/config.h
182 mailstat.o: ${BUILD_DIR}/config.h
183 makepath.o: ${BUILD_DIR}/config.h
184 memset.o: ${BUILD_DIR}/config.h
185 mktime.o: ${BUILD_DIR}/config.h
186 netconn.o: ${BUILD_DIR}/config.h
187 netopen.o: ${BUILD_DIR}/config.h
188 oslib.o: ${BUILD_DIR}/config.h
189 pathcanon.o: ${BUILD_DIR}/config.h
190 pathphys.o: ${BUILD_DIR}/config.h
191 rename.o: ${BUILD_DIR}/config.h
192 setlinebuf.o: ${BUILD_DIR}/config.h
193 shquote.o: ${BUILD_DIR}/config.h
194 shtty.o: ${BUILD_DIR}/config.h
195 snprintf.o: ${BUILD_DIR}/config.h
196 spell.o: ${BUILD_DIR}/config.h
197 strcasecmp.o: ${BUILD_DIR}/config.h
198 strerror.o: ${BUILD_DIR}/config.h
199 strftime.o: ${BUILD_DIR}/config.h
200 strindex.o: ${BUILD_DIR}/config.h
201 stringlist.o: ${BUILD_DIR}/config.h
202 stringvec.o: ${BUILD_DIR}/config.h
203 strpbrk.o: ${BUILD_DIR}/config.h
204 strtod.o: ${BUILD_DIR}/config.h
205 strtoimax.o: ${BUILD_DIR}/config.h
206 strtol.o: ${BUILD_DIR}/config.h
207 strtoll.o: ${BUILD_DIR}/config.h
208 strtoul.o: ${BUILD_DIR}/config.h
209 strtoull.o: ${BUILD_DIR}/config.h
210 strtoumax.o: ${BUILD_DIR}/config.h
211 strtrans.o: ${BUILD_DIR}/config.h
212 times.o: ${BUILD_DIR}/config.h
213 timeval.o: ${BUILD_DIR}/config.h
214 tmpfile.o: ${BUILD_DIR}/config.h
215 vprint.o: ${BUILD_DIR}/config.h
216 xstrchr.o: ${BUILD_DIR}/config.h
217 zcatfd.o: ${BUILD_DIR}/config.h
218 zread.o: ${BUILD_DIR}/config.h
219 zwrite.o: ${BUILD_DIR}/config.h
221 clktck.o: ${topdir}/bashtypes.h
223 getcwd.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
224 getcwd.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h
225 getcwd.o: ${BASHINCDIR}/memalloc.h ${BASHINCDIR}/ansi_stdlib.h
227 getenv.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
228 getenv.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
229 getenv.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
230 getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
231 getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
232 getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
233 getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
234 getenv.o: ${topdir}/pathnames.h ${topdir}/externs.h
236 inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
237 inet_aton.o: ${BASHINCDIR}/stdc.h
239 itos.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
240 itos.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
241 itos.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
242 itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
243 itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
244 itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
245 itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
246 itos.o: ${topdir}/pathnames.h ${topdir}/externs.h
248 makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
249 makepath.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
250 makepath.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
251 makepath.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
252 makepath.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
253 makepath.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
254 makepath.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
255 makepath.o: ${topdir}/pathnames.h ${topdir}/externs.h
257 netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
258 netconn.o: ${topdir}/bashtypes.h
260 netopen.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h
261 netopen.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
262 netopen.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
263 netopen.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
264 netopen.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
265 netopen.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
266 netopen.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
267 netopen.o: ${topdir}/pathnames.h ${topdir}/externs.h
269 oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
270 oslib.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
271 oslib.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
272 oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
273 oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
274 oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
275 oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
276 oslib.o: ${topdir}/pathnames.h ${topdir}/externs.h
277 oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
278 oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
280 pathcanon.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
281 pathcanon.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
282 pathcanon.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
283 pathcanon.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
284 pathcanon.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
285 pathcanon.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
286 pathcanon.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
287 pathcanon.o: ${topdir}/pathnames.h ${topdir}/externs.h
288 pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
289 pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
291 pathphys.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
292 pathphys.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
293 pathphys.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
294 pathphys.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
295 pathphys.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
296 pathphys.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
297 pathphys.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
298 pathphys.o: ${topdir}/pathnames.h ${topdir}/externs.h
299 pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
300 pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
302 rename.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h
303 rename.o: ${BASHINCDIR}/posixstat.h
305 setlinebuf.o: ${topdir}/xmalloc.h ${topdir}/bashansi.h
306 setlinebuf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/stdc.h
308 shquote.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
309 shquote.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h
311 shtty.o: ${BASHINCDIR}/shtty.h
312 shtty.o: ${BASHINCDIR}/stdc.h
314 snprintf.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h ${topdir}/xmalloc.h
315 snprintf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
316 snprintf.o: ${BASHINCDIR}/typemax.h
318 spell.o: ${topdir}/bashtypes.h
319 spell.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h
320 spell.o: ${BASHINCDIR}/ansi_stdlib.h
322 strcasecmp.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
323 strcasecmp.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
325 strerror.o: ${topdir}/bashtypes.h
326 strerror.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
327 strerror.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
328 strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
329 strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
330 strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
331 strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
332 strerror.o: ${topdir}/pathnames.h ${topdir}/externs.h
334 strindex.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
335 strindex.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
337 stringlist.o: ${topdir}/bashansi.h
338 stringlist.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
339 stringlist.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
340 stringlist.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
341 stringlist.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
342 stringlist.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
343 stringlist.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
344 stringlist.o: ${topdir}/pathnames.h ${topdir}/externs.h
346 stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h
347 stringvec.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
348 stringvec.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
349 stringvec.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
350 stringvec.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
351 stringvec.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
352 stringvec.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
353 stringvec.o: ${topdir}/pathnames.h ${topdir}/externs.h
355 strpbrk.o: ${BASHINCDIR}/stdc.h
357 strtod.o: ${topdir}/bashansi.h
358 strtod.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
360 strtoimax.o: ${BASHINCDIR}/stdc.h
362 strtol.o: ${topdir}/bashansi.h
363 strtol.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
364 strtol.o: ${BASHINCDIR}/typemax.h
366 strtoll.o: ${topdir}/bashansi.h
367 strtoll.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
368 strtoll.o: ${BASHINCDIR}/typemax.h
370 strtoul.o: ${topdir}/bashansi.h
371 strtoul.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
372 strtoul.o: ${BASHINCDIR}/typemax.h
374 strtoull.o: ${topdir}/bashansi.h
375 strtoull.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
376 strtoull.o: ${BASHINCDIR}/typemax.h
378 strtoumax.o: ${BASHINCDIR}/stdc.h
380 strtrans.o: ${topdir}/bashansi.h
381 strtrans.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
382 strtrans.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
383 strtrans.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
384 strtrans.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
385 strtrans.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
386 strtrans.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
387 strtrans.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
388 strtrans.o: ${topdir}/pathnames.h ${topdir}/externs.h
390 times.o: ${BASHINCDIR}/systimes.h
391 times.o: ${BASHINCDIR}/posixtime.h
393 timeval.o: ${BASHINCDIR}/posixtime.h
395 tmpfile.o: ${topdir}/bashtypes.h
396 tmpfile.o: ${BASHINCDIR}/posixstat.h
397 tmpfile.o: ${BASHINCDIR}/filecntl.h
399 clock.o: ${BASHINCDIR}/posixtime.h
401 mailstat.o: ${topdir}/bashansi.h
402 mailstat.o: ${topdir}/bashtypes.h
403 mailstat.o: ${BASHINCDIR}/ansi_stdlib.h
404 mailstat.o: ${BASHINCDIR}/posixstat.h
405 mailstat.o: ${BASHINCDIR}/posixdir.h
406 mailstat.o: ${BASHINCDIR}/maxpath.h
408 fmtulong.o: ${topdir}/bashansi.h
409 fmtulong.o: ${BASHINCDIR}/ansi_stdlib.h
410 fmtulong.o: ${BASHINCDIR}/chartypes.h
411 fmtulong.o: ${BASHINCDIR}/stdc.h
412 fmtulong.o: ${BASHINCDIR}/typemax.h
414 fmtullong.o: ${topdir}/bashansi.h
415 fmtullong.o: ${BASHINCDIR}/ansi_stdlib.h
416 fmtullong.o: ${BASHINCDIR}/chartypes.h
417 fmtullong.o: ${BASHINCDIR}/stdc.h
418 fmtullong.o: ${BASHINCDIR}/typemax.h
420 fmtumax.o: ${topdir}/bashansi.h
421 fmtumax.o: ${BASHINCDIR}/ansi_stdlib.h
422 fmtumax.o: ${BASHINCDIR}/chartypes.h
423 fmtumax.o: ${BASHINCDIR}/stdc.h
424 fmtumax.o: ${BASHINCDIR}/typemax.h
426 xstrchr.o: ${topdir}/bashansi.h
427 xstrchr.o: ${BASHINCDIR}/ansi_stdlib.h
428 xstrchr.o: ${BASHINCDIR}/shmbutil.h