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