1997-08-22 00:57:35 +02:00
|
|
|
#
|
|
|
|
# Makefile
|
1998-05-16 01:42:58 +02:00
|
|
|
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
|
|
|
|
# Free Software Foundation
|
1997-08-22 00:57:35 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
# This file was written by K. Richard Pixley <rich@cygnus.com>.
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Makefile for libiberty directory
|
|
|
|
#
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
prefix = @prefix@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
SHELL = @SHELL@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
# Multilib support variables.
|
|
|
|
MULTISRCTOP =
|
|
|
|
MULTIBUILDTOP =
|
|
|
|
MULTIDIRS =
|
|
|
|
MULTISUBDIR =
|
|
|
|
MULTIDO = true
|
|
|
|
MULTICLEAN = true
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
AR = @AR@
|
1997-08-22 00:57:35 +02:00
|
|
|
AR_FLAGS = rc
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
CC = @CC@
|
|
|
|
CFLAGS = @CFLAGS@
|
1997-08-22 00:57:35 +02:00
|
|
|
LIBCFLAGS = $(CFLAGS)
|
1998-05-16 01:42:58 +02:00
|
|
|
RANLIB = @RANLIB@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
PICFLAG =
|
|
|
|
|
|
|
|
MAKEOVERRIDES =
|
|
|
|
|
|
|
|
TARGETLIB = libiberty.a
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
LIBOBJS = @LIBOBJS@
|
1998-10-09 00:48:52 +02:00
|
|
|
ALLOCA = @ALLOCA@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
# 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)"
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
all: stamp-picdir $(TARGETLIB) needed-list required-list
|
|
|
|
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
.PHONY: check installcheck
|
|
|
|
check installcheck:
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
@host_makefile_frag@
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
INCDIR=$(srcdir)/$(MULTISRCTOP)../include
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
|
1997-08-22 00:57:35 +02:00
|
|
|
.c.o:
|
1998-02-06 01:33:49 +01:00
|
|
|
test x"$(enable_shared)" != xyes || \
|
1997-08-22 00:57:35 +02:00
|
|
|
$(COMPILE.c) $(PICFLAG) $< -o pic/$@
|
|
|
|
$(COMPILE.c) $<
|
|
|
|
|
|
|
|
info install-info clean-info dvi:
|
|
|
|
|
|
|
|
# Include files that are in this directory.
|
1998-05-16 01:42:58 +02:00
|
|
|
HFILES = alloca-conf.h
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
# NOTE: If you add new files to the library, add them to this list
|
1998-05-16 01:42:58 +02:00
|
|
|
# (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 \
|
1999-02-09 14:40:23 +01:00
|
|
|
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \
|
1998-05-16 01:42:58 +02:00
|
|
|
pexecute.c random.c rename.c rindex.c sigsetmask.c spaces.c \
|
1998-12-21 06:57:18 +01:00
|
|
|
splay-tree.c strcasecmp.c strncasecmp.c strchr.c strdup.c strerror.c \
|
1998-05-16 01:42:58 +02:00
|
|
|
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
|
|
|
|
|
1997-08-22 00:57:35 +02:00
|
|
|
# These are always included in the library.
|
1998-05-16 01:42:58 +02:00
|
|
|
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \
|
1997-08-22 00:57:35 +02:00
|
|
|
fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o \
|
1999-02-09 01:17:32 +01:00
|
|
|
floatformat.o objalloc.o obstack.o pexecute.o spaces.o \
|
1998-10-21 11:19:13 +02:00
|
|
|
splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
|
|
|
|
xstrdup.o xstrerror.o
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-10-09 00:48:52 +02:00
|
|
|
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
|
1998-05-16 01:42:58 +02:00
|
|
|
rm -f $(TARGETLIB)
|
|
|
|
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
1998-10-09 00:48:52 +02:00
|
|
|
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
|
1998-05-16 01:42:58 +02:00
|
|
|
$(RANLIB) $(TARGETLIB)
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
INSTALL_DEST = @INSTALL_DEST@
|
1997-08-22 00:57:35 +02:00
|
|
|
install: install_to_$(INSTALL_DEST)
|
|
|
|
|
|
|
|
install_to_libdir: all
|
1997-09-10 04:46:16 +02:00
|
|
|
$(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n
|
|
|
|
( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB).n )
|
|
|
|
mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
|
1997-08-22 00:57:35 +02:00
|
|
|
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
|
|
|
|
|
|
|
install_to_tooldir: all
|
1997-09-10 04:46:16 +02:00
|
|
|
$(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)
|
1997-08-22 00:57:35 +02:00
|
|
|
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
# needed-list is used by libstdc++.
|
|
|
|
needed-list: Makefile
|
1998-10-09 00:48:52 +02:00
|
|
|
f="$(LIBOBJS) $(ALLOCA) $(EXTRA_OFILES)"; \
|
1997-08-22 00:57:35 +02:00
|
|
|
case $$f in \
|
1998-05-16 01:42:58 +02:00
|
|
|
*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.
|
1997-08-22 00:57:35 +02:00
|
|
|
required-list: Makefile
|
|
|
|
echo $(REQUIRED_OFILES) > required-list
|
|
|
|
|
|
|
|
stamp-picdir:
|
1998-02-06 01:33:49 +01:00
|
|
|
if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
|
1997-08-22 00:57:35 +02:00
|
|
|
mkdir pic; \
|
|
|
|
else true; fi
|
|
|
|
touch stamp-picdir
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
.PHONY: all etags tags ls clean stage1 stage2
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
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
|
1998-05-24 00:32:53 +02:00
|
|
|
rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
|
1998-10-09 00:48:52 +02:00
|
|
|
rm -f config.log
|
1997-08-22 00:57:35 +02:00
|
|
|
maintainer-clean realclean: distclean
|
|
|
|
|
|
|
|
force:
|
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
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
|
1997-08-22 00:57:35 +02:00
|
|
|
|
1998-10-09 00:48:52 +02:00
|
|
|
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir
|
1998-05-22 02:20:51 +02:00
|
|
|
|
1998-05-16 01:42:58 +02:00
|
|
|
alloca.o: config.h
|
|
|
|
atexit.o: config.h
|
|
|
|
argv.o: config.h alloca-conf.h $(INCDIR)/libiberty.h
|
1997-08-22 00:57:35 +02:00
|
|
|
basename.o: $(INCDIR)/libiberty.h
|
1998-05-16 01:42:58 +02:00
|
|
|
choose-temp.o: config.h
|
|
|
|
clock.o: config.h
|
1997-08-22 00:57:35 +02:00
|
|
|
concat.o: $(INCDIR)/libiberty.h
|
1998-10-12 19:45:24 +02:00
|
|
|
cplus-dem.o: config.h $(INCDIR)/demangle.h
|
1997-08-22 00:57:35 +02:00
|
|
|
fdmatch.o: $(INCDIR)/libiberty.h
|
1998-05-16 01:42:58 +02:00
|
|
|
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
|
1997-08-22 00:57:35 +02:00
|
|
|
hex.o: $(INCDIR)/libiberty.h
|
|
|
|
floatformat.o: $(INCDIR)/floatformat.h
|
1999-02-09 14:40:23 +01:00
|
|
|
mkstemps.o: config.h
|
1997-08-22 00:57:35 +02:00
|
|
|
objalloc.o: $(INCDIR)/objalloc.h
|
1998-10-12 19:45:24 +02:00
|
|
|
obstack.o: config.h $(INCDIR)/obstack.h
|
1998-05-16 01:42:58 +02:00
|
|
|
pexecute.o: config.h $(INCDIR)/libiberty.h
|
1997-08-22 00:57:35 +02:00
|
|
|
spaces.o: $(INCDIR)/libiberty.h
|
1998-11-25 19:02:19 +01:00
|
|
|
splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h
|
1998-05-16 01:42:58 +02:00
|
|
|
strerror.o: config.h $(INCDIR)/libiberty.h
|
|
|
|
strsignal.o: config.h $(INCDIR)/libiberty.h
|
1997-08-22 00:57:35 +02:00
|
|
|
xatexit.o: $(INCDIR)/libiberty.h
|
|
|
|
xexit.o: $(INCDIR)/libiberty.h
|
|
|
|
xmalloc.o: $(INCDIR)/libiberty.h
|
1999-01-30 14:28:44 +01:00
|
|
|
xstrdup.o: config.h $(INCDIR)/libiberty.h
|
1998-05-16 01:42:58 +02:00
|
|
|
xstrerror.o: config.h $(INCDIR)/libiberty.h
|