OSDN Git Service

(ENDFILE_SPEC): Add -lgloss.
[pf3gnuchains/gcc-fork.git] / Makefile.in
index af7fb16..4187c43 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Makefile for directory with subdirs to build.
-#   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
+#   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -100,6 +100,7 @@ GZIPPROG = gzip
 # These values are substituted by configure.
 DEFAULT_YACC = yacc
 DEFAULT_LEX = lex
+DEFAULT_M4 = m4
 
 BISON = `if [ -f $$r/bison/bison ] ; then \
            echo $$r/bison/bison -L $$s/bison/ ; \
@@ -121,7 +122,7 @@ LEX = `if [ -f $$r/flex/flex ] ; \
 
 M4 = `if [ -f $$r/m4/m4 ] ; \
        then echo $$r/m4/m4 ; \
-       else echo m4 ; fi`
+       else echo ${DEFAULT_M4} ; fi`
 
 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
        then echo $$r/texinfo/makeinfo/makeinfo ; \
@@ -151,7 +152,7 @@ OTHERS =
 
 # This is set by the configure script to the list of directories which
 # should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
+TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ libf2c winsup
 
 # Target libraries are put under this directory:
 # Changed by configure to $(target_alias) if cross.
@@ -175,18 +176,24 @@ REALLY_SET_LIB_PATH = \
 
 ALL = all.normal
 INSTALL_TARGET = installdirs \
+       install-gcc \
        $(INSTALL_MODULES) \
        $(INSTALL_TARGET_MODULES) \
        $(INSTALL_X11_MODULES) \
-       install-gcc \
        $(INSTALL_DOSREL)
 
+INSTALL_TARGET_CROSS = installdirs \
+       install-gcc-cross \
+       $(INSTALL_MODULES) \
+       $(INSTALL_TARGET_MODULES) \
+       $(INSTALL_X11_MODULES) \
+       $(INSTALL_DOSREL)
 
 CC_FOR_TARGET = ` \
   if [ -f $$r/gcc/xgcc ] ; then \
     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
       if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
-        echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+        echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
       else \
         echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
       fi; \
