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