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