@@ -212,7 +219,7 @@ CXX_FOR_TARGET = ` \
   if [ -f $$r/gcc/xgcc ] ; then \
     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
       if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
-        echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+        echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
       else \
         echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
       fi; \
@@ -338,8 +345,6 @@ BASE_FLAGS_TO_PASS = \
        "MAKE=$(MAKE)" \
        "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
        "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
-       "PICFLAG=$(PICFLAG)" \
-       "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
        "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
        "SHELL=$(SHELL)" \
        "EXPECT=$(EXPECT)" \
@@ -349,7 +354,8 @@ BASE_FLAGS_TO_PASS = \
        "YACC=$(YACC)" \
        "exec_prefix=$(exec_prefix)" \
        "prefix=$(prefix)" \
-       "tooldir=$(tooldir)" 
+       "tooldir=$(tooldir)" \
+       "gxx_include_dir=$(gxx_include_dir)"
 
 # Flags to pass down to most sub-makes, in which we're building with
 # the host environment.
@@ -395,7 +401,6 @@ EXTRA_TARGET_FLAGS = \
        'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
        'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
        'NM=$$(NM_FOR_TARGET)' \
-       'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
        'RANLIB=$$(RANLIB_FOR_TARGET)' \
        'WINDRES=$$(WINDRES_FOR_TARGET)'
 
@@ -612,7 +617,6 @@ INSTALL_MODULES = \
        install-sn \
        install-tar \
        install-tcl \
-       install-texinfo \
        install-textutils \
        install-tgas \
        install-time \
@@ -665,6 +669,7 @@ ALL_TARGET_MODULES = \
        all-target-librx \
        all-target-libg++ \
        all-target-newlib \
+       all-target-libf2c \
        all-target-winsup \
        all-target-libgloss \
        all-target-libiberty \
@@ -679,6 +684,7 @@ CONFIGURE_TARGET_MODULES = \
        configure-target-librx \
        configure-target-libg++ \
        configure-target-newlib \
+       configure-target-libf2c \
        configure-target-winsup \
        configure-target-libgloss \
        configure-target-libiberty \
@@ -692,6 +698,7 @@ CHECK_TARGET_MODULES = \
        check-target-libstdc++ \
        check-target-libg++ \
        check-target-newlib \
+       check-target-libf2c \
        check-target-winsup \
        check-target-libiberty \
        check-target-gperf
@@ -703,6 +710,7 @@ INSTALL_TARGET_MODULES = \
        install-target-libstdc++ \
        install-target-libg++ \
        install-target-newlib \
+       install-target-libf2c \
        install-target-winsup \
        install-target-libgloss \
        install-target-libiberty \
@@ -774,6 +782,7 @@ CLEAN_TARGET_MODULES = \
        clean-target-librx \
        clean-target-libg++ \
        clean-target-newlib \
+       clean-target-libf2c \
        clean-target-winsup \
        clean-target-libgloss \
        clean-target-libiberty \
@@ -893,7 +902,7 @@ local-clean:
        -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
 
 local-distclean:
-       -rm -f Makefile config.status config.cache
+       -rm -f Makefile config.status config.cache mh-frag mt-frag
        -if [ "$(TARGET_SUBDIR)" != "." ]; then \
          rm -rf $(TARGET_SUBDIR); \
        else true; fi
@@ -947,8 +956,9 @@ check: $(CHECK_MODULES) \
 
 # Installation targets.
 
-.PHONY: install uninstall source-vault binary-vault vault-install
+.PHONY: install install-cross uninstall source-vault binary-vault vault-install
 install: $(INSTALL_TARGET) 
+install-cross: $(INSTALL_TARGET_CROSS) 
 
 uninstall:
        @echo "the uninstall target is not supported in this tree"
@@ -1157,11 +1167,13 @@ $(CONFIGURE_TARGET_MODULES):
              libsrcdir="$$s/$${dir}"; \
            fi; \
            if [ -f $${libsrcdir}/configure ] ; then \
-             $(SHELL) $${libsrcdir}/configure \
+             rm -f no-such-file; \
+             CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
                $(CONFIG_ARGUMENTS) $${srcdiroption} \
                --with-target-subdir="$(TARGET_SUBDIR)"; \
            else \
-             $(SHELL) $$s/configure \
+             rm -f no-such-file; \
+             CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
                $(CONFIG_ARGUMENTS) $${srcdiroption} \
                --with-target-subdir="$(TARGET_SUBDIR)"; \
            fi; \
@@ -1273,16 +1285,51 @@ all-gcc:
          true; \
        fi
 
-.PHONY: all-bootstrap
-all-bootstrap:
-       @if [ -f ./gcc/Makefile ] ; then \
-         r=`pwd`; export r; \
-         s=`cd $(srcdir); pwd`; export s; \
-         $(SET_LIB_PATH) \
-         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
-       else \
-         true; \
-       fi
+# Building GCC uses some tools for rebuilding "source" files
+# like texinfo, bison/byacc, etc.  So we must depend on those.
+#
+# While building GCC, it may be necessary to run various target
+# programs like the assembler, linker, etc.  So we depend on
+# those too.
+#
+# In theory, on an SMP all those dependencies can be resolved
+# in parallel.
+#
+.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
+bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
+       @r=`pwd`; export r; \
+       s=`cd $(srcdir); pwd`; export s; \
+       $(SET_LIB_PATH) \
+       echo "Bootstrapping the compiler"; \
+       cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
+       @r=`pwd`; export r; \
+       s=`cd $(srcdir); pwd`; export s; \
+       case "$@" in \
+         *bootstrap4-lean ) \
+                       msg="Comparing stage3 and stage4 of the compiler"; \
+                       compare=compare3-lean ;; \
+         *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
+                       compare=compare3 ;; \
+         *-lean )      msg="Comparing stage2 and stage3 of the compiler"; \
+                       compare=compare-lean ;; \
+         * )           msg="Comparing stage2 and stage3 of the compiler"; \
+                       compare=compare ;; \
+       esac; \
+       $(SET_LIB_PATH) \
+       echo "$$msg"; \
+       cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
+       @echo "Building runtime libraries"; \
+       $(MAKE) all
+
+.PHONY: cross
+cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
+       @r=`pwd`; export r; \
+       s=`cd $(srcdir); pwd`; export s; \
+       $(SET_LIB_PATH) \
+       echo "Building the C and C++ compiler"; \
+       cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
+       @echo "Building runtime libraries"; \
+       $(MAKE) all LANGUAGES="c c++"
 
 .PHONY: check-gcc
 check-gcc:
@@ -1306,7 +1353,16 @@ install-gcc:
          true; \
        fi
 
-
+.PHONY: install-gcc-cross
+install-gcc-cross:
+       @if [ -f ./gcc/Makefile ] ; then \
+         r=`pwd`; export r; \
+         s=`cd $(srcdir); pwd`; export s; \
+         $(SET_LIB_PATH) \
+         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
+       else \
+         true; \
+       fi
 # EXPERIMENTAL STUFF
 # This rule is used to install the modules which use FLAGS_TO_PASS.
 # To build a target install-X means to cd to X and make install.
@@ -1353,7 +1409,6 @@ all-gash: all-tcl
 all-gawk:
 ALL_GCC = all-gcc
 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
-all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
 GDB_TK = all-tk all-tcl all-itcl all-tix
 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
 all-gnuserv:
@@ -1377,11 +1432,13 @@ configure-target-libgloss: $(ALL_GCC)
 all-target-libgloss: configure-target-libgloss configure-target-newlib
 configure-target-libio: $(ALL_GCC)
 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
+check-target-libio: all-target-libstdc++
 all-libiberty:
 configure-target-librx: $(ALL_GCC) configure-target-newlib
 all-target-librx: configure-target-librx
 configure-target-libstdc++: $(ALL_GCC)
 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
+all-target-libf2c: configure-target-libf2c all-gas all-ld all-gcc all-target-libiberty all-target-newlib
 all-m4: all-libiberty
 all-make: all-libiberty
 all-mmalloc: