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