summaryrefslogtreecommitdiff
path: root/lib/make/make.configuration
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-06-23 03:31:47 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2006-06-23 03:31:47 +0000
commit2d6ee90c4f66b9a6920e966a1bc3ab23770bc843 (patch)
tree3b42c5e7969dfbec5e75792a58976ca4f7b3c308 /lib/make/make.configuration
parent8f7d0a83e9651213369cb0c5eaadb307de57a27c (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.configuration')
-rw-r--r--lib/make/make.configuration7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/make/make.configuration b/lib/make/make.configuration
index c71dab46..922e5d5c 100644
--- a/lib/make/make.configuration
+++ b/lib/make/make.configuration
@@ -33,6 +33,9 @@ endif
ifneq ($(strip $(OPTIMIZE)), )
$(warning "You specified 'OPTIMIZE=$(OPTIMIZE)'. This option is evaluated only at configuration time and will be ignored at compile time.")
endif
+ifneq ($(strip $(PROFILE)), )
+ $(warning "You specified 'PROFILE=$(PROFILE)'. This option is evaluated only at configuration time and will be ignored at compile time.")
+endif
export MAKE_DIR = $(CCTK_HOME)/lib/make
@@ -120,9 +123,9 @@ ALLCACTUSLIBS = $(ALLCACTUSLIBS_BASE:%=$(CCTK_LIBNAME_PREFIX)%)
# Build the executable
$(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %,$(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX),$(notdir $(THORNS) $(CACTUSLIBS)))
@echo Creating $(EXE) in $(EXEDIR) from $(THORNS)
- $(CC) $(OPTIMISE_C) $(DEBUG_C) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" -I"$(call TRANSFORM_DIRS,$(CCTK_HOME)/src/include)" -I"$(call TRANSFORM_DIRS,$(CONFIG))" "$(call TRANSFORM_DIRS,$(DATESTAMP))"
+ $(CC) $(CFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" -I"$(call TRANSFORM_DIRS,$(CCTK_HOME)/src/include)" -I"$(call TRANSFORM_DIRS,$(CONFIG))" "$(call TRANSFORM_DIRS,$(DATESTAMP))"
if [ ! -d $(EXEDIR) ]; then $(MKDIR) $(MKDIRFLAGS) $(EXEDIR) ; fi
- $(LD) $(CREATEEXE)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$@)" $(DEBUG_LD) $(LDFLAGS) $(EXTRAFLAGS) "$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES)
+ $(LD) $(CREATEEXE)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$@)" $(CXXFLAGS) $(LDFLAGS) $(EXTRAFLAGS) "$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES)
@echo $(DIVIDER)
# Version file