diff options
-rwxr-xr-x | lib/make/configure | 21 | ||||
-rw-r--r-- | lib/make/configure.in | 20 | ||||
-rw-r--r-- | lib/make/make.config.defn.in | 4 | ||||
-rw-r--r-- | lib/make/make.config.rules.in | 4 |
4 files changed, 45 insertions, 4 deletions
diff --git a/lib/make/configure b/lib/make/configure index a2094cbc..98a8bdbd 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -3238,24 +3238,28 @@ if test -z "F90_WARN_FLAGS" ; then fi -#Set the createexe flag if it's not been set by now +# Set the createexe flag if it's not been set by now : ${CREATEEXE="-o"} +# Set the directory seperator for this architecture : ${DIRSEP="/"} +# Set the option seperator for this architecture. Hopefully it is the same for all compilers. : ${OPTIONSEP='$(EMPTY_VAR) # a single space'} +# How to link the cactus libraries : ${CACTUSLIBLINKLINE='-L$(CCTK_LIBDIR) $(addprefix -l, $(ALLCACTUSLIBS))'} +# How to generate C dependency info : ${C_DEPEND='$(CC) -E -M $(CPPFLAGS)'} @@ -3264,6 +3268,7 @@ fi : ${C_DEPEND_OUT=' > $@'} +# How to generate C++ dependency info : ${CXX_DEPEND='$(CXX) -E -M $(CPPFLAGS)'} @@ -3272,6 +3277,7 @@ fi : ${CXX_DEPEND_OUT=' > $@'} +# How to generate F77 dependency info : ${F77_DEPEND='$(CPP) -M $(CPPFLAGS)'} @@ -3280,6 +3286,7 @@ fi : ${F77_DEPEND_OUT=' > $@'} +# How to generate F90 dependency info : ${F_DEPEND='$(CPP) -M $(CPPFLAGS)'} @@ -3288,21 +3295,32 @@ fi : ${F_DEPEND_OUT=' > $@'} +# How to generate an intermediate C++ name (some compilers are very picky). + + + +: ${CXX_WORKING_NAME='$(notdir $<)'} + +# How to get the current working directory when in the shell : ${GET_WD="pwd"} +# Any additional system include directories. : ${SYS_INC_DIRS=" "} +# How to link in the non-Cactus libraries : ${GENERAL_LIBRARIES='$(LIBDIRS:%=-L%) $(LIBS:%=-l%)'} +# Do we need to make sure Perl makes a backup when editting in place ? : ${PERL_BACKUP_NECESSARY=""} # Cache stuff - this will probably change +# L2 Cache : ${L2_CACHELINE_BYTES="0"} : ${L2_CACHE_SIZE="0"} @@ -3521,6 +3539,7 @@ s%@F77_DEPEND@%$F77_DEPEND%g s%@F77_DEPEND_OUT@%$F77_DEPEND_OUT%g s%@F_DEPEND@%$F_DEPEND%g s%@F_DEPEND_OUT@%$F_DEPEND_OUT%g +s%@CXX_WORKING_NAME@%$CXX_WORKING_NAME%g s%@GET_WD@%$GET_WD%g s%@SYS_INC_DIRS@%$SYS_INC_DIRS%g s%@GENERAL_LIBRARIES@%$GENERAL_LIBRARIES%g diff --git a/lib/make/configure.in b/lib/make/configure.in index 74e6944d..b6de4d4f 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -602,24 +602,28 @@ if test -z "F90_WARN_FLAGS" ; then fi -#Set the createexe flag if it's not been set by now +# Set the createexe flag if it's not been set by now AC_SUBST(CREATEEXE) : ${CREATEEXE="-o"} +# Set the directory seperator for this architecture AC_SUBST(DIRSEP) : ${DIRSEP="/"} +# Set the option seperator for this architecture. Hopefully it is the same for all compilers. AC_SUBST(OPTIONSEP) : ${OPTIONSEP='$(EMPTY_VAR) # a single space'} +# How to link the cactus libraries AC_SUBST(CACTUSLIBLINKLINE) : ${CACTUSLIBLINKLINE='-L$(CCTK_LIBDIR) $(addprefix -l, $(ALLCACTUSLIBS))'} +# How to generate C dependency info AC_SUBST(C_DEPEND) : ${C_DEPEND='$(CC) -E -M $(CPPFLAGS)'} @@ -628,6 +632,7 @@ AC_SUBST(C_DEPEND_OUT) : ${C_DEPEND_OUT=' > $@'} +# How to generate C++ dependency info AC_SUBST(CXX_DEPEND) : ${CXX_DEPEND='$(CXX) -E -M $(CPPFLAGS)'} @@ -636,6 +641,7 @@ AC_SUBST(CXX_DEPEND_OUT) : ${CXX_DEPEND_OUT=' > $@'} +# How to generate F77 dependency info AC_SUBST(F77_DEPEND) : ${F77_DEPEND='$(CPP) -M $(CPPFLAGS)'} @@ -644,6 +650,7 @@ AC_SUBST(F77_DEPEND_OUT) : ${F77_DEPEND_OUT=' > $@'} +# How to generate F90 dependency info AC_SUBST(F_DEPEND) : ${F_DEPEND='$(CPP) -M $(CPPFLAGS)'} @@ -652,21 +659,32 @@ AC_SUBST(F_DEPEND_OUT) : ${F_DEPEND_OUT=' > $@'} +# How to generate an intermediate C++ name (some compilers are very picky). + +AC_SUBST(CXX_WORKING_NAME) + +: ${CXX_WORKING_NAME='$(notdir $<)'} + +# How to get the current working directory when in the shell AC_SUBST(GET_WD) : ${GET_WD="pwd"} +# Any additional system include directories. AC_SUBST(SYS_INC_DIRS) : ${SYS_INC_DIRS=" "} +# How to link in the non-Cactus libraries AC_SUBST(GENERAL_LIBRARIES) : ${GENERAL_LIBRARIES='$(LIBDIRS:%=-L%) $(LIBS:%=-l%)'} +# Do we need to make sure Perl makes a backup when editting in place ? AC_SUBST(PERL_BACKUP_NECESSARY) : ${PERL_BACKUP_NECESSARY=""} # Cache stuff - this will probably change +# L2 Cache : ${L2_CACHELINE_BYTES="0"} : ${L2_CACHE_SIZE="0"} diff --git a/lib/make/make.config.defn.in b/lib/make/make.config.defn.in index 9d734140..0574666b 100644 --- a/lib/make/make.config.defn.in +++ b/lib/make/make.config.defn.in @@ -91,6 +91,10 @@ CXX_DEPEND_OUT = @CXX_DEPEND_OUT@ F_DEPEND_OUT = @F_DEPEND_OUT@ F77_DEPEND_OUT = @F77_DEPEND_OUT@ +# Some compilers are very picky about the names of C++ files + +CXX_WORKING_NAME = @CXX_WORKING_NAME@ + # Exclude some files from the dependency lists DEP_EXCLUDE_FILES = CParameterStructNames\.h|cctk_Arguments\.h|definethisthorn\.h|FParameters.h|CParameters\.h diff --git a/lib/make/make.config.rules.in b/lib/make/make.config.rules.in index b4964024..64d4ba1e 100644 --- a/lib/make/make.config.rules.in +++ b/lib/make/make.config.rules.in @@ -76,11 +76,11 @@ endef # Define how to do a C++ compilation define PREPROCESS_CXX -cat $< | $(PERL) $(C_FILE_PROCESSOR) $(CONFIG) > $(notdir $<) +cat $< | $(PERL) $(C_FILE_PROCESSOR) $(CONFIG) > $(CXX_WORKING_NAME) endef define COMPILE_CXX -current_wd=`$(GET_WD)` ; cd $(SCRATCH_BUILD) ; $(CXX) $(CXXFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$$current_wd$(DIRSEP)$@ $$current_wd$(DIRSEP)$(notdir $<) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE +current_wd=`$(GET_WD)` ; cd $(SCRATCH_BUILD) ; $(CXX) $(CXXFLAGS) $(CCOMPILEONLY)$(OPTIONSEP)$$current_wd$(DIRSEP)$@ $$current_wd$(DIRSEP)$(CXX_WORKING_NAME) $(INC_DIRS:%=-I%) $(EXTRA_DEFINES:%=-D%) -DCCODE endef define POSTPROCESS_CXX |