1 |
gezelter |
1508 |
#--------------------------------------------------------------------------- |
2 |
|
|
# (C) 1999 - 2002 Jacob Dreyer - Geotechnical Software Services |
3 |
|
|
# jacob.dreyer@geosoft.no - http://geosoft.no |
4 |
|
|
# |
5 |
|
|
# This program is free software; you can redistribute it and/or |
6 |
|
|
# modify it under the terms of the GNU General Public License |
7 |
|
|
# as published by the Free Software Foundation; either version 2 |
8 |
|
|
# of the License, or (at your option) any later version. |
9 |
|
|
# |
10 |
|
|
# This program is distributed in the hope that it will be useful, |
11 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
|
|
# GNU General Public License for more details. |
14 |
|
|
# |
15 |
|
|
# You should have received a copy of the GNU General Public License |
16 |
|
|
# along with this program; if not, write to the Free Software |
17 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
18 |
|
|
# MA 02111-1307, USA. |
19 |
|
|
#--------------------------------------------------------------------------- |
20 |
|
|
#--------------------------------------------------------------------------- |
21 |
|
|
# |
22 |
|
|
# GnuMake crash course: |
23 |
|
|
# |
24 |
|
|
# target : depends |
25 |
|
|
# rule |
26 |
|
|
# |
27 |
|
|
# target - the parameter given to make. I.e. what to build |
28 |
|
|
# depends - file or other targets target depends on |
29 |
|
|
# rule - how to create target (note that rule is preceeded by a TAB char) |
30 |
|
|
# $(VAR) - environment variable or variable defined above |
31 |
|
|
# $@ - Current target |
32 |
|
|
# $* - Current target without extension |
33 |
|
|
# $< - Current dependency |
34 |
|
|
# |
35 |
|
|
#--------------------------------------------------------------------------- |
36 |
tim |
1514 |
IS_UNIX=1 |
37 |
tim |
1529 |
|
38 |
|
|
#packages containing libraries |
39 |
|
|
PackageLibs = \ |
40 |
tim |
1514 |
utils \ |
41 |
gezelter |
1930 |
visitors \ |
42 |
tim |
1514 |
math \ |
43 |
|
|
types \ |
44 |
|
|
primitives \ |
45 |
|
|
UseTheForce/DarkSide \ |
46 |
|
|
UseTheForce \ |
47 |
|
|
brains \ |
48 |
|
|
io \ |
49 |
gezelter |
1930 |
integrators\ |
50 |
tim |
1514 |
constraints \ |
51 |
chrisfen |
1715 |
minimizers \ |
52 |
tim |
1984 |
selection \ |
53 |
chrisfen |
2101 |
restraints \ |
54 |
gezelter |
2176 |
lattice \ |
55 |
tim |
2470 |
openbabel\ |
56 |
|
|
antlr\ |
57 |
|
|
mdParser |
58 |
tim |
1529 |
#packages containing applications |
59 |
|
|
Applications = \ |
60 |
tim |
1514 |
applications/oopse \ |
61 |
|
|
applications/dump2Xyz \ |
62 |
tim |
2011 |
applications/staticProps \ |
63 |
|
|
applications/dynamicProps \ |
64 |
gezelter |
2176 |
applications/simpleBuilder\ |
65 |
chuckv |
2164 |
applications/nanoRodBuilder \ |
66 |
tim |
2622 |
applications/atom2mdin \ |
67 |
|
|
applications/hydrodynamics |
68 |
gezelter |
1508 |
|
69 |
gezelter |
1535 |
Samples = \ |
70 |
gezelter |
2555 |
samples/alkane \ |
71 |
gezelter |
1535 |
samples/argon \ |
72 |
gezelter |
2555 |
samples/cutoff \ |
73 |
|
|
samples/dipole \ |
74 |
|
|
samples/gbljtest \ |
75 |
|
|
samples/lipid \ |
76 |
|
|
samples/metals/EAM \ |
77 |
|
|
samples/metals/EAM/nanoparticle \ |
78 |
|
|
samples/metals/EAM/nanorod \ |
79 |
|
|
samples/metals/Sutton-Chen \ |
80 |
|
|
samples/minimizer \ |
81 |
|
|
samples/shape \ |
82 |
|
|
samples/thermoIntegration/liquid \ |
83 |
|
|
samples/thermoIntegration/solid \ |
84 |
tim |
2202 |
samples/water/dimer \ |
85 |
gezelter |
1535 |
samples/water/spce \ |
86 |
|
|
samples/water/ssd \ |
87 |
|
|
samples/water/ssde \ |
88 |
tim |
2202 |
samples/water/ssdrf \ |
89 |
|
|
samples/water/ssd-ion \ |
90 |
gezelter |
1535 |
samples/water/tip3p_ice \ |
91 |
|
|
samples/water/tip4p \ |
92 |
gezelter |
2555 |
samples/zcons |
93 |
gezelter |
1535 |
|
94 |
tim |
1514 |
IncludeDirs = \ |
95 |
gezelter |
2190 |
@CGAL_INC_DIR@ \ |
96 |
|
|
@MPI_INC_DIR@ |
97 |
tim |
1514 |
|
98 |
|
|
LibraryDirs = \ |
99 |
gezelter |
2190 |
@CGAL_LIB_DIR@ \ |
100 |
gezelter |
1521 |
@MPI_LIB_DIR@ |
101 |
tim |
1514 |
|
102 |
|
|
Libraries = \ |
103 |
gezelter |
2316 |
@LIBS@ \ |
104 |
gezelter |
2190 |
@CGAL_LIBS@ \ |
105 |
tim |
1525 |
@MPI_LIB@ \ |
106 |
gezelter |
2190 |
@MPI_F90_LIB@ |
107 |
tim |
1514 |
|
108 |
gezelter |
1521 |
OopseHome = @OOPSE_HOME@ |
109 |
gezelter |
1552 |
ForceParamDir = $(OopseHome)/share/forceFields |
110 |
|
|
SampleSimDir = $(OopseHome)/share/samples |
111 |
|
|
InstallBinDir = $(OopseHome)/bin |
112 |
|
|
DocDir = $(OopseHome)/doc |
113 |
gezelter |
1521 |
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
114 |
gezelter |
1535 |
F90Declare = -D__FORTRAN90 |
115 |
gezelter |
1521 |
ParallelDeclare = -DIS_MPI |
116 |
tim |
1525 |
UseMPI = @USE_MPI@ |
117 |
gezelter |
1535 |
ModuleCase = @F90_MODULE_NAMES@ |
118 |
|
|
ModSuffix = @MOD@ |
119 |
tim |
1529 |
LinkOptions = \ |
120 |
gezelter |
2580 |
@FCLIBS@ \ |
121 |
|
|
@CXXFLAGS@ |
122 |
gezelter |
1521 |
|
123 |
tim |
1529 |
ParallelLinkOptions = \ |
124 |
gezelter |
2580 |
@FCLIBS@ \ |
125 |
|
|
@CXXFLAGS@ |
126 |
tim |
1529 |
|
127 |
|
|
|
128 |
gezelter |
1508 |
#--------------------------------------------------------------------------- |
129 |
|
|
# |
130 |
|
|
# Directories |
131 |
|
|
# |
132 |
|
|
#--------------------------------------------------------------------------- |
133 |
|
|
|
134 |
|
|
SourceDir = $(DEV_ROOT)/src |
135 |
|
|
TargetDir = $(DEV_ROOT)/obj |
136 |
|
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
137 |
|
|
LibDir = $(DEV_ROOT)/lib |
138 |
|
|
MakeDir = $(DEV_ROOT)/make |
139 |
gezelter |
2217 |
MainMakefile = $(MakeDir)/Makefile |
140 |
gezelter |
1508 |
BinDir = $(DEV_ROOT)/bin |
141 |
|
|
DocsDir = $(DEV_ROOT)/docs |
142 |
|
|
CurrentDir = $(CURDIR) |
143 |
tim |
1529 |
CombinedStaticLib = $(LibDir)/libOOPSE.a |
144 |
|
|
CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a |
145 |
gezelter |
1508 |
|
146 |
|
|
ifdef Source |
147 |
tim |
1512 |
#get the relative path of current package to source directory |
148 |
|
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
149 |
|
|
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
150 |
|
|
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
151 |
gezelter |
1951 |
#Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
152 |
|
|
# REMINDER: We are now using the Package line in each subdir makefile. |
153 |
|
|
# This avoids the strange path problem and the subshell |
154 |
tim |
1512 |
|
155 |
gezelter |
1508 |
PackageList = $(Package) |
156 |
|
|
PackageSourceDir = $(SourceDir)/$(Package) |
157 |
|
|
PackageTargetDir = $(TargetDir) |
158 |
|
|
PackageParallelTargetDir = $(ParallelTargetDir) |
159 |
|
|
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
160 |
|
|
else |
161 |
tim |
1529 |
PackageList = $(PackageLibs) $(JavaPackages) $(Applications) |
162 |
gezelter |
1508 |
endif |
163 |
|
|
|
164 |
tim |
1512 |
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
165 |
gezelter |
1508 |
|
166 |
tim |
1512 |
JRE = $(JAVA_HOME)/jre/lib/rt.jar |
167 |
gezelter |
1508 |
|
168 |
|
|
ifdef IS_UNIX |
169 |
|
|
X = : |
170 |
|
|
else |
171 |
|
|
X = \; |
172 |
|
|
endif |
173 |
|
|
|
174 |
|
|
#--------------------------------------------------------------------------- |
175 |
|
|
# |
176 |
|
|
# Classification of files |
177 |
|
|
# |
178 |
|
|
#--------------------------------------------------------------------------- |
179 |
|
|
|
180 |
|
|
# Source |
181 |
|
|
JavaFiles = $(filter %.java, $(Source)) |
182 |
|
|
CppFiles = $(filter %.cpp, $(Source)) |
183 |
|
|
CFiles = $(filter %.c, $(Source)) |
184 |
|
|
FortranFiles = $(filter %.f, $(Source)) |
185 |
|
|
F90Files = $(filter %.F90, $(Source)) |
186 |
|
|
CorbaFiles = $(filter %.idl, $(Source)) |
187 |
|
|
LexFiles = $(filter %.l, $(Source)) |
188 |
|
|
YaccFiles = $(filter %.y, $(Source)) |
189 |
|
|
OtherSourceFiles = $(filter-out $(JavaFiles) $(CppFiles) $(CFiles) \ |
190 |
|
|
$(FortranFiles) $(F90Files) $(LexFiles) \ |
191 |
|
|
$(YaccFiles) $(CorbaFiles), \ |
192 |
|
|
$(Source)) |
193 |
|
|
ManifestFile = $(PackageSourceDir)/Manifest |
194 |
|
|
|
195 |
tim |
1512 |
SourceFiles = $(JavaFiles)\ |
196 |
|
|
$(CppFiles)\ |
197 |
|
|
$(CFiles)\ |
198 |
|
|
$(FortranFiles)\ |
199 |
|
|
$(F90Files)\ |
200 |
|
|
$(LexFiles)\ |
201 |
|
|
$(YaccFiles) |
202 |
gezelter |
1508 |
|
203 |
|
|
# Target |
204 |
|
|
JavaClassFiles = $(JavaFiles:%.java= $(PackageTargetDir)/%.class) |
205 |
|
|
JavaClassFilesRel = $(JavaFiles:%.java= $(Package)/%.class) |
206 |
|
|
RmiStubFiles = $(RmiSource:%.java= $(PackageTargetDir)/%_Stub.class) |
207 |
|
|
RmiSkeletonFiles = $(RmiSource:%.java= $(PackageTargetDir)/%_Skel.class) |
208 |
|
|
JniClassFiles = $(JniSource:%.java= $(PackageTargetDir)/%.class) |
209 |
|
|
JniHeaders = $(JniSource:%.java= $(PackageSourceDir)/%.h) |
210 |
|
|
ObjectFiles = $(CFiles:%.c= $(PackageTargetDir)/%.o)\ |
211 |
tim |
1512 |
$(CppFiles:%.cpp= $(PackageTargetDir)/%.o)\ |
212 |
tim |
1525 |
$(FortranFiles:%.f= $(PackageTargetDir)/%.o)\ |
213 |
|
|
$(F90Files:%.F90= $(PackageTargetDir)/%.o)\ |
214 |
|
|
$(LexFiles:%.l= $(PackageTargetDir)/%.o)\ |
215 |
|
|
$(YaccFiles:%.y= $(PackageTargetDir)/%.o) |
216 |
gezelter |
1508 |
ParallelObjectFiles = $(CFiles:%.c= $(PackageParallelTargetDir)/%.o)\ |
217 |
tim |
1525 |
$(CppFiles:%.cpp= $(PackageParallelTargetDir)/%.o)\ |
218 |
|
|
$(FortranFiles:%.f= $(PackageParallelTargetDir)/%.o)\ |
219 |
|
|
$(F90Files:%.F90= $(PackageParallelTargetDir)/%.o)\ |
220 |
|
|
$(LexFiles:%.l= $(PackageParallelTargetDir)/%.o)\ |
221 |
|
|
$(YaccFiles:%.y= $(PackageParallelTargetDir)/%.o) |
222 |
gezelter |
1508 |
|
223 |
|
|
DerivedSource = $(YaccFiles:%.y= %.h) \ |
224 |
tim |
1525 |
$(YaccFiles:%.y= %.c) \ |
225 |
|
|
$(LexFiles:%.l= %.c) |
226 |
gezelter |
1508 |
|
227 |
|
|
DerivedCFiles = $(YaccFiles:%.y= %.c) \ |
228 |
tim |
1525 |
$(LexFiles:%.l= %.c) |
229 |
gezelter |
1508 |
|
230 |
|
|
OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) |
231 |
|
|
|
232 |
gezelter |
2157 |
########################################################################### |
233 |
|
|
# |
234 |
|
|
# Figure out the names of the module files based on some work done by |
235 |
|
|
# configure. The tr function below is from John Graham-Cumming |
236 |
|
|
# (http://www.jgc.org). |
237 |
|
|
# |
238 |
|
|
# The tr function. Has three arguments: |
239 |
|
|
# |
240 |
|
|
# $1 The list of characters to translate from |
241 |
|
|
# $2 The list of characters to translate to |
242 |
|
|
# $3 The text to translate |
243 |
|
|
# |
244 |
|
|
# For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L. |
245 |
|
|
|
246 |
|
|
tr = $(eval __t := $3) \ |
247 |
|
|
$(foreach c, \ |
248 |
|
|
$(join $(addsuffix :,$1),$2), \ |
249 |
|
|
$(eval __t := \ |
250 |
|
|
$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \ |
251 |
|
|
$(__t))))$(__t) |
252 |
|
|
|
253 |
|
|
# Common character classes for use with the tr function. Each of |
254 |
|
|
# these is actually a variable declaration and must be wrapped with |
255 |
|
|
# $() or ${} to be used. |
256 |
|
|
|
257 |
|
|
[A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # |
258 |
|
|
[a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z # |
259 |
|
|
[0-9] := 0 1 2 3 4 5 6 7 8 9 # |
260 |
|
|
[A-F] := A B C D E F # |
261 |
|
|
|
262 |
gezelter |
2158 |
# Figure out whether we have $(eval) or not (GNU Make 3.80 and above) |
263 |
|
|
# if we do not then we need to use the shell version of tr, and not the |
264 |
|
|
# faster tr function above: |
265 |
gezelter |
2157 |
|
266 |
gezelter |
2158 |
__have_eval := $(false) |
267 |
|
|
__ignore := $(eval __have_eval := $(true)) |
268 |
gezelter |
2157 |
|
269 |
gezelter |
2158 |
ifndef __have_eval |
270 |
gezelter |
2159 |
uc = $(shell echo $1 | tr "a-z" "A-Z") |
271 |
gezelter |
2158 |
lc = $(shell echo $1 | tr "A-Z" "a-z") |
272 |
|
|
else |
273 |
|
|
uc = $(call tr,$([a-z]),$([A-Z]),$1) |
274 |
|
|
lc = $(call tr,$([A-Z]),$([a-z]),$1) |
275 |
|
|
endif |
276 |
|
|
|
277 |
gezelter |
2157 |
# OK, now we can actually use these functions to figure out the names |
278 |
|
|
# of the module files: |
279 |
|
|
|
280 |
|
|
ifneq "$(words $(Modules))" "0" |
281 |
|
|
ifeq "$(ModuleCase)" "UPPER" |
282 |
|
|
MODULES = $(call uc,$(Modules)) |
283 |
|
|
else |
284 |
|
|
ifeq "$(ModuleCase)" "lower" |
285 |
|
|
MODULES = $(call lc,$(Modules)) |
286 |
|
|
else |
287 |
|
|
MODULES = $(Modules) |
288 |
|
|
endif |
289 |
|
|
endif |
290 |
|
|
ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix)) |
291 |
|
|
ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix)) |
292 |
|
|
endif |
293 |
|
|
# |
294 |
|
|
########################################################################### |
295 |
|
|
|
296 |
gezelter |
1508 |
ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries)) |
297 |
|
|
ThirdPartyJars = $(subst $(Space),$(X),$(ThirdPartyJarsTmp)) |
298 |
|
|
|
299 |
|
|
ifneq "$(words $(JavaFiles))" "0" |
300 |
|
|
JavaPackageName = $(subst /,.,$(Package)) |
301 |
|
|
JarFile = $(LibDir)/$(subst /,,$(Package)).jar |
302 |
|
|
endif |
303 |
|
|
|
304 |
|
|
#if Main is defined, do not build library. It may not be true sometimes |
305 |
|
|
ifneq "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0" |
306 |
|
|
DependencyFile = $(PackageSourceDir)/Makedepend |
307 |
gezelter |
2126 |
ifneq "$(words $(Main))" "0" |
308 |
tim |
1512 |
Executable = $(BinDir)/$(Main) |
309 |
tim |
2131 |
ifeq "$(BuiltParallelExe)" "1" |
310 |
|
|
ParallelExecutable = $(BinDir)/$(Main)_MPI |
311 |
|
|
endif |
312 |
gezelter |
1508 |
else |
313 |
tim |
1529 |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
314 |
|
|
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
315 |
|
|
ParallelSharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so |
316 |
|
|
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
317 |
gezelter |
1508 |
endif |
318 |
|
|
endif |
319 |
tim |
1544 |
|
320 |
gezelter |
1508 |
# |
321 |
|
|
# Misc |
322 |
|
|
# |
323 |
|
|
ClassPath = $(JRE)$(X)$(TargetDir)$(X)$(ThirdPartyJars) |
324 |
|
|
JavaPackageNames = $(subst /,.,$(JavaPackages)) |
325 |
|
|
IncludePath = -I$(SourceDir) $(IncludeDirs:%=-I%) |
326 |
|
|
LibDirs = -L$(LibDir) $(LibraryDirs:%=-L%) |
327 |
tim |
1529 |
LocalLibs = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs))) |
328 |
|
|
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs))) |
329 |
gezelter |
1521 |
LibList = $(LocalLibs:%=-l%) $(Libraries) |
330 |
tim |
1529 |
LibNames = $(LocalLibs:%=$(LibDir)/lib%.a) |
331 |
tim |
1525 |
ParallelLibList = $(ParallelLocalLibs:%=-l%) $(Libraries) |
332 |
tim |
1529 |
ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a) |
333 |
gezelter |
1508 |
|
334 |
|
|
|
335 |
|
|
#--------------------------------------------------------------------------- |
336 |
|
|
# |
337 |
|
|
# Tools & Options |
338 |
|
|
# |
339 |
|
|
#--------------------------------------------------------------------------- |
340 |
|
|
Print = @echo |
341 |
gezelter |
1930 |
Move = mv -f |
342 |
gezelter |
1508 |
Copy = cp |
343 |
|
|
CCompiler = @CC@ |
344 |
|
|
CppCompiler = @CXX@ |
345 |
|
|
Linker = @CXX@ |
346 |
|
|
MakeDepend = makedepend |
347 |
gezelter |
2456 |
LN_S = @LN_S@ |
348 |
gezelter |
1552 |
INSTALL = @INSTALL@ |
349 |
gezelter |
2474 |
EGREP = @EGREP@ |
350 |
gezelter |
1508 |
InstallProgram = @INSTALL_PROGRAM@ |
351 |
gezelter |
2126 |
InstallScript = @INSTALL_SCRIPT@ |
352 |
gezelter |
1508 |
InstallData = @INSTALL_DATA@ |
353 |
gezelter |
1938 |
MkDir = @MKINSTALLDIRS@ |
354 |
gezelter |
2217 |
Delete = rm -f |
355 |
gezelter |
1508 |
StaticArchiver = @AR@ |
356 |
|
|
DynamicArchiver = @CC@ |
357 |
|
|
FortranCompiler = @FC@ |
358 |
|
|
JavaCompiler = $(JAVA_HOME)/bin/javac |
359 |
|
|
JavaArchiver = $(JAVA_HOME)/bin/jar |
360 |
|
|
JarSigner = $(JAVA_HOME)/bin/jarsigner |
361 |
|
|
JavadocGenerator = $(JAVA_HOME)/bin/javadoc |
362 |
|
|
JniCompiler = $(JAVA_HOME)/bin/javah |
363 |
|
|
RmiCompiler = $(JAVA_HOME)/bin/rmic |
364 |
|
|
JavaExecute = $(JAVA_HOME)/bin/java |
365 |
|
|
Purify = purify |
366 |
|
|
WordCount = wc |
367 |
|
|
List = cat |
368 |
|
|
Yacc = @YACC@ |
369 |
|
|
Lex = @LEX@ |
370 |
tim |
1529 |
Ranlib = @RANLIB@ |
371 |
tim |
1539 |
Doxygen = @DOXYGEN@ |
372 |
gezelter |
1508 |
|
373 |
tim |
1514 |
MakeOptions = -k |
374 |
gezelter |
1508 |
MakeDependOptions = |
375 |
|
|
StaticArchiverOptions = rc |
376 |
|
|
DynamicArchiverOptions = -shared |
377 |
|
|
JavaArchiverOptions = |
378 |
|
|
JniOptions = |
379 |
|
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
380 |
|
|
-sourcepath $(SourceDir) |
381 |
gezelter |
2024 |
COptions = $(FrcDeclare) @CFLAGS@ |
382 |
chrisfen |
1635 |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
383 |
gezelter |
2547 |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
384 |
|
|
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
385 |
|
|
FortranOptions = @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @FCFLAGS_SRCEXT@ |
386 |
|
|
FortranParallelOptions = @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclar) @FCFLAGS_SRCEXT@ |
387 |
gezelter |
1508 |
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
388 |
|
|
-sourcepath $(SourceDir) -deprecation |
389 |
|
|
JavaRunOptions = -classpath $(ClassPath) |
390 |
|
|
PurifyOptions = |
391 |
|
|
JavadocOptions = -d $(DocsDir) \ |
392 |
|
|
-sourcepath $(SourceDir) \ |
393 |
|
|
-classpath $(ClassPath) \ |
394 |
|
|
-author \ |
395 |
|
|
-package \ |
396 |
|
|
-use \ |
397 |
|
|
-splitIndex \ |
398 |
|
|
-version \ |
399 |
|
|
-link file:$(JAVA_HOME)/docs/api \ |
400 |
|
|
-windowtitle $(JavadocWindowTitle) \ |
401 |
|
|
-doctitle $(JavadocDocTitle) \ |
402 |
|
|
-header $(JavadocHeader) \ |
403 |
|
|
-bottom $(JavadocFooter) |
404 |
|
|
WordCountOptions = --lines |
405 |
|
|
|
406 |
|
|
Empty = |
407 |
|
|
Space = $(Empty) $(Empty) |
408 |
|
|
|
409 |
|
|
|
410 |
|
|
#--------------------------------------------------------------------------- |
411 |
|
|
# |
412 |
tim |
1544 |
# Install |
413 |
|
|
# |
414 |
|
|
#--------------------------------------------------------------------------- |
415 |
|
|
|
416 |
|
|
ifneq "$(words $(SampleFiles))" "0" |
417 |
tim |
1546 |
MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) |
418 |
|
|
MyInstallDir = $(SampleSimDir)/$(MySample) |
419 |
|
|
InstallFiles = $(SampleFiles) |
420 |
|
|
InstallCommand = $(InstallData) |
421 |
tim |
1544 |
endif |
422 |
|
|
|
423 |
|
|
ifneq "$(words $(Main))" "0" |
424 |
tim |
1546 |
MyInstallDir = $(InstallBinDir) |
425 |
|
|
ifeq "$(UseMPI)" "yes" |
426 |
|
|
InstallFiles = $(Executable) $(ParallelExecutable) |
427 |
|
|
else |
428 |
|
|
InstallFiles = $(Executable) |
429 |
|
|
endif |
430 |
|
|
InstallCommand = $(InstallProgram) |
431 |
tim |
2457 |
ifneq "$(words $(LinkTargets))" "0" |
432 |
|
|
MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main)) |
433 |
|
|
MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets)) |
434 |
|
|
endif |
435 |
tim |
1544 |
endif |
436 |
|
|
|
437 |
tim |
1545 |
ifneq "$(words $(ForcefieldFiles))" "0" |
438 |
tim |
1546 |
MyInstallDir = $(ForceParamDir) |
439 |
|
|
InstallFiles = $(ForcefieldFiles) |
440 |
|
|
InstallCommand = $(InstallData) |
441 |
tim |
1544 |
endif |
442 |
|
|
|
443 |
|
|
ifneq "$(words $(InstallFiles))" "0" |
444 |
|
|
InstallList = |
445 |
|
|
else |
446 |
tim |
1545 |
InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) |
447 |
tim |
1544 |
endif |
448 |
|
|
|
449 |
|
|
InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) |
450 |
|
|
|
451 |
|
|
|
452 |
|
|
|
453 |
|
|
#--------------------------------------------------------------------------- |
454 |
|
|
# |
455 |
gezelter |
1508 |
# Rules |
456 |
|
|
# |
457 |
|
|
#--------------------------------------------------------------------------- |
458 |
|
|
default : build |
459 |
|
|
|
460 |
|
|
%.loop : |
461 |
|
|
@$(MAKE) $(MakeOptions) -C $(subst .loop,,$@) _$(MAKECMDGOALS)all |
462 |
|
|
|
463 |
|
|
# Create target directory |
464 |
|
|
$(PackageTargetDir) : |
465 |
gezelter |
1938 |
$(MkDir) $@ |
466 |
gezelter |
1508 |
|
467 |
gezelter |
1938 |
$(BinDir) : |
468 |
|
|
$(MkDir) $@ |
469 |
|
|
|
470 |
gezelter |
1508 |
# .c -> .o |
471 |
gezelter |
2217 |
$(PackageTargetDir)/%.o : %.c $(MainMakefile) |
472 |
gezelter |
1508 |
$(Print) $@ |
473 |
tim |
1514 |
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
474 |
gezelter |
1508 |
|
475 |
gezelter |
2217 |
$(PackageParallelTargetDir)/%.o : %.c $(MainMakefile) |
476 |
tim |
1525 |
$(Print) $@ |
477 |
|
|
$(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@ |
478 |
|
|
|
479 |
|
|
ifeq "$(UseMPI)" "yes" |
480 |
gezelter |
2217 |
%.o : %.c $(MainMakefile) |
481 |
gezelter |
1508 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
482 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
483 |
|
|
else |
484 |
gezelter |
2217 |
%.o : %.c $(MainMakefile) |
485 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
486 |
|
|
endif |
487 |
gezelter |
1508 |
|
488 |
|
|
# .cpp -> .o |
489 |
gezelter |
2217 |
$(PackageTargetDir)/%.o : %.cpp $(MainMakefile) |
490 |
gezelter |
1508 |
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
491 |
|
|
|
492 |
gezelter |
2217 |
$(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile) |
493 |
tim |
1525 |
$(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@ |
494 |
|
|
|
495 |
|
|
ifeq "$(UseMPI)" "yes" |
496 |
gezelter |
2217 |
%.o : %.cpp $(MainMakefile) |
497 |
gezelter |
1508 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
498 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
499 |
|
|
else |
500 |
gezelter |
2217 |
%.o : %.cpp $(MainMakefile) |
501 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
502 |
|
|
endif |
503 |
gezelter |
1508 |
|
504 |
|
|
# .f -> .o |
505 |
gezelter |
2217 |
$(PackageTargetDir)/%.o : %.f $(MainMakefile) |
506 |
tim |
1514 |
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
507 |
gezelter |
1508 |
|
508 |
gezelter |
2217 |
$(PackageParallelTargetDir)/%.o : %.f $(MainMakefile) |
509 |
tim |
1525 |
$(FortranCompiler) $(FortranParallelOptions) -c $< -o $@ |
510 |
|
|
|
511 |
|
|
ifeq "$(UseMPI)" "yes" |
512 |
gezelter |
2217 |
%.o : %.f $(MainMakefile) |
513 |
gezelter |
1508 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
514 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
515 |
|
|
else |
516 |
gezelter |
2217 |
%.o : %.f $(MainMakefile) |
517 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
518 |
|
|
endif |
519 |
gezelter |
1508 |
|
520 |
|
|
# .F90 -> .o |
521 |
gezelter |
2217 |
$(PackageTargetDir)/%.o : %.F90 $(MainMakefile) |
522 |
gezelter |
2547 |
$(FortranCompiler) $(FortranOptions) $(IncludePath) -c $< -o $@ |
523 |
gezelter |
1930 |
if test -n "`ls *.$(ModSuffix)`"; then \ |
524 |
|
|
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
525 |
|
|
fi |
526 |
gezelter |
1508 |
|
527 |
gezelter |
2217 |
$(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile) |
528 |
gezelter |
2547 |
$(FortranCompiler) $(FortranParallelOptions) $(IncludePath) -c $< -o $@ |
529 |
gezelter |
1930 |
if test -n "`ls *.$(ModSuffix)`"; then \ |
530 |
|
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
531 |
|
|
fi |
532 |
tim |
1525 |
|
533 |
|
|
ifeq "$(UseMPI)" "yes" |
534 |
gezelter |
2217 |
%.o : %.F90 $(MainMakefile) |
535 |
gezelter |
1508 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
536 |
tim |
1932 |
if test -n "`ls *.$(ModSuffix)`"; then\ |
537 |
|
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
538 |
chuckv |
1899 |
fi |
539 |
tim |
1553 |
|
540 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
541 |
tim |
1933 |
if test -n "`ls *.$(ModSuffix)`"; then\ |
542 |
|
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
543 |
|
|
fi |
544 |
tim |
1553 |
|
545 |
tim |
1525 |
else |
546 |
gezelter |
2217 |
%.o : %.F90 $(MainMakefile) |
547 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
548 |
tim |
1932 |
if test -n "`ls *.$(ModSuffix)`"; then\ |
549 |
|
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
550 |
chuckv |
1899 |
fi |
551 |
tim |
1525 |
endif |
552 |
gezelter |
1508 |
|
553 |
tim |
1525 |
|
554 |
gezelter |
1508 |
# .java -> .class |
555 |
|
|
$(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java |
556 |
tim |
1514 |
$(JavaCompiler) $(JavaCompilerOptions) $< |
557 |
gezelter |
1508 |
|
558 |
|
|
%.class : $(PackageSourceDir)/%.java |
559 |
|
|
@$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
560 |
|
|
|
561 |
|
|
# .class -> .h |
562 |
|
|
$(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class |
563 |
|
|
$(JniCompiler) $(JniOptions) $(JavaPackageName).$* |
564 |
|
|
|
565 |
|
|
%.h : %.class |
566 |
|
|
$(MAKE) $(MakeOptions) $(PackageSourceDir)/$@ |
567 |
|
|
|
568 |
|
|
#.y -> .h |
569 |
tim |
1512 |
%.h : %.y |
570 |
tim |
1514 |
$(Yacc) -d $? |
571 |
gezelter |
1508 |
@$(Move) y.tab.h $*.h |
572 |
|
|
@$(Delete) y.tab.c |
573 |
|
|
|
574 |
|
|
#.y -> .c |
575 |
tim |
1512 |
%.c : %.y |
576 |
tim |
1514 |
$(Yacc) -d $? |
577 |
gezelter |
1508 |
@$(Move) y.tab.c $*.c |
578 |
|
|
@$(Delete) y.tab.h |
579 |
|
|
|
580 |
|
|
# .l -> .c |
581 |
tim |
1512 |
%.c : %.l |
582 |
gezelter |
1508 |
$(Print) $@ |
583 |
|
|
$(Print) $(Lex) -o$@ $? |
584 |
|
|
@$(Lex) -o$@ $? |
585 |
|
|
|
586 |
|
|
# .o -> .a |
587 |
tim |
1525 |
|
588 |
tim |
1529 |
$(LibDir)/%_UP.a : $(ObjectFiles) |
589 |
tim |
1514 |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
590 |
tim |
1530 |
@touch $(LibDir)/.stamp_UP |
591 |
gezelter |
1508 |
|
592 |
tim |
1529 |
$(LibDir)/%_MPI.a: $(ParallelObjectFiles) |
593 |
tim |
1514 |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
594 |
tim |
1530 |
@touch $(LibDir)/.stamp_MPI |
595 |
gezelter |
1508 |
|
596 |
tim |
1529 |
%_UP.a : $(ObjectFiles) |
597 |
gezelter |
1508 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
598 |
tim |
1529 |
|
599 |
|
|
%_MPI.a : $(ParallelObjectFiles) |
600 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
601 |
gezelter |
1508 |
|
602 |
|
|
# .o -> .so |
603 |
tim |
1529 |
$(LibDir)/%_UP.so : $(ObjectFiles) |
604 |
gezelter |
1508 |
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
605 |
|
|
|
606 |
tim |
1529 |
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
607 |
gezelter |
1508 |
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
608 |
|
|
|
609 |
tim |
1529 |
%_UP.so : $(ObjectFiles) |
610 |
gezelter |
1508 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
611 |
tim |
1529 |
|
612 |
|
|
%_MPI.so : $(ParallelObjectFiles) |
613 |
tim |
1525 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
614 |
gezelter |
1508 |
|
615 |
|
|
# .class -> .jar |
616 |
|
|
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
617 |
|
|
$(Print) $@ |
618 |
|
|
@cd $(TargetDir); $(JavaArchiver) -cf $@ \ |
619 |
|
|
$(JavaClassFilesRel) $(OtherTargetFiles) |
620 |
|
|
|
621 |
|
|
%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
622 |
|
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
623 |
|
|
|
624 |
|
|
# .class -> JavaDoc |
625 |
|
|
javadoc : |
626 |
|
|
$(Print) $(JavaPackageNames) > $(DEV_ROOT)/packages.tmp |
627 |
|
|
$(JavadocGenerator) $(JavadocOptions) @$(DEV_ROOT)/packages.tmp |
628 |
|
|
$(Delete) $(DEV_ROOT)/packages.tmp |
629 |
|
|
$(Print) Done JavaDoc. |
630 |
|
|
|
631 |
|
|
# .class -> _Stub.class |
632 |
|
|
$(PackageTargetDir)/%_Stub.class : $(PackageTargetDir)/%.class |
633 |
|
|
$(Print) $@ |
634 |
|
|
$(RmiCompiler) $(RmiOptions) $(JavaPackageName).$* |
635 |
|
|
|
636 |
|
|
%_Stub.class : %.class |
637 |
|
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
638 |
|
|
|
639 |
|
|
# .class -> _Skel.class |
640 |
|
|
$(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)/%.class |
641 |
|
|
$(Print) $@ |
642 |
|
|
$(RmiCompiler) $(RmiOptions) $(JavaPackageName).$* |
643 |
|
|
|
644 |
|
|
%_Skel.class : %.class |
645 |
|
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
646 |
|
|
|
647 |
tim |
1539 |
document : |
648 |
|
|
$(Print) Generate Documentation for OOPSE-2.0 |
649 |
|
|
@cd $(DEV_ROOT)/src |
650 |
|
|
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
651 |
|
|
|
652 |
tim |
1529 |
#GUN make funtions to merge the libraries |
653 |
gezelter |
2474 |
find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF") |
654 |
tim |
1529 |
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
655 |
|
|
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
656 |
|
|
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
657 |
|
|
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
658 |
gezelter |
2456 |
do_link = $(shell $(LN_S) $(1) $(2)) |
659 |
gezelter |
2474 |
all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib))) |
660 |
|
|
all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib))) |
661 |
|
|
all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs)) |
662 |
tim |
2531 |
all_lib_parallel_objs = $(patsubst %,$(ParallelTargetDir)/%,$(call all_parallel_objs)) |
663 |
tim |
1529 |
|
664 |
tim |
1530 |
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
665 |
gezelter |
2474 |
$(Print) creating $@ |
666 |
|
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs) |
667 |
tim |
1529 |
$(Ranlib) $(CombinedStaticLib) |
668 |
|
|
|
669 |
|
|
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
670 |
gezelter |
2474 |
$(Print) creating $@ |
671 |
|
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs) |
672 |
tim |
1529 |
$(Ranlib) $(CombinedParallelStaticLib) |
673 |
|
|
|
674 |
gezelter |
1508 |
# Executable |
675 |
gezelter |
2557 |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
676 |
|
|
if test ! -d $(BinDir); then \ |
677 |
|
|
$(MkDir) $(BinDir) ;\ |
678 |
|
|
fi |
679 |
tim |
1936 |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
680 |
gezelter |
1508 |
|
681 |
gezelter |
2557 |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
682 |
|
|
if test ! -d $(BinDir); then \ |
683 |
|
|
$(MkDir) $(BinDir) ;\ |
684 |
|
|
fi |
685 |
tim |
1936 |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
686 |
gezelter |
1508 |
|
687 |
|
|
# Anything else is just copied from source to target |
688 |
|
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
689 |
|
|
$(Print) $@ |
690 |
|
|
$(Copy) $< $@ |
691 |
|
|
|
692 |
|
|
# make (or make build) |
693 |
|
|
build : $(PackageListLoop) |
694 |
|
|
$(Print) Done build. |
695 |
|
|
|
696 |
|
|
_all : _buildall |
697 |
|
|
|
698 |
tim |
1544 |
_buildall : |
699 |
tim |
1525 |
ifeq "$(UseMPI)" "yes" |
700 |
gezelter |
1508 |
_buildall : \ |
701 |
|
|
$(DependencyFile) \ |
702 |
|
|
$(PackageTargetDir) \ |
703 |
|
|
$(ObjectFiles) \ |
704 |
tim |
1525 |
$(ParallelObjectFiles) \ |
705 |
gezelter |
1508 |
$(JavaClassFiles) \ |
706 |
|
|
$(RmiStubFiles) \ |
707 |
|
|
$(RmiSkeletonFiles) \ |
708 |
|
|
$(OtherTargetFiles) \ |
709 |
|
|
$(StaticLibrary) \ |
710 |
tim |
1525 |
$(ParallelStaticLibrary) \ |
711 |
gezelter |
1508 |
$(JarFile) \ |
712 |
tim |
1525 |
$(Executable) \ |
713 |
|
|
$(ParallelExecutable) |
714 |
|
|
else |
715 |
|
|
_buildall : \ |
716 |
|
|
$(DependencyFile) \ |
717 |
|
|
$(PackageTargetDir) \ |
718 |
|
|
$(ObjectFiles) \ |
719 |
|
|
$(JavaClassFiles) \ |
720 |
|
|
$(RmiStubFiles) \ |
721 |
|
|
$(RmiSkeletonFiles) \ |
722 |
|
|
$(OtherTargetFiles) \ |
723 |
|
|
$(StaticLibrary) \ |
724 |
|
|
$(JarFile) \ |
725 |
|
|
$(Executable) |
726 |
|
|
endif |
727 |
gezelter |
1508 |
|
728 |
gezelter |
2157 |
echo : $(PackageListLoop) |
729 |
|
|
$(Print) Done echo. |
730 |
tim |
1525 |
|
731 |
gezelter |
2157 |
_echoall : |
732 |
|
|
$(Print) $(Modules) |
733 |
|
|
|
734 |
gezelter |
1508 |
# make clean |
735 |
|
|
clean : $(PackageListLoop) |
736 |
|
|
$(Print) Done clean. |
737 |
|
|
|
738 |
|
|
_cleanall : |
739 |
gezelter |
2067 |
$(Delete) \ |
740 |
|
|
$(ObjectFiles) \ |
741 |
gezelter |
2157 |
$(ModuleFiles) \ |
742 |
gezelter |
2067 |
$(ParallelObjectFiles) \ |
743 |
gezelter |
2157 |
$(ParallelModuleFiles) \ |
744 |
gezelter |
2067 |
$(JarFile) \ |
745 |
|
|
$(SharedLibrary) \ |
746 |
|
|
$(StaticLibrary) \ |
747 |
|
|
$(ParallelSharedLibrary) \ |
748 |
|
|
$(ParallelStaticLibrary) \ |
749 |
|
|
$(CombinedStaticLib) \ |
750 |
|
|
$(CombinedParallelStaticLib) |
751 |
tim |
1514 |
|
752 |
|
|
# make distclean |
753 |
|
|
distclean : $(PackageListLoop) |
754 |
|
|
$(Print) Done clean. |
755 |
|
|
|
756 |
gezelter |
2067 |
_distcleanall : _cleanall |
757 |
|
|
$(Delete) $(Executable) \ |
758 |
tim |
1514 |
$(ParallelExecutable) \ |
759 |
tim |
1523 |
$(DependencyFile) |
760 |
gezelter |
1508 |
|
761 |
|
|
# make depend |
762 |
|
|
depend : $(PackageListLoop) |
763 |
|
|
$(Print) Done dependencies. |
764 |
|
|
|
765 |
|
|
_dependall : $(DependencyFile) |
766 |
|
|
|
767 |
|
|
$(DependencyFile) : $(DerivedSource) |
768 |
|
|
$(Print) $@ |
769 |
|
|
@cd $(PackageSourceDir) |
770 |
tim |
1510 |
|
771 |
|
|
ifneq "$(words $(CppFiles))" "0" |
772 |
tim |
1557 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
773 |
|
|
@cat Make.cpptemp >> $(DependencyFile) |
774 |
gezelter |
1535 |
$(Delete) Make.cpptemp |
775 |
tim |
1554 |
|
776 |
|
|
ifeq "$(UseMPI)" "yes" |
777 |
tim |
1557 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
778 |
|
|
@cat Make.cpptemp >> $(DependencyFile) |
779 |
tim |
1539 |
@$(Delete) Make.cpptemp |
780 |
tim |
1554 |
endif |
781 |
|
|
|
782 |
gezelter |
1508 |
endif |
783 |
tim |
1510 |
|
784 |
|
|
ifneq "$(words $(CFiles))" "0" |
785 |
tim |
1557 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
786 |
|
|
@cat Make.ctemp >> $(DependencyFile) |
787 |
gezelter |
1535 |
$(Delete) Make.ctemp |
788 |
tim |
1554 |
|
789 |
|
|
ifeq "$(UseMPI)" "yes" |
790 |
tim |
1557 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
791 |
|
|
@cat Make.ctemp >> $(DependencyFile) |
792 |
tim |
1539 |
@$(Delete) Make.ctemp |
793 |
tim |
1554 |
endif |
794 |
|
|
|
795 |
gezelter |
1508 |
endif |
796 |
tim |
1510 |
|
797 |
|
|
ifneq "$(words $(F90Files))" "0" |
798 |
tim |
1557 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
799 |
tim |
1554 |
@cat Make.ftemp >> $(DependencyFile) |
800 |
|
|
@$(Delete) Make.ftemp |
801 |
|
|
|
802 |
|
|
ifeq "$(UseMPI)" "yes" |
803 |
tim |
1557 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
804 |
tim |
1539 |
@cat Make.ftemp >> $(DependencyFile) |
805 |
|
|
@$(Delete) Make.ftemp |
806 |
tim |
1554 |
endif |
807 |
|
|
|
808 |
gezelter |
1508 |
endif |
809 |
|
|
|
810 |
|
|
# make lib |
811 |
|
|
lib : $(PackageListLoop) |
812 |
|
|
$(Print) Libraries built. |
813 |
|
|
|
814 |
|
|
_liball : $(JarFile) $(SharedLibrary) $(StaticLibrary) |
815 |
|
|
|
816 |
|
|
jar : $(JarFile) |
817 |
|
|
|
818 |
|
|
jarsign : $(JarFile) |
819 |
|
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
820 |
|
|
|
821 |
tim |
1544 |
#make install |
822 |
|
|
%.install : |
823 |
|
|
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
824 |
|
|
|
825 |
|
|
install : $(InstallListLoop) |
826 |
|
|
$(Print) Done Install |
827 |
|
|
|
828 |
gezelter |
2456 |
_installall : _buildall _installdata _installlinks |
829 |
tim |
1544 |
|
830 |
|
|
$(MyInstallDir) : |
831 |
|
|
$(MkDir) $@ |
832 |
|
|
|
833 |
|
|
_installdata : $(MyInstallDir) |
834 |
|
|
$(Print) $(InstallFiles) |
835 |
|
|
ifneq "$(words $(InstallFiles))" "0" |
836 |
gezelter |
2126 |
$(InstallCommand) $(InstallFiles) $(MyInstallDir) |
837 |
tim |
1544 |
endif |
838 |
gezelter |
1930 |
|
839 |
gezelter |
2456 |
_installlinks : $(MyInstallDir) |
840 |
tim |
2457 |
ifneq "$(words $(MyLinkTargets))" "0" |
841 |
gezelter |
2456 |
@cd $(MyInstallDir) |
842 |
tim |
2457 |
$(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink))) |
843 |
gezelter |
2456 |
endif |
844 |
|
|
|
845 |
gezelter |
1508 |
# make statistics |
846 |
|
|
_statisticsall : |
847 |
tim |
1530 |
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
848 |
gezelter |
1508 |
|
849 |
|
|
statistics : $(PackageListLoop) |
850 |
|
|
@$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions) |
851 |
|
|
@$(Delete) $(DEV_ROOT)/files.tmp |
852 |
|
|
$(Print) Done statistics. |
853 |
|
|
|
854 |
|
|
# make pure |
855 |
tim |
2444 |
#$(Executable).pure : |
856 |
|
|
# $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
857 |
|
|
# $(LibList) $(ObjectFiles) -o $@ |
858 |
|
|
# |
859 |
|
|
#pure : $(Executable).pure |
860 |
gezelter |
1508 |
|
861 |
tim |
1523 |
#make cvslog |
862 |
|
|
cvslog: |
863 |
gezelter |
2199 |
$(DEV_ROOT)/scripts/cvs2cl |
864 |
tim |
1523 |
|
865 |
gezelter |
1508 |
# Execute |
866 |
|
|
_runexe : |
867 |
|
|
$(Executable) $(RunParameters) |
868 |
|
|
|
869 |
|
|
_runjava : |
870 |
|
|
$(JavaExecute) $(JavaRunOptions) $(JavaMainClass) $(RunParameters) |
871 |
|
|
|
872 |
|
|
run : _runjava |
873 |
|
|
|
874 |
|
|
|
875 |
|
|
ifdef $(DependencyFile) |
876 |
|
|
-include $(DependencyFile) |
877 |
|
|
endif |