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