From: maier Date: Tue, 23 Oct 2012 22:04:17 +0000 (+0000) Subject: Port the examples to CMake X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf9292eb014711e3c9589434ea69c7876a453bc0;p=dealii-svn.git Port the examples to CMake git-svn-id: https://svn.dealii.org/branches/branch_cmake@27185 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake new file mode 100644 index 0000000000..bc725e22b5 --- /dev/null +++ b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake @@ -0,0 +1,103 @@ +##### +## +## Copyright (C) 2012 by the deal.II authors +## +## This file is part of the deal.II library. +## +## +## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later +## version of the LGPL license. +## +## Author: Matthias Maier +## +##### + +# +# This file implements the DEAL_II_INVOKE_AUTOPILOT macro, which is +# part of the deal.II library. +# +# Usage: +# DEAL_II_INVOKE_AUTOPILOT() +# +# where it is assumed that the following variables are defined: +# +# TARGET - a string used for the project and target name +# TARGET_SRC - a list of source file to compile for target +# ${TARGET} +# CLEAN_UP_FILES - a list of files (globs) that will be removed with +# runclean and distclean +# + +MACRO(DEAL_II_INVOKE_AUTOPILOT) + + MESSAGE(STATUS "Autopilot invoked") + + # Define and setup a compilation target: + ADD_EXECUTABLE(${TARGET} ${TARGET_SRC}) + DEAL_II_SETUP_TARGET(${TARGET}) + + # Define a custom target to easily run the program: + ADD_CUSTOM_TARGET(run + COMMAND ${TARGET} + COMMENT "Run ${TARGET} compiled with ${CMAKE_BUILD_TYPE} configuration in ${CMAKE_SOURCE_DIR}" + ) + + # Define custom targets to easily switch the build type: + ADD_CUSTOM_TARGET(debug + COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR} + COMMENT "Switch CMAKE_BUILD_TYPE to Debug" + ) + ADD_CUSTOM_TARGET(release + COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR} + COMMENT "Switch CMAKE_BUILD_TYPE to Release" + ) + + # And another custom target to clean up all files generated by the program: + ADD_CUSTOM_TARGET(runclean + COMMAND ${CMAKE_COMMAND} -E remove ${CLEAN_UP_FILES} + COMMENT "runclean invoked" + ) + + # Define a distclean target to remove every generated file: + ADD_CUSTOM_TARGET(distclean + COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean + COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target runclean + COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles + COMMAND ${CMAKE_COMMAND} -E remove + cmake_install.cmake CMakeCache.txt Makefile + COMMENT "distclean invoked" + ) + + # Print out some usage information: + MESSAGE( +"### +# +# Successfully set up project ${TARGET} with ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} found at +# ${DEAL_II_PATH} +# +# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE} +# TARGET_SRC: ${TARGET_SRC} +# +# You can now run +# $ make - to compile and link the program +# $ make run - to (compile, link and) run the program +# +# $ make debug - to switch the build type to \"Debug\" +# $ make release - to switch the build type to \"Release\" +# $ make edit_cache - to change (cached) configuration variables +# and rerun the configure and generate phases of CMake +# +# $ make clean - to remove the generated executable as well as +# all intermediate compilation files +# $ make runclean - to remove all output generated by the program +# $ make distclean - to clean the directory from _all_ generated +# files (includes clean, runclean and the removal +# of the generated build system) +# +# Have a nice day! +# +###" + ) + +ENDMACRO() + diff --git a/deal.II/config/CMakeLists.txt b/deal.II/config/CMakeLists.txt index 50fa69ccc1..b29ce4d26c 100644 --- a/deal.II/config/CMakeLists.txt +++ b/deal.II/config/CMakeLists.txt @@ -22,6 +22,7 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake + ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake DESTINATION ${DEAL_II_CMAKE_MACROS_RELDIR} COMPONENT library diff --git a/deal.II/examples/step-1/CMakeLists.txt b/deal.II/examples/step-1/CMakeLists.txt index 4ab42c160f..1325cff4fe 100644 --- a/deal.II/examples/step-1/CMakeLists.txt +++ b/deal.II/examples/step-1/CMakeLists.txt @@ -1,14 +1,14 @@ -########################################################################## -# # -# An autopilot CMakeLists.txt example for a small project # -# using the deal.II library # -# # -########################################################################## +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## +# # Set the name of the project and target: # SET(TARGET "step-1") +# # Declare all source files the target consists of: # SET(TARGET_SRC @@ -16,30 +16,14 @@ SET(TARGET_SRC # You can specify additional files here! ) -# Build and run the program in debug or optimized mode: # -SET(DEBUG_MODE TRUE) - -# Specify file names that will be deleted when calling 'make distclean': +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': # SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) -# If the deal.II library cannot be found because it is not installed at a -# default location (or your project resides under an uncommon place), you -# may specify additional hints for search paths here. They take precedence -# over the hard coded installation paths. -# -# SET(DEAL_II_DIRS -# "$ENV{HOME}/deal.II" -# "$ENV{HOME}/workspace/deal.II" -# ) - -########################################################################## -# # -# Usually, you will not need to modify anything beyond this point... # -# # -########################################################################## +# Usually, you will not need to modify anything beyond this point... CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) @@ -51,72 +35,14 @@ FIND_PACKAGE(deal.II 8.0 REQUIRED ../ ../../ ../../../ ../../../../../ # Also look for hints from environment: $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" ) -DEAL_II_INITIALIZE_CACHED_VARIABLES() - -# Hide some configuration options: -MARK_AS_ADVANCED(CMAKE_BUILD_TYPE deal.II_DIR) - -# Set build type: -IF(DEBUG_MODE) - SET(CMAKE_BUILD_TYPE "Debug" CACHE FORCE - "Please set DEBUG_MODE in CMakeLists.txt") -ELSE() - SET(CMAKE_BUILD_TYPE "Release" CACHE FORCE - "Please set DEBUG_MODE in CMakeLists.txt") -ENDIF() +DEAL_II_INITIALIZE_CACHED_VARIABLES() PROJECT(${TARGET}) - -# Define and setup a compilation target: -ADD_EXECUTABLE(${TARGET} ${TARGET_SRC}) -DEAL_II_SETUP_TARGET(${TARGET}) - -# Define a custom target to easily run the program: -ADD_CUSTOM_TARGET(run - COMMAND ${TARGET} - COMMENT "Run ${TARGET} compiled with ${CMAKE_BUILD_TYPE} configuration in ${CMAKE_SOURCE_DIR}" - ) - -# And another custom target to clean up all files generated by the program: -ADD_CUSTOM_TARGET(runclean - COMMAND ${CMAKE_COMMAND} -E remove ${CLEAN_UP_FILES} - ) - -# Define a distclean target to remove every generated file: -ADD_CUSTOM_TARGET(distclean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_SOURCE_DIR} --target clean - COMMAND ${CMAKE_COMMAND} --build ${CMAKE_SOURCE_DIR} --target runclean - COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles - COMMAND ${CMAKE_COMMAND} -E remove - cmake_install.cmake CMakeCache.txt Makefile - ) - -# Print out some usage information: -MESSAGE(" -### -# -# Successfully set up project ${TARGET} with ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} found at -# ${DEAL_II_PATH} -# -# CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE} -# TARGET_SRC: ${TARGET_SRC} -# -# You can now run: -# $ make - to compile and link the program -# $ make run - to (compile, link and) run the program -# -# $ make clean - to remove the generated executable as well as -# all intermediate compilation files -# $ make runclean - to remove all output generated by the program -# $ make distclean - to run purge the directory from _all_ generated -# files (includes clean, runclean and the removal -# of the generated build system) -# -# To change the configuration, please edit the CMakeLists.txt file. -# -# Have a nice day! -# -###" -) +DEAL_II_INVOKE_AUTOPILOT() diff --git a/deal.II/examples/step-10/CMakeLists.txt b/deal.II/examples/step-10/CMakeLists.txt new file mode 100644 index 0000000000..eb6e8fe17b --- /dev/null +++ b/deal.II/examples/step-10/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-10") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-10/Makefile b/deal.II/examples/step-10/Makefile deleted file mode 100644 index 7b988787e6..0000000000 --- a/deal.II/examples/step-10/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-10 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-11/CMakeLists.txt b/deal.II/examples/step-11/CMakeLists.txt new file mode 100644 index 0000000000..31bfe864dd --- /dev/null +++ b/deal.II/examples/step-11/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-11") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-11/Makefile b/deal.II/examples/step-11/Makefile deleted file mode 100644 index 1c72dac668..0000000000 --- a/deal.II/examples/step-11/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-11 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-12/CMakeLists.txt b/deal.II/examples/step-12/CMakeLists.txt new file mode 100644 index 0000000000..2b1efa8f09 --- /dev/null +++ b/deal.II/examples/step-12/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-12") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-12/Makefile b/deal.II/examples/step-12/Makefile deleted file mode 100644 index f3512cb64d..0000000000 --- a/deal.II/examples/step-12/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-12 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-13/CMakeLists.txt b/deal.II/examples/step-13/CMakeLists.txt new file mode 100644 index 0000000000..6857667342 --- /dev/null +++ b/deal.II/examples/step-13/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-13") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-13/Makefile b/deal.II/examples/step-13/Makefile deleted file mode 100644 index a7658694b4..0000000000 --- a/deal.II/examples/step-13/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-13 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-14/CMakeLists.txt b/deal.II/examples/step-14/CMakeLists.txt new file mode 100644 index 0000000000..e246696bc4 --- /dev/null +++ b/deal.II/examples/step-14/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-14") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-14/Makefile b/deal.II/examples/step-14/Makefile deleted file mode 100644 index d8456274c3..0000000000 --- a/deal.II/examples/step-14/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-14 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-15/CMakeLists.txt b/deal.II/examples/step-15/CMakeLists.txt new file mode 100644 index 0000000000..2ac963cbe4 --- /dev/null +++ b/deal.II/examples/step-15/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-15") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-15/Makefile b/deal.II/examples/step-15/Makefile deleted file mode 100644 index 0db3b4a772..0000000000 --- a/deal.II/examples/step-15/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# Makefile,v 1.7 2002/11/11 21:29:46 wolf Exp - - -# 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 = step-15 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-16/CMakeLists.txt b/deal.II/examples/step-16/CMakeLists.txt new file mode 100644 index 0000000000..251ec2ef8e --- /dev/null +++ b/deal.II/examples/step-16/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-16") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-16/Makefile b/deal.II/examples/step-16/Makefile deleted file mode 100644 index afa67991b0..0000000000 --- a/deal.II/examples/step-16/Makefile +++ /dev/null @@ -1,143 +0,0 @@ -# $Id$ - -# 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 = step-16 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-17/CMakeLists.txt b/deal.II/examples/step-17/CMakeLists.txt new file mode 100644 index 0000000000..92659d67a3 --- /dev/null +++ b/deal.II/examples/step-17/CMakeLists.txt @@ -0,0 +1,60 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-17") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_PETSC OR DEAL_II_WITH_TBB) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_PETSC = ON + DEAL_II_WITH_TBB = OFF +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-18/CMakeLists.txt b/deal.II/examples/step-18/CMakeLists.txt new file mode 100644 index 0000000000..be5af51439 --- /dev/null +++ b/deal.II/examples/step-18/CMakeLists.txt @@ -0,0 +1,60 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-18") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_PETSC OR DEAL_II_WITH_TBB) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_PETSC = ON + DEAL_II_WITH_TBB = OFF +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-18/Makefile b/deal.II/examples/step-18/Makefile deleted file mode 100644 index 2c235fcce0..0000000000 --- a/deal.II/examples/step-18/Makefile +++ /dev/null @@ -1,177 +0,0 @@ -# $Id$ - - -# 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 = step-18 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if PETSc is installed. If this -# is not the case, then simply redefine the main targets to do nothing -# -# The same holds true if we use threads: PETSc and threads doesn't -# seem to work well together... -ifneq ($(USE_CONTRIB_PETSC)$(enable-threads),yesno) - ifneq ($(USE_CONTRIB_PETSC),yes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program cannot be compiled without PETSc. Make =" - @echo "= sure you have PETSc installed and detected during =" - @echo "= configuration of deal.II =" - @echo "===========================================================" - @echo - else -default run clean: - @echo - @echo "===========================================================" - @echo "= PETSc can not be used when running programs on =" - @echo "= multiple threads. Make sure you have specified the =" - @echo "= --disable-threads flag upon configuration of deal.II =" - @echo "===========================================================" - @echo - endif -else -# -################################################################ - - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - -endif # CONTRIB_USE_PETSC diff --git a/deal.II/examples/step-19/CMakeLists.txt b/deal.II/examples/step-19/CMakeLists.txt new file mode 100644 index 0000000000..43f71f28db --- /dev/null +++ b/deal.II/examples/step-19/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-19") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-19/Makefile b/deal.II/examples/step-19/Makefile deleted file mode 100644 index 6fe5dfb509..0000000000 --- a/deal.II/examples/step-19/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-19 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-2/CMakeLists.txt b/deal.II/examples/step-2/CMakeLists.txt index b68f6b4ddf..ebc27b0697 100644 --- a/deal.II/examples/step-2/CMakeLists.txt +++ b/deal.II/examples/step-2/CMakeLists.txt @@ -1,19 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + # -# A minimalistic CMakeLists.txt example for a small project using the -# deal.II library: +# Set the name of the project and target: # +SET(TARGET "step-2") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) +# Search for the deal.II library: FIND_PACKAGE(deal.II 8.0 REQUIRED HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" ) -DEAL_II_INITIALIZE_CACHED_VARIABLES() - -PROJECT(step-2) -ADD_EXECUTABLE(step-2 step-2.cc) -DEAL_II_SETUP_TARGET(step-2) +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() diff --git a/deal.II/examples/step-20/CMakeLists.txt b/deal.II/examples/step-20/CMakeLists.txt new file mode 100644 index 0000000000..72a91a5d89 --- /dev/null +++ b/deal.II/examples/step-20/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-20") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-20/Makefile b/deal.II/examples/step-20/Makefile deleted file mode 100644 index 1c7e196a4d..0000000000 --- a/deal.II/examples/step-20/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-20 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-21/CMakeLists.txt b/deal.II/examples/step-21/CMakeLists.txt new file mode 100644 index 0000000000..8517d99529 --- /dev/null +++ b/deal.II/examples/step-21/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-21") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-21/Makefile b/deal.II/examples/step-21/Makefile deleted file mode 100644 index 49fdcc66d0..0000000000 --- a/deal.II/examples/step-21/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-21 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-22/CMakeLists.txt b/deal.II/examples/step-22/CMakeLists.txt new file mode 100644 index 0000000000..29c4377e35 --- /dev/null +++ b/deal.II/examples/step-22/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-22") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_UMFPACK) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_UMFPACK = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-22/Makefile b/deal.II/examples/step-22/Makefile deleted file mode 100644 index c0cf885aec..0000000000 --- a/deal.II/examples/step-22/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-22 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-23/CMakeLists.txt b/deal.II/examples/step-23/CMakeLists.txt new file mode 100644 index 0000000000..068e919303 --- /dev/null +++ b/deal.II/examples/step-23/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-23") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-23/Makefile b/deal.II/examples/step-23/Makefile deleted file mode 100644 index 187f04bef4..0000000000 --- a/deal.II/examples/step-23/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-23 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-24/CMakeLists.txt b/deal.II/examples/step-24/CMakeLists.txt new file mode 100644 index 0000000000..f064d5f9a2 --- /dev/null +++ b/deal.II/examples/step-24/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-24") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-24/Makefile b/deal.II/examples/step-24/Makefile deleted file mode 100644 index f574e80b28..0000000000 --- a/deal.II/examples/step-24/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-24 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-25/CMakeLists.txt b/deal.II/examples/step-25/CMakeLists.txt new file mode 100644 index 0000000000..949709dc6d --- /dev/null +++ b/deal.II/examples/step-25/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-25") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-25/Makefile b/deal.II/examples/step-25/Makefile deleted file mode 100644 index 72d7b46a51..0000000000 --- a/deal.II/examples/step-25/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-25 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-26/CMakeLists.txt b/deal.II/examples/step-26/CMakeLists.txt new file mode 100644 index 0000000000..eb5b6b658b --- /dev/null +++ b/deal.II/examples/step-26/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-26") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-26/Makefile b/deal.II/examples/step-26/Makefile deleted file mode 100644 index 099d8280ee..0000000000 --- a/deal.II/examples/step-26/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-26 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-27/CMakeLists.txt b/deal.II/examples/step-27/CMakeLists.txt new file mode 100644 index 0000000000..1abe5f4958 --- /dev/null +++ b/deal.II/examples/step-27/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-27") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-27/Makefile b/deal.II/examples/step-27/Makefile deleted file mode 100644 index 89a048533a..0000000000 --- a/deal.II/examples/step-27/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-27 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-28/CMakeLists.txt b/deal.II/examples/step-28/CMakeLists.txt new file mode 100644 index 0000000000..91509a690a --- /dev/null +++ b/deal.II/examples/step-28/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-28") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-28/Makefile b/deal.II/examples/step-28/Makefile deleted file mode 100644 index e7640ff0e1..0000000000 --- a/deal.II/examples/step-28/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-28 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-29/CMakeLists.txt b/deal.II/examples/step-29/CMakeLists.txt new file mode 100644 index 0000000000..a5967bc460 --- /dev/null +++ b/deal.II/examples/step-29/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-29") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_UMFPACK) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_UMFPACK = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-29/Makefile b/deal.II/examples/step-29/Makefile deleted file mode 100644 index 42edc92129..0000000000 --- a/deal.II/examples/step-29/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-29 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-3/CMakeLists.txt b/deal.II/examples/step-3/CMakeLists.txt index 2bc6b1878c..1ea287254c 100644 --- a/deal.II/examples/step-3/CMakeLists.txt +++ b/deal.II/examples/step-3/CMakeLists.txt @@ -1,23 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-3") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) +# Search for the deal.II library: FIND_PACKAGE(deal.II 8.0 REQUIRED HINTS - "../../" - "../../../../../" - $ENV{DEAL_DIR} - $ENV{DEAL_II_DIR} + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" ) -DEAL_II_INITIALIZE_CACHED_VARIABLES() - -PROJECT(step-3) -ADD_EXECUTABLE(step-3 step-3.cc) -DEAL_II_SETUP_TARGET(step-3) +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() -ADD_CUSTOM_TARGET(run - COMMAND step-3 - ) -ADD_CUSTOM_TARGET(distclean - COMMAND make clean - COMMAND rm -f *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2 - ) diff --git a/deal.II/examples/step-30/CMakeLists.txt b/deal.II/examples/step-30/CMakeLists.txt new file mode 100644 index 0000000000..f21fea03ea --- /dev/null +++ b/deal.II/examples/step-30/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-30") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-30/Makefile b/deal.II/examples/step-30/Makefile deleted file mode 100644 index 6bbd7907f1..0000000000 --- a/deal.II/examples/step-30/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-30 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-31/CMakeLists.txt b/deal.II/examples/step-31/CMakeLists.txt new file mode 100644 index 0000000000..12f873cc7d --- /dev/null +++ b/deal.II/examples/step-31/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-31") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_TRILINOS) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_TRILINOS = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-31/Makefile b/deal.II/examples/step-31/Makefile deleted file mode 100644 index 1d1c30c126..0000000000 --- a/deal.II/examples/step-31/Makefile +++ /dev/null @@ -1,166 +0,0 @@ -# $Id$ - - -# 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 = step-31 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if Trilinos is installed. If this -# is not the case, then simply redefine the main targets to do nothing -ifneq ($(USE_CONTRIB_TRILINOS),yes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program cannot be compiled without Trilinos. Make=" - @echo "= sure you have Trilinos installed and detected during =" - @echo "= configuration of deal.II =" - @echo "===========================================================" - @echo - -else -# -################################################################ - - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - -endif # USE_CONTRIB_TRILINOS diff --git a/deal.II/examples/step-32/CMakeLists.txt b/deal.II/examples/step-32/CMakeLists.txt new file mode 100644 index 0000000000..6fb8cfac91 --- /dev/null +++ b/deal.II/examples/step-32/CMakeLists.txt @@ -0,0 +1,60 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-32") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_P4EST OR NOT DEAL_II_WITH_TRILINOS) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_P4EST = ON + DEAL_II_WITH_TRILINOS = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-33/CMakeLists.txt b/deal.II/examples/step-33/CMakeLists.txt new file mode 100644 index 0000000000..90c7480d5f --- /dev/null +++ b/deal.II/examples/step-33/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-33") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_TRILINOS) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_TRILINOS = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-33/Makefile b/deal.II/examples/step-33/Makefile deleted file mode 100644 index 3f355755bd..0000000000 --- a/deal.II/examples/step-33/Makefile +++ /dev/null @@ -1,171 +0,0 @@ -# $Id$ - - -# 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 = step-33 - -# 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 = ../../ - - -# The fourth 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 *vtk *ucd *.d2 - - - -# The last field specifies the name of the input file that passes the -# parameters to the program. -run-parameters = input.prm - - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if Trilinos is installed. If this -# is not the case, then simply redefine the main targets to do nothing -ifneq ($(USE_CONTRIB_TRILINOS),yes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program cannot be compiled without Trilinos. Make=" - @echo "= sure you have Trilinos installed and detected during =" - @echo "= configuration of deal.II =" - @echo "===========================================================" - @echo - -else -# -################################################################ - - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) $(run-parameters) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - -endif # CONTRIB_USE_TRILINOS diff --git a/deal.II/examples/step-34/CMakeLists.txt b/deal.II/examples/step-34/CMakeLists.txt new file mode 100644 index 0000000000..d981357a3b --- /dev/null +++ b/deal.II/examples/step-34/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-34") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-34/Makefile b/deal.II/examples/step-34/Makefile deleted file mode 100644 index 73bd72a683..0000000000 --- a/deal.II/examples/step-34/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-34 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-35/CMakeLists.txt b/deal.II/examples/step-35/CMakeLists.txt new file mode 100644 index 0000000000..f940c10ea8 --- /dev/null +++ b/deal.II/examples/step-35/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-35") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_UMFPACK) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_UMFPACK = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-35/Makefile b/deal.II/examples/step-35/Makefile deleted file mode 100755 index dfd06063b4..0000000000 --- a/deal.II/examples/step-35/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-35 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-36/CMakeLists.txt b/deal.II/examples/step-36/CMakeLists.txt new file mode 100644 index 0000000000..bc10f02080 --- /dev/null +++ b/deal.II/examples/step-36/CMakeLists.txt @@ -0,0 +1,62 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-36") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_SLEPC OR DEAL_II_WITH_TBB) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_PETSC = ON + DEAL_II_WITH_SLEPC = ON + DEAL_II_WITH_TBB = ON +which is required for this tutorial step." + ) +ENDIF() + + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-37/CMakeLists.txt b/deal.II/examples/step-37/CMakeLists.txt new file mode 100644 index 0000000000..1cea676370 --- /dev/null +++ b/deal.II/examples/step-37/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-37") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_LAPACK) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_LAPACK = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-37/Makefile b/deal.II/examples/step-37/Makefile deleted file mode 100644 index ce2b17fe7a..0000000000 --- a/deal.II/examples/step-37/Makefile +++ /dev/null @@ -1,160 +0,0 @@ -# $Id$ - - -# 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 = step-37 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if Trilinos is installed. If this -# # is not the case, then simply redefine the main targets to do nothing -ifneq ($(USE_CONTRIB_LAPACK),yes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program can only be run with LAPACK enabled. =" - @echo "===========================================================" - @echo -else -# -################################################################# - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - -endif # USE_CONTRIB_LAPACK - diff --git a/deal.II/examples/step-38/CMakeLists.txt b/deal.II/examples/step-38/CMakeLists.txt new file mode 100644 index 0000000000..30efce27d9 --- /dev/null +++ b/deal.II/examples/step-38/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-38") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-38/Makefile b/deal.II/examples/step-38/Makefile deleted file mode 100644 index f7780086da..0000000000 --- a/deal.II/examples/step-38/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-38 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-39/CMakeLists.txt b/deal.II/examples/step-39/CMakeLists.txt new file mode 100644 index 0000000000..adcf554c98 --- /dev/null +++ b/deal.II/examples/step-39/CMakeLists.txt @@ -0,0 +1,56 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-39") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +FIND_PACKAGE(Perl REQUIRED) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + +ADD_CUSTOM_TARGET(postprocess + COMMAND ${PERL_EXECUTABLE} postprocess.pl deallog > output.dat + COMMENT "Postprocessing deallog" + ) +ADD_DEPENDENCIES(postprocess run) + diff --git a/deal.II/examples/step-39/Makefile b/deal.II/examples/step-39/Makefile deleted file mode 100644 index a58236c56c..0000000000 --- a/deal.II/examples/step-39/Makefile +++ /dev/null @@ -1,145 +0,0 @@ -# $Id$ - - -# 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 = step-39 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - @echo ============================ Postprocessing to step-39.dat - @$(PERL) postprocess.pl deallog > output.dat - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-4/CMakeLists.txt b/deal.II/examples/step-4/CMakeLists.txt index 5d58d79206..2c54410d67 100644 --- a/deal.II/examples/step-4/CMakeLists.txt +++ b/deal.II/examples/step-4/CMakeLists.txt @@ -1,23 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-4") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) +# Search for the deal.II library: FIND_PACKAGE(deal.II 8.0 REQUIRED HINTS - "../../" - "../../../../../" - $ENV{DEAL_DIR} - $ENV{DEAL_II_DIR} + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" ) -DEAL_II_INITIALIZE_CACHED_VARIABLES() - -PROJECT(step-4) -ADD_EXECUTABLE(step-4 step-4.cc) -DEAL_II_SETUP_TARGET(step-4) +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() -ADD_CUSTOM_TARGET(run - COMMAND step-4 - ) -ADD_CUSTOM_TARGET(distclean - COMMAND make clean - COMMAND rm -f *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2 - ) diff --git a/deal.II/examples/step-40/CMakeLists.txt b/deal.II/examples/step-40/CMakeLists.txt new file mode 100644 index 0000000000..284a3948bf --- /dev/null +++ b/deal.II/examples/step-40/CMakeLists.txt @@ -0,0 +1,63 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-40") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF( NOT DEAL_II_WITH_PETSC OR + NOT DEAL_II_WITH_P4EST OR + DEAL_II_WITH_TBB ) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_PETSC = ON + DEAL_II_WITH_P4EST = ON + DEAL_II_WITH_TBB = OFF +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-40/Makefile b/deal.II/examples/step-40/Makefile deleted file mode 100644 index de7a16cf54..0000000000 --- a/deal.II/examples/step-40/Makefile +++ /dev/null @@ -1,171 +0,0 @@ -# $Id$ - - -# 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 = step-40 - -# 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 = ../../ - - -# 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 *vtk *vtu *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if PETSc is installed. If this -# is not the case, then simply redefine the main targets to do nothing -# -# The same holds true if we use threads: PETSc and threads doesn't -# seem to work well together... -ifneq ($(USE_CONTRIB_PETSC)$(enable-threads)$(USE_CONTRIB_P4EST),yesnoyes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program can only be run with the following =" - @echo "= configuration: =" - @echo "= - with PETSc =" - @echo "= - without threads =" - @echo "= - with P4EST =" - @echo "= At least one of these conditions is not satisfied. =" - @echo "===========================================================" - @echo -else -# -################################################################ - - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - -endif # USE_CONTRIB_PETSC diff --git a/deal.II/examples/step-41/CMakeLists.txt b/deal.II/examples/step-41/CMakeLists.txt new file mode 100644 index 0000000000..9b8d9a1fda --- /dev/null +++ b/deal.II/examples/step-41/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-41") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_TRILINOS) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_TRILINOS = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-41/Makefile b/deal.II/examples/step-41/Makefile deleted file mode 100644 index 150d91c19f..0000000000 --- a/deal.II/examples/step-41/Makefile +++ /dev/null @@ -1,160 +0,0 @@ -# $Id$ - - -# 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 = step-41 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if Trilinos is installed. If this -# is not the case, then simply redefine the main targets to do nothing -ifneq ($(USE_CONTRIB_TRILINOS),yes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program cannot be compiled without Trilinos. Make=" - @echo "= sure you have Trilinos installed and detected during =" - @echo "= configuration of deal.II =" - @echo "===========================================================" - @echo - -else -# -################################################################ - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - -endif # CONTRIB_USE_TRILINOS diff --git a/deal.II/examples/step-42/CMakeLists.txt b/deal.II/examples/step-42/CMakeLists.txt new file mode 100644 index 0000000000..939d0ecb76 --- /dev/null +++ b/deal.II/examples/step-42/CMakeLists.txt @@ -0,0 +1,61 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-42") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF( NOT DEAL_II_WITH_P4EST OR + NOT DEAL_II_WITH_TRILINOS ) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_P4EST = ON + DEAL_II_WITH_TRILINOS = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-42/Makefile b/deal.II/examples/step-42/Makefile deleted file mode 100644 index 4a005b2d7f..0000000000 --- a/deal.II/examples/step-42/Makefile +++ /dev/null @@ -1,167 +0,0 @@ -# $Id$ - - -# 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 = step-42 - -# 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 = ../../ - - -# 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 *vtk *vtu *visit *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if Trilinos is installed. If this -# is not the case, then simply redefine the main targets to do nothing -ifneq ($(USE_CONTRIB_TRILINOS)$(USE_CONTRIB_P4EST),yesyes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program can only be run with the following =" - @echo "= configuration: =" - @echo "= - with Trilinos =" - @echo "= - with P4EST =" - @echo "= At least one of these conditions is not satisfied. =" - @echo "===========================================================" - @echo -else -# -################################################################ - - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - -endif # USE_CONTRIB_TRILINOS diff --git a/deal.II/examples/step-43/CMakeLists.txt b/deal.II/examples/step-43/CMakeLists.txt new file mode 100644 index 0000000000..82f58860e8 --- /dev/null +++ b/deal.II/examples/step-43/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-43") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_TRILINOS) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_TRILINOS = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-43/Makefile b/deal.II/examples/step-43/Makefile deleted file mode 100644 index 101261d803..0000000000 --- a/deal.II/examples/step-43/Makefile +++ /dev/null @@ -1,166 +0,0 @@ -# $Id$ - - -# 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 = step-43 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - -################################################################ -# This example program will only work if Trilinos is installed. If this -# is not the case, then simply redefine the main targets to do nothing -ifneq ($(USE_CONTRIB_TRILINOS),yes) -default run clean: - @echo - @echo "===========================================================" - @echo "= This program cannot be compiled without Trilinos. Make=" - @echo "= sure you have Trilinos installed and detected during =" - @echo "= configuration of deal.II =" - @echo "===========================================================" - @echo - -else -# -################################################################ - - - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - -endif # USE_CONTRIB_TRILINOS diff --git a/deal.II/examples/step-44/CMakeLists.txt b/deal.II/examples/step-44/CMakeLists.txt new file mode 100644 index 0000000000..ed10014a40 --- /dev/null +++ b/deal.II/examples/step-44/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-44") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-44/Makefile b/deal.II/examples/step-44/Makefile deleted file mode 100644 index 6a904ca3c5..0000000000 --- a/deal.II/examples/step-44/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-44 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-45/CMakeLists.txt b/deal.II/examples/step-45/CMakeLists.txt new file mode 100644 index 0000000000..76b98fd299 --- /dev/null +++ b/deal.II/examples/step-45/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-45") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-45/Makefile b/deal.II/examples/step-45/Makefile deleted file mode 100644 index 9771e8a964..0000000000 --- a/deal.II/examples/step-45/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-45 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-46/CMakeLists.txt b/deal.II/examples/step-46/CMakeLists.txt new file mode 100644 index 0000000000..5ddb1df270 --- /dev/null +++ b/deal.II/examples/step-46/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-46") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +# +# Are all dependencies fullfilled? +# +IF(NOT DEAL_II_WITH_UMFPACK) + MESSAGE(FATAL_ERROR " +Error! The deal.II library found at ${DEAL_II_PATH} was not configured with + DEAL_II_WITH_UMFPACK = ON +which is required for this tutorial step." + ) +ENDIF() + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-46/Makefile b/deal.II/examples/step-46/Makefile deleted file mode 100644 index 057295d8c7..0000000000 --- a/deal.II/examples/step-46/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-46 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-47/CMakeLists.txt b/deal.II/examples/step-47/CMakeLists.txt new file mode 100644 index 0000000000..ed2a054828 --- /dev/null +++ b/deal.II/examples/step-47/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-47") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-47/Makefile b/deal.II/examples/step-47/Makefile deleted file mode 100644 index 7420c4cde4..0000000000 --- a/deal.II/examples/step-47/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-47 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) -w $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-48/CMakeLists.txt b/deal.II/examples/step-48/CMakeLists.txt new file mode 100644 index 0000000000..247ba3376f --- /dev/null +++ b/deal.II/examples/step-48/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-48") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-48/Makefile b/deal.II/examples/step-48/Makefile deleted file mode 100644 index aae38ebbb5..0000000000 --- a/deal.II/examples/step-48/Makefile +++ /dev/null @@ -1,143 +0,0 @@ -# $Id$ - - -# 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 = ../../ - - -# 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 *vtk *vtu *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) -w $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-5/CMakeLists.txt b/deal.II/examples/step-5/CMakeLists.txt index ed5f54e803..517e817421 100644 --- a/deal.II/examples/step-5/CMakeLists.txt +++ b/deal.II/examples/step-5/CMakeLists.txt @@ -1,23 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-5") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) +# Search for the deal.II library: FIND_PACKAGE(deal.II 8.0 REQUIRED HINTS - "../../" - "../../../../../" - $ENV{DEAL_DIR} - $ENV{DEAL_II_DIR} + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" ) -DEAL_II_INITIALIZE_CACHED_VARIABLES() - -PROJECT(step-5) -ADD_EXECUTABLE(step-5 step-5.cc) -DEAL_II_SETUP_TARGET(step-5) +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() -ADD_CUSTOM_TARGET(run - COMMAND step-5 - ) -ADD_CUSTOM_TARGET(distclean - COMMAND make clean - COMMAND rm -f *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2 - ) diff --git a/deal.II/examples/step-6/CMakeLists.txt b/deal.II/examples/step-6/CMakeLists.txt new file mode 100644 index 0000000000..e0c6c9ecd1 --- /dev/null +++ b/deal.II/examples/step-6/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-6") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-6/Makefile b/deal.II/examples/step-6/Makefile deleted file mode 100644 index a244dfda21..0000000000 --- a/deal.II/examples/step-6/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-6 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-7/CMakeLists.txt b/deal.II/examples/step-7/CMakeLists.txt new file mode 100644 index 0000000000..f2467462be --- /dev/null +++ b/deal.II/examples/step-7/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-7") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-7/Makefile b/deal.II/examples/step-7/Makefile deleted file mode 100644 index b0ef13f95a..0000000000 --- a/deal.II/examples/step-7/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-7 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - - diff --git a/deal.II/examples/step-8/CMakeLists.txt b/deal.II/examples/step-8/CMakeLists.txt new file mode 100644 index 0000000000..4efd35ac8a --- /dev/null +++ b/deal.II/examples/step-8/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-8") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-9/CMakeLists.txt b/deal.II/examples/step-9/CMakeLists.txt new file mode 100644 index 0000000000..106628991d --- /dev/null +++ b/deal.II/examples/step-9/CMakeLists.txt @@ -0,0 +1,48 @@ +## +# An autopilot CMakeLists.txt example for a small project +# using the deal.II library +## + +# +# Set the name of the project and target: +# +SET(TARGET "step-9") + +# +# Declare all source files the target consists of: +# +SET(TARGET_SRC + ${TARGET}.cc + # You can specify additional files here! + ) + +# +# Specify files that will be deleted when calling 'make runclean' or +# 'make distclean': +# +SET(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.vtk *.ucd *.d2) + + +# Usually, you will not need to modify anything beyond this point... + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) + +# Search for the deal.II library: +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS + ${DEAL_II_DIRS} + # Additional hints for possible library locations: + ../ ../../ ../../../ ../../../../../ + # Also look for hints from environment: + $ENV{DEAL_II_DIR} $ENV{DEAL_DIR} + # + # If the deal.II library cannot be found (because it is not installed at a + # default location or your project resides at an uncommon place), you + # can specify additional hints for search paths here, e.g. + # "$ENV{HOME}/workspace/deal.II" + ) + +DEAL_II_INITIALIZE_CACHED_VARIABLES() +PROJECT(${TARGET}) +DEAL_II_INVOKE_AUTOPILOT() + diff --git a/deal.II/examples/step-9/Makefile b/deal.II/examples/step-9/Makefile deleted file mode 100644 index 697a362075..0000000000 --- a/deal.II/examples/step-9/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# $Id$ - - -# 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 = step-9 - -# 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 = ../../ - - -# 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 *vtk *ucd *.d2 - - - - -# -# -# Usually, you will not need to change anything beyond this point. -# -# -# 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 - - -# 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 -# 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 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 local default on your -# system is instead of .o) -ifeq ($(debug-mode),on) - libraries = $(target).g.$(OBJEXT) $(libs.g) -else - libraries = $(target).$(OBJEXT) $(libs.o) -endif - - -# 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. -all: $(target)$(EXEEXT) -$(target)$(EXEEXT) : $(libraries) - @echo ============================ Linking $@ - @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS) - - -# 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)$(EXEEXT) - @echo ============================ Running $< - @./$(target)$(EXEEXT) - - -# 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 *.$(OBJEXT) *~ Makefile.dep $(target)$(EXEEXT) $(clean-up-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. -./%.g.$(OBJEXT) : - @echo "==============debug========= $( $@" - @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -./%.$(OBJEXT) : - @echo "==============optimized===== $( $@" - @$(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. -.PHONY: all run clean - - -# Finally there is a rule which you normally need not care much about: -# 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 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 -# to remake this file upon inclusion at the bottom of this file. -# -# If the creation of Makefile.dep fails, blow it away and fail -Makefile.dep: $(target).cc Makefile \ - $(shell echo $D/include/deal.II/*/*.h) - @echo ============================ Remaking $@ - @$D/common/scripts/make_dependencies $(INCLUDE) -B. $(target).cc \ - > $@ \ - || (rm -f $@ ; false) - @if test -s $@ ; then true ; else rm $@ ; false ; false ; fi - -# To make the dependencies known to `make', we finally have to include -# them: -include Makefile.dep - -