~ubuntu-branches/ubuntu/saucy/deal.ii/saucy

« back to all changes in this revision

Viewing changes to examples/step-28/Makefile

  • Committer: Package Import Robot
  • Author(s): "Adam C. Powell, IV", Adam C. Powell, IV, Christophe Trophime
  • Date: 2012-02-21 06:57:30 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120221065730-r2iz70lg557wcd2e
Tags: 7.1.0-1
[ Adam C. Powell, IV ]
* New upstream (closes: #652057).
* Updated to use PETSc and SLEPc 3.2, and forward-ported all patches.
* Removed NetCDF Build-Depends because it uses serial HDF5.
* Made Sacado cmath patch work with new configure.
* Moved -dev package symlink lines in rules to arch all section.

[ Christophe Trophime ]
* debian/rules:
   - add dh_strip --dbg-package to generate dbg package (closes: #652058)
   - add .install files to simplify rules
* Add support for mumps, arpack (closes: #637655)
* Add patch for slepc 3.2 (closes: #659245)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: Makefile,v 1.20 2005/11/23 15:54:25 wolf Exp $
 
1
# $Id: Makefile 24352 2011-09-21 15:12:54Z bangerth $
2
2
 
3
3
 
4
4
# For the small projects Makefile, you basically need to fill in only
7
7
# The first is the name of the application. It is assumed that the
8
8
# application name is the same as the base file name of the single C++
9
9
# file from which the application is generated.
10
 
target = $(basename $(shell echo step-*.cc))
 
10
target = step-28
11
11
 
12
12
# The second field determines whether you want to run your program in
13
13
# debug or optimized mode. The latter is significantly faster, but no
30
30
# shall be deleted when calling `make clean'. Object and backup files,
31
31
# executables and the like are removed anyway. Here, we give a list of
32
32
# files in the various output formats that deal.II supports.
33
 
clean-up-files = *gmv *gnuplot *gpl *eps *pov
 
33
clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
34
34
 
35
35
 
36
36
 
40
40
# Usually, you will not need to change anything beyond this point.
41
41
#
42
42
#
43
 
# The next statement tell the `make' program where to find the
 
43
# The next statement tells the `make' program where to find the
44
44
# deal.II top level directory and to include the file with the global
45
45
# settings
46
46
include $D/common/Make.global_options
48
48
 
49
49
# Since the whole project consists of only one file, we need not
50
50
# consider difficult dependencies. We only have to declare the
51
 
# libraries which we want to link to the object file, and there need
52
 
# to be two sets of libraries: one for the debug mode version of the
53
 
# application and one for the optimized mode. Here we have selected
54
 
# the versions for 2d. Note that the order in which the libraries are
55
 
# given here is important and that your applications won't link
56
 
# properly if they are given in another order.
57
 
#
58
 
# You may need to augment the lists of libraries when compiling your
59
 
# program for other dimensions, or when using third party libraries
60
 
libs.g   = $(lib-deal2-2d.g) \
61
 
           $(lib-lac.g)      \
62
 
           $(lib-base.g)
63
 
libs.o   = $(lib-deal2-2d.o) \
64
 
           $(lib-lac.o)      \
65
 
           $(lib-base.o)
66
 
 
67
 
 
68
 
# We now use the variable defined above which switch between debug and
 
51
# libraries which we want to link to the object file. deal.II has two
 
52
# libraries: one for the debug mode version of the
 
53
# application and one for optimized mode.
 
54
libs.g   := $(lib-deal2.g)
 
55
libs.o   := $(lib-deal2.o)
 
56
 
 
57
 
 
58
# We now use the variable defined above to switch between debug and
69
59
# optimized mode to select the set of libraries to link with. Included
70
60
# in the list of libraries is the name of the object file which we
71
61
# will produce from the single C++ file. Note that by default we use
72
62
# the extension .g.o for object files compiled in debug mode and .o for
73
 
# object files in optimized mode (or whatever the local default on your
74
 
# system is instead of .o).
 
63
# object files in optimized mode (or whatever local default on your
 
64
# system is instead of .o)
75
65
ifeq ($(debug-mode),on)
76
66
  libraries = $(target).g.$(OBJEXT) $(libs.g)
77
67
else
83
73
# file produced from the single C++ file into the executable. Since
84
74
# this is the first rule in the Makefile, it is the one `make' selects
85
75
# if you call it without arguments.
86
 
$(target) : $(libraries)
 
76
$(target)$(EXEEXT) : $(libraries)
87
77
        @echo ============================ Linking $@
88
 
        @$(CXX) -o $@$(EXEEXT) $^ $(LIBS) $(LDFLAGS)
 
78
        @$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
89
79
 
90
80
 
91
81
# To make running the application somewhat independent of the actual
94
84
# useful if you want to call the executable with arguments which do
95
85
# not change frequently. You may then want to add them to the
96
86
# following rule:
97
 
run: $(target)
 
87
run: $(target)$(EXEEXT)
98
88
        @echo ============================ Running $<
99
89
        @./$(target)$(EXEEXT)
100
90
 
114
104
# command line using the `at' sign in the first column of the rules
115
105
# and write the string indicating what we do instead.
116
106
./%.g.$(OBJEXT) :
117
 
        @echo ==============debug========= $(<F)
 
107
        @echo "==============debug========= $(<F)  ->  $@"
118
108
        @$(CXX) $(CXXFLAGS.g) -c $< -o $@
119
109
./%.$(OBJEXT) :
120
 
        @echo ==============optimized===== $(<F)
 
110
        @echo "==============optimized===== $(<F)  ->  $@"
121
111
        @$(CXX) $(CXXFLAGS.o) -c $< -o $@
122
112
 
123
113
 
131
121
# since the executable depends on some include files from the library,
132
122
# besides the C++ application file of course, it is necessary to
133
123
# re-generate the executable when one of the files it depends on has
134
 
# changed. The following rule to created a dependency file
 
124
# changed. The following rule creates a dependency file
135
125
# `Makefile.dep', which `make' uses to determine when to regenerate
136
126
# the executable. This file is automagically remade whenever needed,
137
127
# i.e. whenever one of the cc-/h-files changed. Make detects whether
139
129
#
140
130
# If the creation of Makefile.dep fails, blow it away and fail
141
131
Makefile.dep: $(target).cc Makefile \
142
 
              $(shell echo $D/*/include/*/*.h)
 
132
              $(shell echo $D/include/deal.II/*/*.h)
143
133
        @echo ============================ Remaking $@
144
134
        @$D/common/scripts/make_dependencies  $(INCLUDE) -B. $(target).cc \
145
135
                > $@ \
146
136
          || (rm -f $@ ; false)
147
137
        @if test -s $@ ; then : else rm $@ ; fi
148
138
 
149
 
 
150
139
# To make the dependencies known to `make', we finally have to include
151
140
# them:
152
141
include Makefile.dep