From da04060decec8af00e99d3739d572a0f0f6ff92e Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 31 Jan 2000 12:01:55 +0000 Subject: [PATCH] Take over Makefiles from /doc/development/Makefile.small. git-svn-id: https://svn.dealii.org/trunk@2287 0785d39b-7218-0410-832d-ea1e28bc413d --- .../examples/step-by-step/step-1/Makefile | 162 ++++++++++++----- .../examples/step-by-step/step-2/Makefile | 164 +++++++++++++----- .../examples/step-by-step/step-3/Makefile | 163 ++++++++++++----- .../examples/step-by-step/step-4/Makefile | 164 +++++++++++++----- .../examples/step-by-step/step-5/Makefile | 163 ++++++++++++----- .../examples/step-by-step/step-6/Makefile | 163 ++++++++++++----- .../examples/step-by-step/step-7/Makefile | 163 ++++++++++++----- .../examples/step-by-step/step-8/Makefile | 163 ++++++++++++----- deal.II/examples/step-1/Makefile | 162 ++++++++++++----- deal.II/examples/step-2/Makefile | 164 +++++++++++++----- deal.II/examples/step-3/Makefile | 163 ++++++++++++----- deal.II/examples/step-4/Makefile | 164 +++++++++++++----- deal.II/examples/step-5/Makefile | 163 ++++++++++++----- deal.II/examples/step-6/Makefile | 163 ++++++++++++----- deal.II/examples/step-7/Makefile | 163 ++++++++++++----- deal.II/examples/step-8/Makefile | 163 ++++++++++++----- 16 files changed, 1856 insertions(+), 754 deletions(-) diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-1/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-1/Makefile index 95ea84a536..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-1/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-1/Makefile @@ -1,97 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-2/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-2/Makefile index bdae823424..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-2/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-2/Makefile @@ -1,99 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-3/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-3/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-3/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-3/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-4/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-4/Makefile index c2a1f0cbde..495da02f83 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-4/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-4/Makefile @@ -1,45 +1,78 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with. this example needs the 3d -# part as well +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ - $(lib-deal2-3d.g) \ + $(lib-deal2-3d.g) \ $(lib-lac.g) \ $(lib-base.g) libs.o = $(lib-deal2-2d.o) \ - $(lib-deal2-3d.o) \ + $(lib-deal2-3d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) @@ -49,53 +82,88 @@ else endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-5/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-5/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-5/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-5/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-6/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-6/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-6/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-6/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-7/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-7/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-7/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-7/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-8/Makefile b/deal.II/deal.II/Attic/examples/step-by-step/step-8/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-8/Makefile +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-8/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-1/Makefile b/deal.II/examples/step-1/Makefile index 95ea84a536..11c833fdbc 100644 --- a/deal.II/examples/step-1/Makefile +++ b/deal.II/examples/step-1/Makefile @@ -1,97 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-2/Makefile b/deal.II/examples/step-2/Makefile index bdae823424..11c833fdbc 100644 --- a/deal.II/examples/step-2/Makefile +++ b/deal.II/examples/step-2/Makefile @@ -1,99 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-3/Makefile b/deal.II/examples/step-3/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/examples/step-3/Makefile +++ b/deal.II/examples/step-3/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-4/Makefile b/deal.II/examples/step-4/Makefile index c2a1f0cbde..495da02f83 100644 --- a/deal.II/examples/step-4/Makefile +++ b/deal.II/examples/step-4/Makefile @@ -1,45 +1,78 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with. this example needs the 3d -# part as well +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ - $(lib-deal2-3d.g) \ + $(lib-deal2-3d.g) \ $(lib-lac.g) \ $(lib-base.g) libs.o = $(lib-deal2-2d.o) \ - $(lib-deal2-3d.o) \ + $(lib-deal2-3d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) @@ -49,53 +82,88 @@ else endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-5/Makefile b/deal.II/examples/step-5/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/examples/step-5/Makefile +++ b/deal.II/examples/step-5/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-6/Makefile b/deal.II/examples/step-6/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/examples/step-6/Makefile +++ b/deal.II/examples/step-6/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-7/Makefile b/deal.II/examples/step-7/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/examples/step-7/Makefile +++ b/deal.II/examples/step-7/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + diff --git a/deal.II/examples/step-8/Makefile b/deal.II/examples/step-8/Makefile index be82c25ebd..11c833fdbc 100644 --- a/deal.II/examples/step-8/Makefile +++ b/deal.II/examples/step-8/Makefile @@ -1,98 +1,167 @@ # $Id$ -# Copyright W. Bangerth, University of Heidelberg, 1999 - -# Template for makefiles for the examples subdirectory. In principle, -# everything should be done automatically if you set the target file -# here correctly. We get deduce it from the files in the present -# directory: -target = $(basename $(shell echo step-*.cc)) - -# All dependencies between files should be updated by the included -# file Makefile.dep if necessary. Object files are compiled into -# the archives ./Obj.a and ./Obj.g.a. By default, the debug version -# is used to link. It you don't like that, change the following -# variable to "off" + + +# For the small projects Makefile, you basically need to fill in only +# four fields. +# +# The first is the name of the application. It is assumed that the +# application name is the same as the base file name of the single C++ +# file from which the application is generated. +target = $(basename $(shell echo step-*.cc)) + +# The second field determines whether you want to run your program in +# debug or optimized mode. The latter is significantly faster, but no +# run-time checking of parameters and internal states is performed, so +# you should set this value to `on' while you develop your program, +# and to `off' when running production computations. debug-mode = on +# As third field, we need to give the path to the top-level deal.II +# directory. You need to adjust this to your needs. Since this path is +# probably the most often needed one in the Makefile internals, it is +# designated by a single-character variable, since that can be +# reference using $D only, i.e. without the parentheses that are +# required for most other parameters, as e.g. in $(target). +D = ../../../../ -############################################################################### -# Internals -#deal include base path -D = ../../../.. +# The last field specifies the names of data and other files that +# shall be deleted when calling `make clean'. Object and backup files, +# executables and the like are removed anyway. Here, we give a list of +# files in the various output formats that deal.II supports. +clean-up-files = *gmv *gnuplot *gpl *eps *pov -include $D/common/Make.global_options -# get lists of files we need -# list of libraries needed to link with +# +# +# Usually, you will not need to change something beyond this point. +# +# +# The next statement tell the `make' program where to find the +# deal.II top level directory and to include the file with the global +# settings +include $D/common/Make.global_options + + +# Since the whole project consists of only one file, we need not +# consider difficult dependencies. We only have to declare the +# libraries which we want to link to the object file, and there need +# to be two sets of libraries: one for the debug mode version of the +# application and one for the optimized mode. Here we have selected +# the versions for 2d. Note that the order in which the libraries are +# given here is important and that your applications won't link +# properly if they are given in another order. +# +# You may need to augment the lists of libraries when compiling your +# program for other dimensions, or when using third party libraries libs.g = $(lib-deal2-2d.g) \ $(lib-lac.g) \ $(lib-base.g) -libs = $(lib-deal2-2d.o) \ +libs.o = $(lib-deal2-2d.o) \ $(lib-lac.o) \ $(lib-base.o) -# check whether we use debug mode or not +# We now use the variable defined above which switch between debug and +# optimized mode to select the correct compiler flags and the set of +# libraries to link with. Included in the list of libraries is the +# name of the object file which we will produce from the single C++ +# file. Note that by default we use the extension .go for object files +# compiled in debug mode and .o for object files in optimized mode. ifeq ($(debug-mode),on) libraries = $(target).go $(libs.g) flags = $(CXXFLAGS.g) else - libraries = $(target).go $(libs) + libraries = $(target).go $(libs.o) flags = $(CXXFLAGS.o) endif +# If in multithread mode, add the ACE library to the libraries which +# we need to link with: +ifneq ($(with-multithreading),no) + libraries += $(lib-ACE) +endif -# make rule for the target. $^ is the object file $(target).g?o + + +# Now comes the first production rule: how to link the single object +# file produced from the single C++ file into the executable. Since +# this is the first rule in the Makefile, it is the one `make' selects +# if you call it without arguments. $(target) : $(libraries) @echo ============================ Linking $@ @$(CXX) $(flags) -o $@ $^ -# rule how to run the program + +# To make running the application somewhat independent of the actual +# program name, we usually declare a rule `run' which simply runs the +# program. You can then run it by typing `make run'. This is also +# useful if you want to call the executable with arguments which do +# not change frequently. You may then want to add them to the +# following rule: run: $(target) @echo ============================ Running $< - @./$(target) + @.(include-path-base)/base$(target) + + +# As a last rule to the `make' program, we define what to do when +# cleaning up a directory. This usually involves deleting object files +# and other automatically created files such as the executable itself, +# backup files, and data files. Since the latter are not usually quite +# diverse, you needed to declare them at the top of this file. +clean: + -rm -f *.o *.go *~ Makefile.dep $(target) $(clean-up-files) -# rule to make object files +# Since we have not yet stated how to make an object file from a C++ +# file, we should do so now. Since the many flags passed to the +# compiler are usually not of much interest, we suppress the actual +# command line using the `at' sign in the first column of the rules +# and write the string indicating what we do instead. %.go : %.cc - @echo ============================ Compiling with debugging information: $< + @echo ==============debug========= $( Makefile.dep - +# To make the dependencies known to `make', we finally have to include +# them: include Makefile.dep + -- 2.39.5