2 # Makefile for the Bash library
5 # Copyright (C) 1998 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@
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) \
58 $(CC) -c $(CCFLAGS) $<
60 # The name of the library target.
61 LIBRARY_NAME = libsh.a
63 # The C code source files for this library.
64 CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
65 strcasecmp.c strerror.c strtod.c strtol.c strtoul.c \
66 vprint.c itos.c rename.c zread.c zwrite.c shtty.c \
67 inet_aton.c netopen.c strpbrk.c timeval.c makepath.c
69 # The header files for this library.
72 # The object files contained in $(LIBRARY_NAME)
73 OBJECTS = clktck.o clock.o getcwd.o getenv.o oslib.o setlinebuf.o \
74 strcasecmp.o strerror.o strtod.o strtol.o strtoul.o \
75 vprint.o itos.o rename.o zread.o zwrite.o shtty.o \
76 inet_aton.o netopen.o strpbrk.o timeval.o makepath.o
82 $(LIBRARY_NAME): $(OBJECTS)
84 $(AR) $(ARFLAGS) $@ $(OBJECTS)
85 -test -n "$(RANLIB)" && $(RANLIB) $@
89 # The rule for 'includes' is written funny so that the if statement
90 # always returns TRUE unless there really was an error installing the
95 $(RM) $(OBJECTS) $(LIBRARY_NAME)
97 realclean distclean maintainer-clean: clean
104 # rules for losing makes, like SunOS
109 inet_aton.o: inet_aton.c
114 setlinebuf.o: setlinebuf.c
117 strcasecmp.o: strcasecmp.c
118 strerror.o: strerror.c
129 # all files in the library depend on config.h
130 clktck.o: ${BUILD_DIR}/config.h
131 clock.o: ${BUILD_DIR}/config.h
132 getcwd.o: ${BUILD_DIR}/config.h
133 getenv.o: ${BUILD_DIR}/config.h
134 inet_aton.o: ${BUILD_DIR}/config.h
135 itos.o: ${BUILD_DIR}/config.h
136 netopen.o: ${BUILD_DIR}/config.h
137 oslib.o: ${BUILD_DIR}/config.h
138 rename.o: ${BUILD_DIR}/config.h
139 setlinebuf.o: ${BUILD_DIR}/config.h
140 shquote.o: ${BUILD_DIR}/config.h
141 shtty.o: ${BUILD_DIR}/config.h
142 strcasecmp.o: ${BUILD_DIR}/config.h
143 strerror.o: ${BUILD_DIR}/config.h
144 strpbrk.o: ${BUILD_DIR}/config.h
145 strtod.o: ${BUILD_DIR}/config.h
146 strtol.o: ${BUILD_DIR}/config.h
147 strtoul.o: ${BUILD_DIR}/config.h
148 times.o: ${BUILD_DIR}/config.h
149 timeval.o: ${BUILD_DIR}/config.h
150 vprint.o: ${BUILD_DIR}/config.h
151 zread.o: ${BUILD_DIR}/config.h
152 zwrite.o: ${BUILD_DIR}/config.h
154 clktck.o: ${topdir}/bashtypes.h
156 getcwd.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
157 getcwd.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h
158 getcwd.o: ${BASHINCDIR}/memalloc.h ${BASHINCDIR}/ansi_stdlib.h
160 getenv.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
161 getenv.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
162 getenv.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
163 getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
164 getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
165 getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
166 getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
167 getenv.o: ${topdir}/pathnames.h ${topdir}/externs.h
169 inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
170 inet_aton.o: ${BASHINCDIR}/stdc.h
172 itos.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
173 itos.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
174 itos.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
175 itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
176 itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
177 itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
178 itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
179 itos.o: ${topdir}/pathnames.h ${topdir}/externs.h
181 netopen.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
183 oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
184 oslib.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
185 oslib.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
186 oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
187 oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
188 oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
189 oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
190 oslib.o: ${topdir}/pathnames.h ${topdir}/externs.h
191 oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
192 oslib.o: ${BASHINCDIR}/ansi_stdlib.h
194 rename.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h
196 shtty.o: ${BASHINCDIR}/shtty.h
197 shtty.o: ${BASHINCDIR}/stdc.h
199 strcasecmp.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
201 strerror.o: ${topdir}/bashtypes.h
202 strerror.o: ${topdir}/shell.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
203 strerror.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
204 strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h
205 strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
206 strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
207 strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
208 strerror.o: ${topdir}/pathnames.h ${topdir}/externs.h
210 strpbrk.o: ${BASHINCDIR}/stdc.h
212 strtod.o: ${topdir}/bashansi.h
213 strtod.o: ${BASHINCDIR}/ansi_stdlib.h
215 strtol.o: ${topdir}/bashansi.h
216 strtol.o: ${BASHINCDIR}/ansi_stdlib.h
218 strtoul.o: ${topdir}/bashansi.h
219 strtoul.o: ${BASHINCDIR}/ansi_stdlib.h
221 times.o: ${BASHINCDIR}/systimes.h
222 times.o: ${BASHINCDIR}/posixtime.h
224 timeval.o: ${BASHINCDIR}/posixtime.h
226 clock.o: ${BASHINCDIR}/posixtime.h