# Start of package rules fragment generated by ../../../libstdc++/config.shared.

all: $(PICDIR) libs multi-all
	@rootme=`pwd`/; export rootme; \
	$(MAKE) "DODIRS=$(SUBDIRS)" DO=all $(FLAGS_TO_PASS) subdir_do
.PHONY: all

.PHONY: multi-all
multi-all:
	@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all


.PHONY: subdir_do
subdir_do: force
	@rootme=`pwd`/; export rootme; \
	for i in $(DODIRS); do \
		if [ -f  ./$$i/Makefile ] ; then \
			echo "cd $$i; make $(DO) ..." ; \
			(cd $$i ; $(MAKE) $(FLAGS_TO_PASS) $(DO)) || exit 1 ; \
		else true ; fi ; \
	done

# List of variables to pass to sub-makes.  This should not be needed
# by GNU make or Sun make (both of which pass command-line variable
# overrides thouh $(MAKE)) but may be needed by older versions.

FLAGS_TO_PASS= \
	"SHELL=$(SHELL)" \
	"INSTALL=$(INSTALL)" \
	"INSTALL_DATA=$(INSTALL_DATA)" \
	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
	"prefix=$(prefix)" \
	"exec_prefix=$(exec_prefix)" \
	"tooldir=$(tooldir)" \
	"gxx_include_dir=$(gxx_include_dir)" \
	"libsubdir=$(libsubdir)" \
	"gcc_version=$(gcc_version)" \
	"gcc_version_trigger=$(gcc_version_trigger)" \
	"AR=$(AR)" \
	"AR_FLAGS=$(AR_FLAGS)" \
	"CC=$(CC)" \
	"CXX=$(CXX)" \
	"CFLAGS=$(CFLAGS)" \
	"CXXFLAGS=$(CXXFLAGS)" \
	"NM=$(NM)" \
	"RANLIB=$(RANLIB)" \
	"LIBCFLAGS=$(LIBCFLAGS)" \
	"LIBCXXFLAGS=$(LIBCXXFLAGS)" \
	"LOADLIBES=$(LOADLIBES)" \
	"LDFLAGS=$(LDFLAGS)" \
	"MAKEINFO=$(MAKEINFO)" \
	"SHLIB=$(SHLIB)" \
	"SHCURSES=$(SHCURSES)" \
	"RUNTESTFLAGS=$(RUNTESTFLAGS)"
NOSTDINC = -nostdinc++
CXXINCLUDES = -I../../../libstdc++ -I../../../libstdc++/stl -I../libio -I../../../libstdc++/../libio $(NOSTDINC)
XCFLAGS = $(LIBCFLAGS)
XCXXFLAGS = $(LIBCXXFLAGS)
.SUFFIXES: .o .C .cc .c
COMPILE.c = $(CC) -c $(XCFLAGS) $(CINCLUDES) $(MT_CFLAGS)
.c.o:
	test x"$(enable_shared)" != xyes ||\
	  $(COMPILE.c) $(PICFLAG) $< -o pic/$@
	$(COMPILE.c) $<
COMPILE.cc = $(CXX) -c $(XCXXFLAGS) $(CXXINCLUDES) $(MT_CFLAGS)
.C.o:
	test x"$(enable_shared)" != xyes ||\
	  $(COMPILE.cc) $(PICFLAG) $< -o pic/$@
	$(COMPILE.cc) $<
.cc.o:
	test x"$(enable_shared)" != xyes || \
	  $(COMPILE.cc) $(PICFLAG) $< -o pic/$@
	$(COMPILE.cc) $<


stamp-picdir:
	if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
	  mkdir pic; \
	else true; fi
	touch stamp-picdir

.PHONY: install
install:
.PHONY: check
check: $(PICDIR) libs 
	rootme=`pwd`/; export rootme; \
	SAVE_LLPATH="$${SAVE_LLPATH-$$LD_LIBRARY_PATH}"; export SAVE_LLPATH; \
	LD_LIBRARY_PATH="$${rootme}${TOLIBGXX}../libstdc++:$${rootme}${TOLIBGXX}../libg++:$$SAVE_LLPATH"; \
	export LD_LIBRARY_PATH; \
	$(MAKE) "DODIRS=$(CHECK_SUBDIRS)" DO=check $(FLAGS_TO_PASS) subdir_do
