1 |
# |
# |
2 |
# Makefile |
# Makefile |
3 |
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 |
# Copyright (C) 1990, 91-99, 2000 |
4 |
# Free Software Foundation |
# Free Software Foundation |
5 |
# |
# |
6 |
# This file is part of the libiberty library. |
# This file is part of the libiberty library. |
92 |
"libsubdir=$(libsubdir)" \ |
"libsubdir=$(libsubdir)" \ |
93 |
"tooldir=$(tooldir)" |
"tooldir=$(tooldir)" |
94 |
|
|
95 |
|
# Subdirectories to recurse into. We need to override this during cleaning |
96 |
|
SUBDIRS = testsuite |
97 |
|
|
98 |
all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir |
all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir |
99 |
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all |
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all |
100 |
|
|
104 |
|
|
105 |
@host_makefile_frag@ |
@host_makefile_frag@ |
106 |
|
|
107 |
INCDIR=$(srcdir)/$(MULTISRCTOP)../include |
INCDIR=$(srcdir)/include |
108 |
|
|
109 |
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) |
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@ |
110 |
.c.o: |
.c.o: |
111 |
test x"$(enable_shared)" != xyes || \ |
if [ x"$(PICFLAG)" != x ]; then \ |
112 |
$(COMPILE.c) $(PICFLAG) $< -o pic/$@ |
$(COMPILE.c) $(PICFLAG) $< -o pic/$@; \ |
113 |
|
else true; fi |
114 |
$(COMPILE.c) $< |
$(COMPILE.c) $< |
115 |
|
|
116 |
info: info-subdir |
info: info-subdir |
124 |
# NOTE: If you add new files to the library, add them to this list |
# NOTE: If you add new files to the library, add them to this list |
125 |
# (alphabetical), and add them to REQUIRED_OFILES or funcs in |
# (alphabetical), and add them to REQUIRED_OFILES or funcs in |
126 |
# configure.in. |
# configure.in. |
127 |
CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \ |
CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \ |
128 |
bzero.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \ |
bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c \ |
129 |
fnmatch.c getcwd.c getopt.c getopt1.c getpagesize.c \ |
cp-demangle.c dyn-string.c fdmatch.c fnmatch.c getcwd.c \ |
130 |
getruntime.c floatformat.c hex.c index.c insque.c memchr.c \ |
getpwd.c getopt.c getopt1.c getpagesize.c getruntime.c \ |
131 |
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \ |
floatformat.c hashtab.c hex.c index.c insque.c lbasename.c \ |
132 |
pexecute.c putenv.c random.c rename.c rindex.c setenv.c sigsetmask.c \ |
md5.c memchr.c \ |
133 |
spaces.c splay-tree.c strcasecmp.c strncasecmp.c strchr.c strdup.c \ |
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \ |
134 |
strerror.c strrchr.c strsignal.c strstr.c strtod.c strtol.c strtoul.c \ |
partition.c pexecute.c putenv.c random.c rename.c rindex.c setenv.c \ |
135 |
tmpnam.c vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \ |
sigsetmask.c safe-ctype.c sort.c spaces.c splay-tree.c strcasecmp.c \ |
136 |
waitpid.c xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c |
strncasecmp.c strchr.c strdup.c strerror.c strncmp.c strrchr.c \ |
137 |
|
strsignal.c strstr.c strtod.c strtol.c strtoul.c tmpnam.c vasprintf.c \ |
138 |
|
vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c xatexit.c xexit.c \ |
139 |
|
xmalloc.c xmemdup.c xstrdup.c xstrerror.c |
140 |
|
|
141 |
# These are always included in the library. |
# These are always included in the library. |
142 |
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \ |
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o \ |
143 |
fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o \ |
dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o \ |
144 |
floatformat.o objalloc.o obstack.o pexecute.o spaces.o \ |
getruntime.o hashtab.o hex.o floatformat.o lbasename.o md5.o \ |
145 |
splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \ |
objalloc.o obstack.o \ |
146 |
xstrdup.o xstrerror.o |
partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o \ |
147 |
|
strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xmemdup.o \ |
148 |
|
xstrdup.o xstrerror.o |
149 |
|
|
150 |
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) |
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) |
151 |
rm -f $(TARGETLIB) |
-rm -f $(TARGETLIB) |
152 |
$(AR) $(AR_FLAGS) $(TARGETLIB) \ |
$(AR) $(AR_FLAGS) $(TARGETLIB) \ |
153 |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA) |
154 |
$(RANLIB) $(TARGETLIB) |
$(RANLIB) $(TARGETLIB) |
157 |
install: install_to_$(INSTALL_DEST) install-subdir |
install: install_to_$(INSTALL_DEST) install-subdir |
158 |
|
|
159 |
install_to_libdir: all |
install_to_libdir: all |
160 |
$(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n |
$(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n |
161 |
( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n ) |
( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) |
162 |
mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB) |
mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB) |
163 |
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install |
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install |
164 |
|
|
165 |
install_to_tooldir: all |
install_to_tooldir: all |
166 |
$(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n |
$(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n |
167 |
( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n ) |
( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) |
168 |
mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB) |
mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB) |
169 |
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install |
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install |
170 |
|
|
171 |
# needed-list is used by libstdc++. NEEDED is the list of functions |
# needed-list is used by libstdc++. NEEDED is the list of functions |
172 |
# to include there. Do not add anything LGPL to this list; libstdc++ |
# to include there. Do not add anything LGPL to this list; libstdc++ |
173 |
# can't use anything encumbering. |
# can't use anything encumbering. |
174 |
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \ |
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \ |
175 |
strerror strrchr strstr strtol strtoul tmpnam vfprintf vprintf \ |
strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \ |
176 |
vfork waitpid bcmp bcopy bzero |
vfork waitpid bcmp bcopy bzero |
177 |
needed-list: Makefile |
needed-list: Makefile |
178 |
rm -f needed-list; touch needed-list; \ |
rm -f needed-list; touch needed-list; \ |
190 |
echo $(REQUIRED_OFILES) > required-list |
echo $(REQUIRED_OFILES) > required-list |
191 |
|
|
192 |
stamp-picdir: |
stamp-picdir: |
193 |
if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \ |
if [ x"$(PICFLAG)" != x ] && [ ! -d pic ]; then \ |
194 |
mkdir pic; \ |
mkdir pic; \ |
195 |
else true; fi |
else true; fi |
196 |
touch stamp-picdir |
touch stamp-picdir |
213 |
|
|
214 |
# Need to deal with profiled libraries, too. |
# Need to deal with profiled libraries, too. |
215 |
|
|
216 |
|
# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS |
217 |
|
# multiple times, hence our explicit recursion with an empty SUBDIRS. |
218 |
mostlyclean: mostlyclean-subdir |
mostlyclean: mostlyclean-subdir |
219 |
rm -rf *.o pic core errs \#* *.E a.out |
-rm -rf *.o pic core errs \#* *.E a.out |
220 |
rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-* |
-rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-* |
221 |
rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir |
-rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir |
222 |
@$(MULTICLEAN) multi-clean DO=mostlyclean |
@$(MULTICLEAN) multi-clean DO=mostlyclean |
223 |
clean: mostlyclean clean-subdir |
clean: clean-subdir |
224 |
rm -f *.a required-list tmpmulti.out |
$(MAKE) SUBDIRS="" mostlyclean |
225 |
|
-rm -f *.a required-list tmpmulti.out |
226 |
@$(MULTICLEAN) multi-clean DO=clean |
@$(MULTICLEAN) multi-clean DO=clean |
227 |
distclean: clean distclean-subdir |
distclean: distclean-subdir |
228 |
|
$(MAKE) SUBDIRS="" clean |
229 |
@$(MULTICLEAN) multi-clean DO=distclean |
@$(MULTICLEAN) multi-clean DO=distclean |
230 |
rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out |
-rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out |
231 |
rm -f config.log |
-rm -f config.log |
232 |
maintainer-clean realclean: distclean maintainer-clean-subdir |
-rmdir testsuite 2>/dev/null |
233 |
|
maintainer-clean realclean: maintainer-clean-subdir |
234 |
|
$(MAKE) SUBDIRS="" distclean |
235 |
|
|
236 |
force: |
force: |
237 |
|
|
238 |
Makefile: $(srcdir)/Makefile.in config.status |
Makefile: $(srcdir)/Makefile.in config.status |
239 |
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status |
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status |
240 |
|
|
241 |
|
# Depending on Makefile makes sure that config.status has been re-run |
242 |
|
# if needed. This prevents problems with parallel builds. |
243 |
config.h: stamp-h ; @true |
config.h: stamp-h ; @true |
244 |
stamp-h: config.in config.status |
stamp-h: config.in config.status Makefile |
245 |
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status |
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status |
246 |
|
|
247 |
config.status: $(srcdir)/configure $(srcdir)/config.table |
config.status: $(srcdir)/configure $(srcdir)/config.table |
248 |
$(SHELL) ./config.status --recheck |
$(SHELL) ./config.status --recheck |
249 |
|
|
250 |
|
|
251 |
|
# Depending on config.h makes sure that config.status has been re-run |
252 |
|
# if needed. This prevents problems with parallel builds, in case |
253 |
|
# subdirectories need to run config.status also. |
254 |
all-subdir check-subdir installcheck-subdir info-subdir \ |
all-subdir check-subdir installcheck-subdir info-subdir \ |
255 |
install-info-subdir clean-info-subdir dvi-subdir install-subdir \ |
install-info-subdir clean-info-subdir dvi-subdir install-subdir \ |
256 |
etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \ |
etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \ |
257 |
maintainer-clean-subdir: |
maintainer-clean-subdir: config.h |
258 |
@target=`echo $@ | sed -e 's/-subdir//'`; \ |
@subdirs='$(SUBDIRS)'; \ |
259 |
cd testsuite && $(MAKE) $$target |
target=`echo $@ | sed -e 's/-subdir//'`; \ |
260 |
|
for dir in $$subdirs ; do \ |
261 |
|
cd $$dir && $(MAKE) $$target; \ |
262 |
|
done |
263 |
|
|
264 |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir |
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir |
265 |
|
|
271 |
clock.o: config.h |
clock.o: config.h |
272 |
concat.o: $(INCDIR)/libiberty.h |
concat.o: $(INCDIR)/libiberty.h |
273 |
cplus-dem.o: config.h $(INCDIR)/demangle.h |
cplus-dem.o: config.h $(INCDIR)/demangle.h |
274 |
|
cp-demangle.o: config.h $(INCDIR)/dyn-string.h $(INCDIR)/demangle.h |
275 |
|
dyn-string.o: config.h $(INCDIR)/dyn-string.h |
276 |
fdmatch.o: $(INCDIR)/libiberty.h |
fdmatch.o: $(INCDIR)/libiberty.h |
277 |
fnmatch.o: config.h $(INCDIR)/fnmatch.h |
fnmatch.o: config.h $(INCDIR)/fnmatch.h |
278 |
getcwd.o: config.h |
getcwd.o: config.h |
279 |
getopt.o: config.h $(INCDIR)/getopt.h |
getopt.o: config.h $(INCDIR)/getopt.h |
280 |
getopt1.o: config.h $(INCDIR)/getopt.h |
getopt1.o: config.h $(INCDIR)/getopt.h |
281 |
getpagesize.o: config.h |
getpagesize.o: config.h |
282 |
|
getpwd.o: config.h $(INCDIR)/libiberty.h |
283 |
getruntime.o: config.h $(INCDIR)/libiberty.h |
getruntime.o: config.h $(INCDIR)/libiberty.h |
284 |
hex.o: $(INCDIR)/libiberty.h |
hex.o: $(INCDIR)/libiberty.h |
285 |
floatformat.o: $(INCDIR)/floatformat.h |
floatformat.o: $(INCDIR)/floatformat.h |
286 |
|
lbasename.o: $(INCDIR)/libiberty.h |
287 |
mkstemps.o: config.h |
mkstemps.o: config.h |
288 |
objalloc.o: $(INCDIR)/objalloc.h |
md5.o: config.h |
289 |
|
objalloc.o: config.h $(INCDIR)/objalloc.h |
290 |
obstack.o: config.h $(INCDIR)/obstack.h |
obstack.o: config.h $(INCDIR)/obstack.h |
291 |
|
partition.o: config.h $(INCDIR)/partition.h |
292 |
pexecute.o: config.h $(INCDIR)/libiberty.h |
pexecute.o: config.h $(INCDIR)/libiberty.h |
293 |
|
rename.o: config.h |
294 |
setenv.o: config.h |
setenv.o: config.h |
295 |
|
sort.o: config.h $(INCDIR)/sort.h $(INCDIR)/ansidecl.h |
296 |
spaces.o: $(INCDIR)/libiberty.h |
spaces.o: $(INCDIR)/libiberty.h |
297 |
splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h |
splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h |
298 |
strerror.o: config.h $(INCDIR)/libiberty.h |
strerror.o: config.h $(INCDIR)/libiberty.h |
299 |
strsignal.o: config.h $(INCDIR)/libiberty.h |
strsignal.o: config.h $(INCDIR)/libiberty.h |
300 |
|
strtol.o: config.h |
301 |
|
strtoul.o: config.h |
302 |
|
vasprintf.o: config.h |
303 |
xatexit.o: $(INCDIR)/libiberty.h |
xatexit.o: $(INCDIR)/libiberty.h |
304 |
xexit.o: $(INCDIR)/libiberty.h |
xexit.o: config.h $(INCDIR)/libiberty.h |
305 |
xmalloc.o: $(INCDIR)/libiberty.h |
xmalloc.o: config.h $(INCDIR)/libiberty.h |
306 |
|
xmemdup.o: config.h $(INCDIR)/libiberty.h |
307 |
xstrdup.o: config.h $(INCDIR)/libiberty.h |
xstrdup.o: config.h $(INCDIR)/libiberty.h |
308 |
xstrerror.o: config.h $(INCDIR)/libiberty.h |
xstrerror.o: config.h $(INCDIR)/libiberty.h |
309 |
|
waitpid.o: config.h |
310 |
|
hashtab.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/ansidecl.h |