⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile.in

📁 GCC编译器源代码
💻 IN
📖 第 1 页 / 共 5 页
字号:
# End of language makefile fragments.## Avoid a lot of time thinking about remaking Makefile.in and *.def..SUFFIXES: .in .defMakefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \   $(xmake_file) $(tmake_file) $(LANG_MAKEFILES)	$(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \		"$(xmake_file)" "$(tmake_file)"	cp config.status config.run	$(SHELL) config.run	rm -f config.run$(srcdir)/configure: $(srcdir)/configure.in	cd $(srcdir); autoconf# cstamp-h.in controls rebuilding of config.in.# It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't# delete it.  A stamp file is needed as autoheader won't update the file if# nothing has changed.# It remains in the source directory and is part of the distribution.# This follows what is done in shellutils, fileutils, etc.# "echo timestamp" is used instead of touch to be consistent with other# packages that use autoconf (??? perhaps also to avoid problems with patch?).# ??? Newer versions have a maintainer mode that may be useful here.$(srcdir)/config.in: $(srcdir)/cstamp-h.in$(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h	cd $(srcdir) && autoheader	echo timestamp > $(srcdir)/cstamp-h.inauto-config.h: cstamp-h ; @truecstamp-h: config.in config.status	CONFIG_HEADERS=auto-config.h:config.in $(SHELL) config.status# Really, really stupid make features, such as SUN's KEEP_STATE, may force# a target to build even if it is up-to-date.  So we must verify that# config.status does not exist before failing.config.status: configure version.c	@if [ ! -f config.status ] ; then \	  echo You must configure gcc.  Look at the INSTALL file for details.; \	  false; \	else \	  $(SHELL) config.status --recheck; \	fiall.internal: start.encap rest.encap# This is what to compile if making a cross-compiler.# Note that we can compile enquire using the cross-compiler just built,# although we can't run it on this machine.all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \	$(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross# This is what to compile if making gcc with a cross-compiler.all.build: native xgcc $(EXTRA_PARTS) lang.all.build# This is what must be made before installing GCC and converting libraries.start.encap: native xgcc specs $(LIBGCC1) xlimits.h lang.start.encap# These can't be made until after GCC can run.rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap# This is what is made with the host's compiler# whether making a cross compiler or not.native: config.status auto-config.h cpp $(LANGUAGES) \	$(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)# Define the names for selecting languages in LANGUAGES.C c: cc1PROTO: proto# Tell GNU make these are phony targets..PHONY: C c PROTO proto# On the target machine, finish building a cross compiler.# This does the things that can't be done on the host machine.rest.cross: $(LIBGCC) gfloat.h specs# Verify that it works to compile and link libgcc1-test.# If it does, then there are sufficient replacements for libgcc1.a.libgcc1-test: libgcc1-test.o native $(GCC_PARTS)	@echo "Testing libgcc1.  Ignore linker warning messages."	$(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \	  -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`libgcc1-test.o: libgcc1-test.c native xgcc	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c# Recompile all the language-independent object files.# This is used only if the user explicitly asks for it.compilations: ${OBJS}# Create a list of the language-independent object files so the language# subdirectories needn't mention their names explicitly.stamp-objlist: $(OBJS) $(BC_OBJS)	echo " $(OBJS) $(BC_OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist# We call this executable `xgcc' rather than `gcc'# to avoid confusion if the current directory is in the path# and CC is `gcc'.  It is renamed to `gcc' when it is installed.xgcc: gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \   $(LIBDEPS) $(EXTRA_GCC_OBJS)	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \	  choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)# Dump a specs file to make -B./ read these specs over installed ones.specs: xgcc	$(GCC_FOR_TARGET) -dumpspecs > tmp-specs	mv tmp-specs specs# We do want to create an executable named `xgcc', so we can use it to# compile libgcc2.a.# Also create gcc-cross, so that install-common will install properly.gcc-cross: xgcc	cp xgcc$(exeext) gcc-cross$(exeext)cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)# Copy float.h from its source.gfloat.h: $(FLOAT_H)	-rm -f gfloat.h	cp $(FLOAT_H) gfloat.h# Create float.h source for the native machine.# Make it empty if we can use the system float.h without changes.float.h-nat: enquire	-./enquire -f > tmp-float.h	grep '#define [^_]' tmp-float.h >/dev/null || true > tmp-float.h	mv tmp-float.h float.h-nat# Create a dummy float.h source for a cross-compiler.# ??? This isn't used anymore.  Should we create config/float-unkn.h# and make that the default float_format in configure?float.h-cross:	echo "#ifndef	__GCC_FLOAT_NOT_NEEDED" > t-float.h-cross	echo "#error float.h values not known for cross-compiler" >> t-float.h-cross	echo "#endif" >> t-float.h-cross	mv t-float.h-cross float.h-cross# Used to compile enquire with standard cc, but have forgotten why.# Let's try with GCC.enquire: enquire.o $(GCC_PARTS)	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs	rm -f include/float.h	if $(FLOAT_H_TEST); then \	  SYS_FLOAT_H_WRAP=1; \	else :; \	  SYS_FLOAT_H_WRAP=0; \	fi; \	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) \	  -DSYS_FLOAT_H_WRAP=$$SYS_FLOAT_H_WRAP \	  -I. -c $(srcdir)/enquire.c# Build the version of limits.h that we will install.xlimits.h: glimits.h limitx.h limity.h	if $(LIMITS_H_TEST) ; then \	  cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \	else \	  cat $(srcdir)/glimits.h > tmp-xlimits.h; \	fi	mv tmp-xlimits.h xlimits.h## Build libgcc.a.# This is done in two parts because some functions, in libgcc1.c,# must be compiled with something other than GCC,# while the rest, in libgcc2.c, must be compiled with xgcc.# That means we can't do libgcc2.c until after xgcc, cc1, etc.# Use this as value of LIBGCC1 to cause conversion to GNU library format.# LIBCONVERT should put its output in libgcc1.conv.libgcc1.conv: libgcc1.a	$(LIBCONVERT) libgcc1.a libgcc1.conv# Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.# Make an empty file instead.libgcc1.null: $(GCC_PASSES)	echo "__foo () {}" > dummy.c	$(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c	$(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)	rm -f dummy$(objext) dummy.c# This is $(LIBGCC1) for a cross-compiler.# We have no automatic way of building libgcc1.a, # so it's up to the installer to find a way to do that.# This rule deliberately does not depend on libgcc1.a# so that it will fail if the installer hasn't provided it.libgcc1.cross:	mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)# Compile the library of arithmetic subroutines with the native compiler.# Don't compile it with GCC!# (That would cause most arithmetic functions to call themselves.)## NOTE: If you modify these rules substantially, please be sure to# check at least config/i386/t-sco5 and possibly other makefile# fragments.libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status	-rm -f tmplibgcc1.a# Actually build it in tmplibgcc1.a, then rename at end,# so that libgcc1.a itself remains nonexistent if compilation is aborted.# -e causes any failing command to make this rule fail.# -e doesn't work in certain shells, so we test $$? as well.# lynx has a broken ar, it always complains when the initial library is# empty, thus this command works only if we don't do -e# There is a trailing backslash (\) deleted from the following line.#	set -e;	for name in $(LIB1FUNCS); \	do \	  echo $${name}; \	  rm -f $${name}$(objext); \	  $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	  mv libgcc1$(objext) $${name}$(objext); \	  $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \	  rm -f $${name}$(objext); \	done# Some shells crash when a loop has no items.# So make sure there is always at least one--`..'.# Then ignore it.# We don't use -e here because there are if statements# that should not make the command give up when the if condition is false.# Instead, we test for failure after each command where it matters.	for file in .. $(LIB1FUNCS_EXTRA); \	do \	  if [ x$${file} != x.. ]; then \	    name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \	    echo $${name}; \	    if [ $${name}.asm = $${file} ]; then \	      cp $${file} $${name}.s || exit 1; file=$${name}.s; \	    else true; fi; \	    $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	    $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \	    if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	    rm -f $${name}.s $${name}$(objext); \	  else true; \	  fi; \	done	-if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi	mv tmplibgcc1.a libgcc1.a# Build libgcc1.a from assembler source.  LIB1ASMFUNCS is the list of# functions.  LIB1ASMSRC is the name of the source file in the config# subdirectory.libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)	-rm -f tmplibgcc1.a libgcc1.S	cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S# Actually build it in tmplibgcc1.a, then rename at end,# so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.# -e causes any failing command to make this rule fail.# -e doesn't work in certain shells, so we test $$? as well.# lynx has a broken ar, it always complains when the initial library is# empty, thus this command works only if we don't do -e# There is a trailing backslash (\) deleted from the following line.#	set -e;	for name in $(LIB1ASMFUNCS); \	do \	  echo $${name}; \	  $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	  mv libgcc1$(objext) $${name}$(objext); \	  $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \	  rm -f $${name}$(objext); \	done	-rm -f libgcc1.S	mv tmplibgcc1.a libgcc1-asm.a# Generate assembly versions of the functions required for libgcc1.# You'll still need to massage the code by hand (possibly hacking# underscores and local labels) but this will get you started.libgcc1.S: libgcc1.c $(CONFIG_H) config.status	-rm -f libgcc1.S	touch libgcc1.S	for name in $(LIB1FUNCS); \	do \	  echo $${name}; \	  $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	  echo '#ifdef ' L$${name} >> libgcc1.S; \	  cat  libgcc1.s >> libgcc1.S; \	  echo '#endif /*' L$${name} '*/' >> libgcc1.S; \	  echo "" >> libgcc1.S; \	done# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.# But recompiling cc1 should not force recompilation of libgcc2.a.# If you want to force recompilation, delete libgcc2.a.libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs	-if [ -f libgcc2.ready ] ; then \		true; \	else \		touch libgcc2.ready; \	fiLIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2ADD) \   machmode.h longlong.h frame.h gansidecl.h gbl-ctors.h config.status# Actually build it in tmplibgcc2.a, then rename at end,# so that libgcc2.a itself remains nonexistent if compilation is aborted.	-rm -f tmplibgcc2.a# -e causes any failing command to make this rule fail.# -e doesn't work in certain shells, so we test $$? as well.# lynx has a broken ar, it always complains when the initial library is# empty, thus this command works only if we don't do -e# There is a trailing backslash (\) deleted from the following line.#	set -e;	for name in $(LIB2FUNCS); \	do \	  echo $${name}; \	  $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \	      $(srcdir)/libgcc2.c -o $${name}$(objext); \	  if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	  $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \	  rm -f $${name}$(objext); \	done# Some shells crash when a loop has no items.# So make sure there is always at least one--`..'.# Then ignore it.# We don't use -e here because there are if statements# that should not make the command give up when the if condition is false.# Instead, we test for failure after each command where it matters.	for file in $(LIB2ADD); do \	  name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \	  oname=` echo $${name} | sed -e 's,.*/,,'`; \	  if [ $${name}.txt = $${file} ]; then \	    for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \	      $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \		AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \		CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \		HOST_PREFIX_1="$(HOST_PREFIX_1)" \		LANGUAGES="$(LANGUAGES)" \		LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \	      if [ $$? -eq 0 ] ; then true; else exit 1; fi; \	      $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \	      rm -f $${f}; \	    else true; \	    fi; done; \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -