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
|
#
# Makefile
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
# Free Software Foundation
#
# This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# Libiberty 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with libiberty; see the file COPYING.LIB. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# This file was written by K. Richard Pixley <rich@cygnus.com>.
#
# Makefile for libiberty directory
#
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
SHELL = @SHELL@
# Multilib support variables.
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
AR_FLAGS = rc
CC = @CC@
CFLAGS = @CFLAGS@
LIBCFLAGS = $(CFLAGS)
RANLIB = @RANLIB@
PICFLAG =
MAKEOVERRIDES =
TARGETLIB = libiberty.a
LIBOBJS = @LIBOBJS@
ALLOCA = @ALLOCA@
# A configuration can specify extra .o files that should be included,
# even if they are in libc. (Perhaps the libc version is buggy.)
EXTRA_OFILES =
# Flags to pass to a recursive make.
FLAGS_TO_PASS = \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"EXTRA_OFILES=$(EXTRA_OFILES)" \
"HDEFINES=$(HDEFINES)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"LDFLAGS=$(LDFLAGS)" \
"LOADLIBES=$(LOADLIBES)" \
"RANLIB=$(RANLIB)" \
"SHELL=$(SHELL)"
all: stamp-picdir $(TARGETLIB) needed-list required-list
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
.PHONY: check installcheck
check installcheck:
@host_makefile_frag@
INCDIR=$(srcdir)/$(MULTISRCTOP)../include
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
.c.o:
test x"$(enable_shared)" != xyes || \
$(COMPILE.c) $(PICFLAG) $< -o pic/$@
$(COMPILE.c) $<
info install-info clean-info dvi:
# Include files that are in this directory.
HFILES = alloca-conf.h
# NOTE: If you add new files to the library, add them to this list
# (alphabetical), and add them to REQUIRED_OFILES or funcs in
# configure.in.
CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
bzero.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \
fnmatch.c getcwd.c getopt.c getopt1.c getpagesize.c \
getruntime.c floatformat.c hex.c index.c insque.c memchr.c \
memcmp.c memcpy.c memmove.c memset.c mkstemp.c objalloc.c obstack.c \
pexecute.c random.c rename.c rindex.c sigsetmask.c spaces.c \
splay-tree.o strcasecmp.c strncasecmp.c strchr.c strdup.c strerror.c \
strrchr.c strsignal.c strstr.c strtod.c strtol.c strtoul.c \
tmpnam.c vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \
waitpid.c xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c
# These are always included in the library.
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \
fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o \
floatformat.o mkstemp.o objalloc.o obstack.o pexecute.o spaces.o \
splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
xstrdup.o xstrerror.o
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
rm -f $(TARGETLIB)
$(AR) $(AR_FLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
$(RANLIB) $(TARGETLIB)
INSTALL_DEST = @INSTALL_DEST@
install: install_to_$(INSTALL_DEST)
install_to_libdir: all
$(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n
( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
install_to_tooldir: all
$(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n
( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
# needed-list is used by libstdc++.
needed-list: Makefile
f="$(LIBOBJS) $(ALLOCA) $(EXTRA_OFILES)"; \
case $$f in \
*alloca.o*) f="$$f xmalloc.o xexit.o" ;; \
esac; \
echo $$f > needed-list
# required-list was used when building a shared bfd/opcodes/libiberty
# library. I don't know if it used by anything currently.
required-list: Makefile
echo $(REQUIRED_OFILES) > required-list
stamp-picdir:
if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
.PHONY: all etags tags ls clean stage1 stage2
etags tags: TAGS
TAGS: $(CFILES) $(HFILES)
etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
# The standalone demangler (c++filt) has been moved to binutils.
demangle:
@echo "The standalone demangler, now named c++filt, is now"
@echo "a part of binutils."
@false
ls:
@echo Makefile $(HFILES) $(CFILES)
# Need to deal with profiled libraries, too.
mostlyclean:
rm -rf *.o pic core errs \#* *.E a.out
rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
@$(MULTICLEAN) multi-clean DO=mostlyclean
clean: mostlyclean
rm -f *.a required-list tmpmulti.out
@$(MULTICLEAN) multi-clean DO=clean
distclean: clean
@$(MULTICLEAN) multi-clean DO=distclean
rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
rm -f config.log
maintainer-clean realclean: distclean
force:
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
config.h: stamp-h ; @true
stamp-h: config.in config.status
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
config.status: $(srcdir)/configure $(srcdir)/config.table
$(SHELL) ./config.status --recheck
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir
alloca.o: config.h
atexit.o: config.h
argv.o: config.h alloca-conf.h $(INCDIR)/libiberty.h
basename.o: $(INCDIR)/libiberty.h
choose-temp.o: config.h
clock.o: config.h
concat.o: $(INCDIR)/libiberty.h
cplus-dem.o: config.h $(INCDIR)/demangle.h
fdmatch.o: $(INCDIR)/libiberty.h
fnmatch.o: config.h $(INCDIR)/fnmatch.h
getcwd.o: config.h
getopt.o: config.h $(INCDIR)/getopt.h
getopt1.o: config.h $(INCDIR)/getopt.h
getpagesize.o: config.h
getruntime.o: config.h $(INCDIR)/libiberty.h
hex.o: $(INCDIR)/libiberty.h
floatformat.o: $(INCDIR)/floatformat.h
mkstemp.o: config.h
objalloc.o: $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
pexecute.o: config.h $(INCDIR)/libiberty.h
spaces.o: $(INCDIR)/libiberty.h
splay-tree.o: $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h
strerror.o: config.h $(INCDIR)/libiberty.h
strsignal.o: config.h $(INCDIR)/libiberty.h
xatexit.o: $(INCDIR)/libiberty.h
xexit.o: $(INCDIR)/libiberty.h
xmalloc.o: $(INCDIR)/libiberty.h
xstrdup.o: $(INCDIR)/libiberty.h
xstrerror.o: config.h $(INCDIR)/libiberty.h
|