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