diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-06-23 03:31:47 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2006-06-23 03:31:47 +0000 |
commit | 2d6ee90c4f66b9a6920e966a1bc3ab23770bc843 (patch) | |
tree | 3b42c5e7969dfbec5e75792a58976ca4f7b3c308 /lib/make/make.config.defn.in | |
parent | 8f7d0a83e9651213369cb0c5eaadb307de57a27c (diff) |
Add a new configuration flag PROFILE=yes, which enables profiling in a
build. This flag is equivalent to OPTIMISE=yes and DEBUG=yes.
Additional compiler options {C,CXX,F77,F90}_PROFILE_FLAGS are also
introduced.
The configuration stage sets the F77 flags to the F90 flags if an F90
compiler is found. This flag setting was done too early, namely
before the default values for the F90 flags were set. This flag
setting has been moved to a later time.
The link command used undefined make variables $(OPTIMISE_C) etc.
These variables have been removed. Instead $(CXX_OPTIMISE_FLAGS)
etc. are added to the link statement. This makes the linker pick up
the correct flags e.g. for profiling.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4327 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/make.config.defn.in')
-rw-r--r-- | lib/make/make.config.defn.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/make/make.config.defn.in b/lib/make/make.config.defn.in index 12f523af..96839461 100644 --- a/lib/make/make.config.defn.in +++ b/lib/make/make.config.defn.in @@ -69,6 +69,12 @@ CXX_OPTIMISE_FLAGS = @CXX_OPTIMISE_FLAGS@ F90_OPTIMISE_FLAGS = @F90_OPTIMISE_FLAGS@ F77_OPTIMISE_FLAGS = @F77_OPTIMISE_FLAGS@ +# Profiling flags +C_PROFILE_FLAGS = @C_PROFILE_FLAGS@ +CXX_PROFILE_FLAGS = @CXX_PROFILE_FLAGS@ +F90_PROFILE_FLAGS = @F90_PROFILE_FLAGS@ +F77_PROFILE_FLAGS = @F77_PROFILE_FLAGS@ + # Warning flags C_WARN_FLAGS = @C_WARN_FLAGS@ CXX_WARN_FLAGS = @CXX_WARN_FLAGS@ @@ -201,6 +207,16 @@ ifeq ($(strip $(CCTK_OPTIMISE_MODE)),yes) F90FLAGS += $(F90_OPTIMISE_FLAGS) endif +# Is this a profiling configuration ? +CCTK_PROFILE_MODE = @PROFILE_MODE@ + +ifeq ($(strip $(CCTK_PROFILE_MODE)),yes) + CFLAGS += $(C_PROFILE_FLAGS) + CXXFLAGS += $(CXX_PROFILE_FLAGS) + F77FLAGS += $(F77_PROFILE_FLAGS) + F90FLAGS += $(F90_PROFILE_FLAGS) +endif + # Are we building with all warnings switched on ? # This option may be overwritten at compile time. ifeq ($(WARN),) |