# Makefile for GNU C compiler.
-# Copyright (C) 1987, 88, 90-95, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1987, 88, 90-96, 1997 Free Software Foundation, Inc.
#This file is part of GNU CC.
# Selection of languages to be made.
# This is overridden by configure.
-LANGUAGES = c objective-c proto
+LANGUAGES = c objective-c proto gcov
# Selection of languages to be made during stage1 build.
# This is overridden by configure.
$(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
$(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
$(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
- $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
+ $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-mn10300.h \
+ $(srcdir)/ginclude/va-pa.h \
$(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
$(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
+ $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
$(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
- $(srcdir)/ginclude/proto.h $(srcdir)/ginclude/va-sh.h $(EXTRA_HEADERS) \
+ $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS) \
$(LANG_EXTRA_HEADERS)
# Target to use whe installing assert.h. Some systems may
# -g1 causes output of debug info only for file-scope entities.
# we use this here because that should be enough, and also
# so that -g1 will be tested.
-LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
+LIBGCC2_DEBUG_CFLAGS = -g1
+LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
# Additional options to use when compiling libgcc2.a.
# Some targets override this to -Iinclude
# On most systems, this is empty.
OTHER_FIXINCLUDES_DIRS=
+# A list of all the language-specific executables.
+# This is overridden by configure.
+COMPILERS = cc1$(exeext) cc1obj$(exeext)
+
# List of things which should already be built whenever we try to use xgcc
# to compile anything (without linking).
GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES)
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
"SHELL=$(SHELL)" \
+ "STAGE_PREFIX=set-by-configure" \
"exeext=$(exeext)" \
"objext=$(objext)" \
"exec_prefix=$(exec_prefix)" \
\f
# Lists of files for various purposes.
-# A list of all the language-specific executables.
-# This is overridden by configure.
-COMPILERS = cc1$(exeext) cc1obj$(exeext)
-
# Language-specific object files for C.
C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
+ profile.o \
insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
# GEN files are listed separately, so they can be built before doing parallel
$(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
protoize$(exeext) unprotoize$(exeext) \
specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
+ gcov$(exeext) *.bp \
*.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
*.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
*.[si] \
if [ -d $(dir) ]; then \
cd $(dir); \
rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
+ else true; \
fi
$(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)" \
MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
mv t$${f} $(dir)/$${f}; \
+ else true; \
fi; done
objc-runtime: libobjc.a
dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
insn-config.h reload.h output.h defaults.h
dwarf2out.o : dwarf2out.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf2.h flags.h \
- insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h
+ insn-config.h reload.h output.h defaults.h hard-reg-set.h regs.h expr.h
xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
insn-config.h recog.h
+profile.o : profile.c $(CONFIG_H) $(RTL_H) flags.h insn-flags.h gcov-io.h \
+ tree.h output.h
loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
global.o : global.c $(CONFIG_H) $(RTL_H) flags.h \
basic-block.h regs.h hard-reg-set.h insn-config.h output.h
-reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h \
+reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h expr.h\
reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
@echo Expect zero differences.
diff $(srcdir)/protoize.c tmp-proto.c | cat
-rm -f tmp-proto.[cs] tmp-proto$(objext)
+
+gcov.o: gcov.c gcov-io.h
+
+gcov: gcov.o $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
\f
# Build the include directory. The stamp files are stmp-* rather than
# stamp-* so that mostlyclean does not force the include directory to
thisdir1=`pwd`; \
srcdir1=`cd $(srcdir); pwd`; \
cd objc; \
- $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
- srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
- GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
- GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
+ if [ -f $${srcdir1}/objc/Makefile ]; then \
+ $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
+ srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
+ GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
+ GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include; \
+ fi
touch objc-headers
# Files related to the fixproto script.
cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) cpp.texi
$(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
- md.texi rtl.texi tm.texi
+ md.texi rtl.texi tm.texi gcov.texi
cd $(srcdir); $(MAKEINFO) $(MAKEINFOFLAGS) gcc.texi
dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
# This works with GNU Make's default rule.
$(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
- md.texi rtl.texi tm.texi
+ md.texi rtl.texi tm.texi gcov.texi
$(TEXI2DVI) $<
# This works with GNU Make's default rule.
-rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
# Delete core dumps.
-rm -f core */core
+ -rm -f *.bp */*.bp
# Delete all files made by compilation
# that don't exist in the distribution.
fi
-rm -f $(libsubdir)/cpp$(exeext)
$(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
+# Install gcov if it was compiled.
+ -if [ -f gcov$(exeext) ]; \
+ then \
+ rm -f $(bindir)/gcov$(exeext); \
+ $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
+ chmod a+x $(bindir)/gcov$(exeext); \
+ fi
# Install the driver program as $(target_alias)-gcc
# and also as either gcc (if native) or $(tooldir)/bin/gcc.