]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make Makefiles look uniform again, as they appear to have drifted apart slightly.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 22 Jan 2011 18:32:29 +0000 (18:32 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 22 Jan 2011 18:32:29 +0000 (18:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@23239 0785d39b-7218-0410-832d-ea1e28bc413d

13 files changed:
deal.II/examples/step-1/Makefile
deal.II/examples/step-23/Makefile
deal.II/examples/step-24/Makefile
deal.II/examples/step-25/Makefile
deal.II/examples/step-27/Makefile
deal.II/examples/step-29/Makefile
deal.II/examples/step-34/Makefile
deal.II/examples/step-35/Makefile
deal.II/examples/step-37/Makefile
deal.II/examples/step-38/Makefile
deal.II/examples/step-40/Makefile
deal.II/examples/step-43/Makefile
deal.II/examples/step-44/Makefile

index 084f822e9a4696cb7883383e69d316827193e6a5..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -7,7 +7,7 @@
 # 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 = step-1
+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
index 2fe5e3972efcda079e8f65d01425f5a66eb92fb9..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -141,3 +140,4 @@ Makefile.dep: $(target).cc Makefile \
 # them:
 include Makefile.dep
 
+
index 2fe5e3972efcda079e8f65d01425f5a66eb92fb9..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -141,3 +140,4 @@ Makefile.dep: $(target).cc Makefile \
 # them:
 include Makefile.dep
 
+
index 2fe5e3972efcda079e8f65d01425f5a66eb92fb9..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -141,3 +140,4 @@ Makefile.dep: $(target).cc Makefile \
 # them:
 include Makefile.dep
 
+
index 2fe5e3972efcda079e8f65d01425f5a66eb92fb9..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -141,3 +140,4 @@ Makefile.dep: $(target).cc Makefile \
 # them:
 include Makefile.dep
 
+
index 2fe5e3972efcda079e8f65d01425f5a66eb92fb9..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -141,3 +140,4 @@ Makefile.dep: $(target).cc Makefile \
 # them:
 include Makefile.dep
 
+
index b77927098cf5bea19cb3bc2c7b2ff62c5681b8d1..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -140,3 +139,5 @@ Makefile.dep: $(target).cc Makefile \
 # To make the dependencies known to `make', we finally have to include
 # them:
 include Makefile.dep
+
+
index 6bdb6fc108968de970fb089423d2ffcbcb94bd6d..575312d3add443f3d73954e50a5c61cf70a00bb1 100755 (executable)
@@ -7,7 +7,7 @@
 # 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 = step-35
+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
index 06c565f61dee41a025d5c976df70a1740d97379c..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -1,5 +1,6 @@
 # $Id$
 
+
 # For the small projects Makefile, you basically need to fill in only
 # four fields.
 #
@@ -45,8 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
index b77927098cf5bea19cb3bc2c7b2ff62c5681b8d1..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -46,7 +46,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 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. deal.II has two
@@ -140,3 +139,5 @@ Makefile.dep: $(target).cc Makefile \
 # To make the dependencies known to `make', we finally have to include
 # them:
 include Makefile.dep
+
+
index c08203eb2a4646adba8260588b30470312501c17..d873609dd2f491df08b5daaffd4f7d332ade6a23 100644 (file)
@@ -7,8 +7,7 @@
 # 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 = step-40
-#$(basename $(shell echo step-*.cc))
+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
@@ -168,4 +167,4 @@ Makefile.dep: $(target).cc Makefile \
 include Makefile.dep
 
 
-endif  # USE_CONTRIB_TRILINOS
+endif  # USE_CONTRIB_PETSC
index a15735c1a24face35b7529acdda5b1296f95fd00..ddf6cee2a4ee278cc438ad28b46143002ef19dc7 100644 (file)
@@ -26,7 +26,7 @@ debug-mode = on
 D = ../../
 
 
-# The fourth field specifies the names of data and other files that
+# 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.
@@ -34,13 +34,6 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 
 
 
-# The last field specifies the name of the input file that passes the
-# parameters to the program.
-run-parameters = input.prm
-
-
-
-
 
 #
 #
@@ -112,7 +105,8 @@ $(target)$(EXEEXT) : $(libraries)
 # following rule:
 run: $(target)$(EXEEXT)
        @echo ============================ Running $<
-       @./$(target)$(EXEEXT) $(run-parameters)
+       @./$(target)$(EXEEXT)
+
 
 
 # As a last rule to the `make' program, we define what to do when
@@ -137,6 +131,7 @@ clean:
        @$(CXX) $(CXXFLAGS.o) -c $< -o $@
 
 
+
 # The following statement tells make that the rules `run' and `clean'
 # are not expected to produce files of the same name as Makefile rules
 # usually do.
@@ -167,4 +162,4 @@ Makefile.dep: $(target).cc Makefile \
 include Makefile.dep
 
 
-endif  # CONTRIB_USE_TRILINOS
+endif  # USE_CONTRIB_TRILINOS
index e54591f1afa9296270a9654b6ab76f6a1d8c0417..575312d3add443f3d73954e50a5c61cf70a00bb1 100644 (file)
@@ -30,7 +30,7 @@ D = ../../
 # 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
+clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
 
 
 
@@ -40,7 +40,7 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov
 # Usually, you will not need to change anything beyond this point.
 #
 #
-# The next statement tell the `make' program where to find the
+# The next statement tells 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
@@ -48,26 +48,20 @@ 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.g)
-libs.o   = $(lib-deal2.o)
+# libraries which we want to link to the object file. deal.II has two
+# libraries: one for the debug mode version of the
+# application and one for optimized mode.
+libs.g   := $(lib-deal2.g)
+libs.o   := $(lib-deal2.o)
 
 
-# We now use the variable defined above which switch between debug and
+# We now use the variable defined above to switch between debug and
 # optimized mode to select 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 .g.o for object files compiled in debug mode and .o for
-# object files in optimized mode (or whatever the local default on your
-# system is instead of .o).
+# object files in optimized mode (or whatever local default on your
+# system is instead of .o)
 ifeq ($(debug-mode),on)
   libraries = $(target).g.$(OBJEXT) $(libs.g)
 else
@@ -79,9 +73,9 @@ endif
 # 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)
+$(target)$(EXEEXT) : $(libraries)
        @echo ============================ Linking $@
-       @$(CXX) -o $@$(EXEEXT) $^ $(LIBS) $(LDFLAGS)
+       @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
 
 
 # To make running the application somewhat independent of the actual
@@ -90,7 +84,7 @@ $(target) : $(libraries)
 # 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)
+run: $(target)$(EXEEXT)
        @echo ============================ Running $<
        @./$(target)$(EXEEXT)
 
@@ -110,10 +104,10 @@ clean:
 # command line using the `at' sign in the first column of the rules
 # and write the string indicating what we do instead.
 ./%.g.$(OBJEXT) :
-       @echo ==============debug========= $(<F)
+       @echo "==============debug========= $(<F)  ->  $@"
        @$(CXX) $(CXXFLAGS.g) -c $< -o $@
 ./%.$(OBJEXT) :
-       @echo ==============optimized===== $(<F)
+       @echo "==============optimized===== $(<F)  ->  $@"
        @$(CXX) $(CXXFLAGS.o) -c $< -o $@
 
 
@@ -127,7 +121,7 @@ clean:
 # since the executable depends on some include files from the library,
 # besides the C++ application file of course, it is necessary to
 # re-generate the executable when one of the files it depends on has
-# changed. The following rule to created a dependency file
+# changed. The following rule creates a dependency file
 # `Makefile.dep', which `make' uses to determine when to regenerate
 # the executable. This file is automagically remade whenever needed,
 # i.e. whenever one of the cc-/h-files changed. Make detects whether
@@ -142,7 +136,6 @@ Makefile.dep: $(target).cc Makefile \
          || (rm -f $@ ; false)
        @if test -s $@ ; then : else rm $@ ; fi
 
-
 # To make the dependencies known to `make', we finally have to include
 # them:
 include Makefile.dep

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.