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