# Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library 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.

# The GNU C Library 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 the GNU C Library; see the file COPYING.LIB.  If not,
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

# We dont support long doubles yet

long-double-fcts = no

ifndef subdir
# These are only wanted for the toplevel make.

# Making install-headers does not work for the toplevel in GNU make
# 3.77 (only headers in subdirs are installed), and the construct looks
# suspicious.  Let's override it here with an explicit rule (can do
# since we can override an implicit rule).
#  And gnu/stubs.h really is a needed header file; it is not suitable to
# only install it with "install-others".
install-headers: install-headers-nosubdir $(inst_includedir)/gnu/stubs.h

# install-lib should install libc.a too.
#  If you want this to depend using a more complicated construct like in
# $(installed-libcs), go ahead and try.
install-lib: $(inst_libdir)/libc.a

# Although we do use GNU ld (2.6 currently), we cannot use the
# symbol-sets, because it complicates the dynamic linking.
# Note that we compile this as set-init.c for ELF.
#
# FIXME:  Change to use a list of weak references (cris-init), so we
# don't pull in everything that ever needs initialization.
#  (Right now there's just a silly "progname = argv[0]" function, and
# there's other stuff that squeaks louder).
# FIXME:  This seems incomplete and obsolete.  There are other "symbol
# sets", which must be run at times and have their own tables.
# The definition of +init_subdirs does not seem correct.
libc-init = munch-init
$(objpfx)munch-init.c: munch.awk munch-tmpl.c $(+subdir_inits) set-init.c
	echo '#ifdef __ELF__' > $@-t
	cat set-init.c >> $@-t
	echo '#else' >> $@-t
	awk -f $< subdirs='$(+init_subdirs)' $(word 2,$^) >> $@-t
	echo '#endif' >> $@-t
	mv -f $@-t $@
generated := $(generated) munch-init.c

endif # ! subdir

# Since we don't link, this is not used yet.  Making sure it's not
# lost when that time comes.
gnulib = -lgcc -lic
