From: cvs Date: Tue, 19 Oct 1999 16:05:44 +0000 (+0000) Subject: Use CXXFLAGS for special configuration X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40a2bbb701969b7c3f6fb9572d679bca5f6a20f6;p=dealii-svn.git Use CXXFLAGS for special configuration git-svn-id: https://svn.dealii.org/trunk@1782 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/Makefile b/deal.II/base/source/Makefile index 037ddf93a0..5d5d5b4dd3 100644 --- a/deal.II/base/source/Makefile +++ b/deal.II/base/source/Makefile @@ -46,11 +46,11 @@ maybe-define-dimension = $(patsubst %,-Ddata_out_dimension=%,$(maybe-define-dim ../lib/go/%.go : @echo =================== Compiling with debugging information: $< \ " " $(patsubst -Ddata_out_dimension=%,dimension=%,$(maybe-define-dimension)) - @$(CXX) $(CXXFLAGS.g) $(maybe-define-dimension) -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.g) $(maybe-define-dimension) -c $< -o $@ ../lib/o/%.o : @echo =================== Compiling with optimization: $< \ " " $(patsubst -Ddata_out_dimension=%,dimension=%,$(maybe-define-dimension)) - @$(CXX) $(CXXFLAGS.o) $(maybe-define-dimension) -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.o) $(maybe-define-dimension) -c $< -o $@ lib: ../lib/libbase.g.a ../lib/libbase.a diff --git a/deal.II/common/Make.global_options b/deal.II/common/Make.global_options index c5fbcbc0c9..d73b982d94 100644 --- a/deal.II/common/Make.global_options +++ b/deal.II/common/Make.global_options @@ -5,6 +5,9 @@ # that is, the parent directory of this directory. # # Please set $D to the right path before including this file! +# +# For special compiler flags please do not edit this file but look up +# README, section Compiler flags, for further information. vpath %.a $D/base/lib vpath %.a $D/lac/lib @@ -34,8 +37,8 @@ endif %.go : %.cc #Makefile @echo =====debug========= $< - @$(CXX) $(flags) -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(flags) -c $< -o $@ %.o : %.cc #Makefile @echo =====optimized===== $< - @$(CXX) $(flags) -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(flags) -c $< -o $@ diff --git a/deal.II/common/Makefile.template b/deal.II/common/Makefile.template index 5647da35d1..5e692866c9 100644 --- a/deal.II/common/Makefile.template +++ b/deal.II/common/Makefile.template @@ -33,12 +33,12 @@ libs.g = -ldeal_II_2d.g -llac.g -lbase.g ifeq ($(debug-mode),on) libraries = $(libs.g) -flags = $(CXXFLAGS.g) $(CXXFLAGS) +flags = $(CXXFLAGS.g) endif ifeq ($(debug-mode),off) libraries = $(libs) -flags = $(CXXFLAGS.o) $(CXXFLAGS) +flags = $(CXXFLAGS.o) endif @@ -64,7 +64,7 @@ target1-o-files = $(target1-cc-files:.cc=.o) endif target1: $(target1-o-files) $(libraries) - $(CXX) $(flags) -o $@ $^ + $(CXX) $(CXXFLAGS) $(flags) -o $@ $^ ############################################################ # Continue with other targets if needed diff --git a/deal.II/common/README b/deal.II/common/README index 8e0f200876..a9ac0ef6d5 100644 --- a/deal.II/common/README +++ b/deal.II/common/README @@ -72,8 +72,26 @@ way to minimize cross-dependencies, this speeds up compilation by about the factor given after '-j', at least if you have as many processors. +3) Compiler flags: +------------------ -3) Problems, questions, further information: +Since the ISO C++ standard is still quite new and compilers still +change a lot, you might need to provide special options for the +compiler. You can do this by entering a value into the environment +variable CXXFLAGS of your shell. An example for (t)csh is + +setenv CXXFLAGS '-option1 -option2 value' + +Bash-users will know what to do instead. These options then will be +handed to the compiler and the linker during translation of the +library and your programs. + +A list of necessary flags follows: + +XXXX + + +4) Problems, questions, further information: -------------------------------------------- Feel free to ask if you have any problems with deal.II. If a question is of general interest, you may want to use our mailing list, @@ -90,8 +108,7 @@ are also very much interested in incorporating any work and bug fixes by third parties into the library; you will of course be credited by name for this. - -4) License: +5) License: ----------- Note that we have not yet fully finished the license under which we will distribute the library. However, we will keep to the following diff --git a/deal.II/deal.II/source/Makefile b/deal.II/deal.II/source/Makefile index 0ef33ef457..7d90422931 100644 --- a/deal.II/deal.II/source/Makefile +++ b/deal.II/deal.II/source/Makefile @@ -63,29 +63,29 @@ debug: 2dg 1dg 3dg # listed immediately below ../lib/1d/go/%.go : @echo ==============1d======debug============= $< - @$(CXX) $(CXXFLAGS.g) -Ddeal_II_dimension=1 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.g) -Ddeal_II_dimension=1 -c $< -o $@ ../lib/1d/o/%.o : @echo ==============1d======optimized========= $< - @$(CXX) $(CXXFLAGS.o) -Ddeal_II_dimension=1 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.o) -Ddeal_II_dimension=1 -c $< -o $@ ../lib/2d/go/%.go : @echo ==============2d======debug============= $< - @$(CXX) $(CXXFLAGS.g) -Ddeal_II_dimension=2 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.g) -Ddeal_II_dimension=2 -c $< -o $@ ../lib/2d/o/%.o : @echo ==============2d======optimized========= $< - @$(CXX) $(CXXFLAGS.o) -Ddeal_II_dimension=2 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.o) -Ddeal_II_dimension=2 -c $< -o $@ ../lib/3d/go/%.go : @echo ==============3d======debug============= $< - @$(CXX) $(CXXFLAGS.g) -Ddeal_II_dimension=3 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.g) -Ddeal_II_dimension=3 -c $< -o $@ ../lib/3d/o/%.o : @echo ==============3d======optimized========= $< - @$(CXX) $(CXXFLAGS.o) -Ddeal_II_dimension=3 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.o) -Ddeal_II_dimension=3 -c $< -o $@ # special rules for exceptional files ../lib/3d/o/q1_mapping_jacobians_3d.o: @echo "==============3d======opt==(special)====" $< - @$(CXX) $(filter-out -O2 -Wuninitialized,$(CXXFLAGS.o)) -Ddeal_II_dimension=3 -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(filter-out -O2 -Wuninitialized,$(CXXFLAGS.o)) -Ddeal_II_dimension=3 -c $< -o $@ diff --git a/deal.II/lac/source/Makefile b/deal.II/lac/source/Makefile index 5b9d6b560d..e2e965daf2 100644 --- a/deal.II/lac/source/Makefile +++ b/deal.II/lac/source/Makefile @@ -14,10 +14,10 @@ include $D/common/Make.global_options ../lib/go/%.go : @echo ============================ Compiling with debugging information: $< - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.g) -c $< -o $@ ../lib/o/%.o : @echo ============================ Compiling with optimization: $< - @$(CXX) $(CXXFLAGS.o) -c $< -o $@ + @$(CXX) $(CXXFLAGS) $(CXXFLAGS.o) -c $< -o $@ lib: ../lib/liblac.g.a ../lib/liblac.a