.PHONY: info dvi install-info clean-info
info:
dvi:
install-info:
.PHONY: do-clean-info clean-info do-clean-dvi clean-dvi
do-clean-info:
do-clean-dvi:
clean-info: do-clean-info
clean-dvi: do-clean-dvi

.PHONY: boltcc
boltcc:
	rootme=`pwd`/ ; export rootme ; $(MAKE) $(FLAGS_TO_PASS)


# clean rules
.PHONY: mostlyclean clean distclean maintainer-clean realclean
.PHONY: do-clean subdir_distclean subdir_maintainer_clean
mostlyclean: do-clean-dvi
	rm -rf *.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK) 
	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=mostlyclean subdir_do
	@$(MULTICLEAN) multi-clean DO=mostlyclean
do-clean: do-clean-dvi
	rm -rf *.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)  $(CLEAN_JUNK)
clean: do-clean
	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=clean subdir_do
	@$(MULTICLEAN) multi-clean DO=clean
subdir_distclean:
	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=distclean subdir_do
distclean: do-clean subdir_distclean
	@$(MULTICLEAN) multi-clean DO=distclean
	rm -rf config.status Makefile *~ Make.pack target-mkfrag multilib.out target-mkfrag
subdir_maintainer_clean:
	@$(MAKE) $(FLAGS_TO_PASS) "DODIRS=$(SUBDIRS)" DO=maintainer-clean subdir_do
maintainer-clean realclean: do-clean subdir_maintainer_clean do-clean-info
	@$(MULTICLEAN) multi-clean DO=maintainer-clean
	rm -rf config.status Makefile *~ Make.pack target-mkfrag multilib.out target-mkfrag depend *.info*

.PHONY: force
force:

# with the gnu make, this is done automatically.

Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
	$(SHELL) ./config.status

.NOEXPORT:
MAKEOVERRIDES=
DEPEND_SOURCES = ${srcdir}/*.cc ${srcdir}/*.c
depend.new:
# The sed script below attempts to make the depend output portable.
# It cleans up the depenency information generated by cpp.
# It replaces instances of $(srcdir)/ by the string '$(srcdir)/'.
# It removes remaining absolute files names (such as /usr/include/stdio.h).
# It removes lines containing only "\\".
# It inserts '$(MULTISRCTOP)' in '$(srcdir)/..'.
# In order to support SunOS VPATH, $(srcdir)/[a-z]*.{c,cc} is replaced with
# [a-z]*.{c,cc} (the directory part is removed).
# The awk script removes a continuation marker that is followed by
# a blank line, since that may confuse make.
	echo "# AUTOMATICALLY GENERATED BY 'make depend' - DO NOT EDIT" \
	  >depend.new
	$(CXX) -M $(CXXINCLUDES) $(DEPEND_SOURCES) \
	| sed -e 's|$(srcdir)/|$$(srcdir)/|g' \
	      -e 's| [^ ]_G_config.h| $$(_G_CONFIG_H)|g \
	      -e 's| /[^ ]*||g' \
	      -e '/^[ 	]*\\$$/d' -e 's/^[ 	]*$$//' \
	| sed -e 's|$$(srcdir)/[.][.]|$$(srcdir)/$$(MULTISRCTOP)..|g' \
	      -e 's|$$(srcdir)/\([^/]*[.]c\)|\1|' \
	| awk 'BEGIN   { prev = "" } \
	      /^( )*$$/ { if (prev ~ /\\$$/) \
	                    { prev = substr(prev,1,length(prev)-1); next } } \
	                { print prev; prev = $$0 } \
	      END { if (prev !~ /^( )*$$/) print prev }' \
	>> depend.new
$(srcdir)/depend:  depend.new
	mv depend.new $(srcdir)/depend
# End of package rules fragment generated by ../../../libstdc++/config.shared.
