1 |
#--------------------------------------------------------------------------- |
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 |
IS_UNIX=1 |
37 |
#packages to be made |
38 |
Packages = \ |
39 |
utils \ |
40 |
math \ |
41 |
types \ |
42 |
primitives \ |
43 |
visitors \ |
44 |
UseTheForce/DarkSide \ |
45 |
UseTheForce \ |
46 |
brains \ |
47 |
io \ |
48 |
integrators \ |
49 |
minimizers \ |
50 |
constraints \ |
51 |
profiling \ |
52 |
restraints \ |
53 |
applications/oopse \ |
54 |
applications/dump2Xyz \ |
55 |
applications/simpleBuilder \ |
56 |
|
57 |
#packages contain libraries |
58 |
PackageLibs = \ |
59 |
utils \ |
60 |
math \ |
61 |
types \ |
62 |
primitives \ |
63 |
visitors \ |
64 |
UseTheForce/DarkSide \ |
65 |
UseTheForce \ |
66 |
brains \ |
67 |
io \ |
68 |
integrators \ |
69 |
minimizers \ |
70 |
constraints \ |
71 |
profiling \ |
72 |
restraints \ |
73 |
|
74 |
IncludeDirs = \ |
75 |
@SPRNG_INC_DIR@ \ |
76 |
@MPI_INC_DIR@ |
77 |
|
78 |
LibraryDirs = \ |
79 |
@SPRNG_LIB_DIR@ \ |
80 |
@MPI_LIB_DIR@ |
81 |
|
82 |
Libraries = \ |
83 |
@SPRNG_LIB@ \ |
84 |
@MPI_LIB@ |
85 |
|
86 |
LinkOptions = \ |
87 |
@F90LIBS@ |
88 |
|
89 |
OopseHome = @OOPSE_HOME@ |
90 |
ForceParamDir = @OOPSE_HOME@/share/forceFields/ |
91 |
SampleSimDir = @OOPSE_HOME@/share/samples/ |
92 |
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
93 |
ParallelDeclare = -DIS_MPI |
94 |
|
95 |
|
96 |
#--------------------------------------------------------------------------- |
97 |
# |
98 |
# Directories |
99 |
# |
100 |
#--------------------------------------------------------------------------- |
101 |
|
102 |
SourceDir = $(DEV_ROOT)/src |
103 |
TargetDir = $(DEV_ROOT)/obj |
104 |
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
105 |
LibDir = $(DEV_ROOT)/lib |
106 |
MakeDir = $(DEV_ROOT)/make |
107 |
BinDir = $(DEV_ROOT)/bin |
108 |
DocsDir = $(DEV_ROOT)/docs |
109 |
CurrentDir = $(CURDIR) |
110 |
|
111 |
ifdef Source |
112 |
#get the relative path of current package to source directory |
113 |
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
114 |
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
115 |
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
116 |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
117 |
|
118 |
PackageList = $(Package) |
119 |
PackageSourceDir = $(SourceDir)/$(Package) |
120 |
PackageTargetDir = $(TargetDir) |
121 |
PackageParallelTargetDir = $(ParallelTargetDir) |
122 |
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
123 |
else |
124 |
PackageList = $(Packages) $(JavaPackages) |
125 |
endif |
126 |
|
127 |
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
128 |
|
129 |
JRE = $(JAVA_HOME)/jre/lib/rt.jar |
130 |
|
131 |
ifdef IS_UNIX |
132 |
X = : |
133 |
else |
134 |
X = \; |
135 |
endif |
136 |
|
137 |
#--------------------------------------------------------------------------- |
138 |
# |
139 |
# Classification of files |
140 |
# |
141 |
#--------------------------------------------------------------------------- |
142 |
|
143 |
# Source |
144 |
JavaFiles = $(filter %.java, $(Source)) |
145 |
CppFiles = $(filter %.cpp, $(Source)) |
146 |
CFiles = $(filter %.c, $(Source)) |
147 |
FortranFiles = $(filter %.f, $(Source)) |
148 |
F90Files = $(filter %.F90, $(Source)) |
149 |
CorbaFiles = $(filter %.idl, $(Source)) |
150 |
LexFiles = $(filter %.l, $(Source)) |
151 |
YaccFiles = $(filter %.y, $(Source)) |
152 |
OtherSourceFiles = $(filter-out $(JavaFiles) $(CppFiles) $(CFiles) \ |
153 |
$(FortranFiles) $(F90Files) $(LexFiles) \ |
154 |
$(YaccFiles) $(CorbaFiles), \ |
155 |
$(Source)) |
156 |
ManifestFile = $(PackageSourceDir)/Manifest |
157 |
|
158 |
SourceFiles = $(JavaFiles)\ |
159 |
$(CppFiles)\ |
160 |
$(CFiles)\ |
161 |
$(FortranFiles)\ |
162 |
$(F90Files)\ |
163 |
$(LexFiles)\ |
164 |
$(YaccFiles) |
165 |
|
166 |
# Target |
167 |
JavaClassFiles = $(JavaFiles:%.java= $(PackageTargetDir)/%.class) |
168 |
JavaClassFilesRel = $(JavaFiles:%.java= $(Package)/%.class) |
169 |
RmiStubFiles = $(RmiSource:%.java= $(PackageTargetDir)/%_Stub.class) |
170 |
RmiSkeletonFiles = $(RmiSource:%.java= $(PackageTargetDir)/%_Skel.class) |
171 |
JniClassFiles = $(JniSource:%.java= $(PackageTargetDir)/%.class) |
172 |
JniHeaders = $(JniSource:%.java= $(PackageSourceDir)/%.h) |
173 |
ObjectFiles = $(CFiles:%.c= $(PackageTargetDir)/%.o)\ |
174 |
$(CppFiles:%.cpp= $(PackageTargetDir)/%.o)\ |
175 |
$(FortranFiles:%.f= $(PackageTargetDir)/%.o)\ |
176 |
$(F90Files:%.F90= $(PackageTargetDir)/%.o)\ |
177 |
$(LexFiles:%.l= $(PackageTargetDir)/%.o)\ |
178 |
$(YaccFiles:%.y= $(PackageTargetDir)/%.o) |
179 |
ParallelObjectFiles = $(CFiles:%.c= $(PackageParallelTargetDir)/%.o)\ |
180 |
$(CppFiles:%.cpp= $(PackageParallelTargetDir)/%.o)\ |
181 |
$(FortranFiles:%.f= $(PackageParallelTargetDir)/%.o)\ |
182 |
$(F90Files:%.F90= $(PackageParallelTargetDir)/%.o)\ |
183 |
$(LexFiles:%.l= $(PackageParallelTargetDir)/%.o)\ |
184 |
$(YaccFiles:%.y= $(PackageParallelTargetDir)/%.o) |
185 |
|
186 |
DerivedSource = $(YaccFiles:%.y= %.h) \ |
187 |
$(YaccFiles:%.y= %.c) \ |
188 |
$(LexFiles:%.l= %.c) |
189 |
|
190 |
DerivedCFiles = $(YaccFiles:%.y= %.c) \ |
191 |
$(LexFiles:%.l= %.c) |
192 |
|
193 |
OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) |
194 |
|
195 |
ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries)) |
196 |
ThirdPartyJars = $(subst $(Space),$(X),$(ThirdPartyJarsTmp)) |
197 |
|
198 |
ifneq "$(words $(JavaFiles))" "0" |
199 |
JavaPackageName = $(subst /,.,$(Package)) |
200 |
JarFile = $(LibDir)/$(subst /,,$(Package)).jar |
201 |
endif |
202 |
|
203 |
#if Main is defined, do not build library. It may not be true sometimes |
204 |
ifneq "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0" |
205 |
DependencyFile = $(PackageSourceDir)/Makedepend |
206 |
ifneq "$(Main)" "" |
207 |
Executable = $(BinDir)/$(Main) |
208 |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
209 |
else |
210 |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
211 |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
212 |
ParallelSharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so |
213 |
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
214 |
endif |
215 |
endif |
216 |
# |
217 |
# Misc |
218 |
# |
219 |
ClassPath = $(JRE)$(X)$(TargetDir)$(X)$(ThirdPartyJars) |
220 |
JavaPackageNames = $(subst /,.,$(JavaPackages)) |
221 |
IncludePath = -I$(SourceDir) $(IncludeDirs:%=-I%) |
222 |
LibDirs = -L$(LibDir) $(LibraryDirs:%=-L%) |
223 |
LocalLibs = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
224 |
LibList = $(LocalLibs:%=-l%) $(Libraries) |
225 |
|
226 |
|
227 |
#--------------------------------------------------------------------------- |
228 |
# |
229 |
# Tools & Options |
230 |
# |
231 |
#--------------------------------------------------------------------------- |
232 |
Print = @echo |
233 |
Move = mv |
234 |
Copy = cp |
235 |
CCompiler = @CC@ |
236 |
CppCompiler = @CXX@ |
237 |
Linker = @CXX@ |
238 |
MakeDepend = makedepend |
239 |
Install = @INSTALL@ |
240 |
InstallProgram = @INSTALL_PROGRAM@ |
241 |
InstallData = @INSTALL_DATA@ |
242 |
MakeDir = @MKINSTALLDIRS@ |
243 |
Delete = rm -fr |
244 |
StaticArchiver = @AR@ |
245 |
DynamicArchiver = @CC@ |
246 |
FortranCompiler = @FC@ |
247 |
F90Compiler = @F90@ |
248 |
JavaCompiler = $(JAVA_HOME)/bin/javac |
249 |
JavaArchiver = $(JAVA_HOME)/bin/jar |
250 |
JarSigner = $(JAVA_HOME)/bin/jarsigner |
251 |
JavadocGenerator = $(JAVA_HOME)/bin/javadoc |
252 |
JniCompiler = $(JAVA_HOME)/bin/javah |
253 |
RmiCompiler = $(JAVA_HOME)/bin/rmic |
254 |
JavaExecute = $(JAVA_HOME)/bin/java |
255 |
Purify = purify |
256 |
WordCount = wc |
257 |
List = cat |
258 |
Yacc = @YACC@ |
259 |
Lex = @LEX@ |
260 |
|
261 |
|
262 |
MakeOptions = -k |
263 |
MakeDependOptions = |
264 |
StaticArchiverOptions = rc |
265 |
DynamicArchiverOptions = -shared |
266 |
JavaArchiverOptions = |
267 |
JniOptions = |
268 |
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
269 |
-sourcepath $(SourceDir) |
270 |
COptions = $(FrcDeclare) |
271 |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
272 |
CppOptions = $(FrcDeclare) |
273 |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
274 |
FortranOptions = |
275 |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
276 |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
277 |
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
278 |
-sourcepath $(SourceDir) -deprecation |
279 |
JavaRunOptions = -classpath $(ClassPath) |
280 |
PurifyOptions = |
281 |
JavadocOptions = -d $(DocsDir) \ |
282 |
-sourcepath $(SourceDir) \ |
283 |
-classpath $(ClassPath) \ |
284 |
-author \ |
285 |
-package \ |
286 |
-use \ |
287 |
-splitIndex \ |
288 |
-version \ |
289 |
-link file:$(JAVA_HOME)/docs/api \ |
290 |
-windowtitle $(JavadocWindowTitle) \ |
291 |
-doctitle $(JavadocDocTitle) \ |
292 |
-header $(JavadocHeader) \ |
293 |
-bottom $(JavadocFooter) |
294 |
WordCountOptions = --lines |
295 |
|
296 |
Empty = |
297 |
Space = $(Empty) $(Empty) |
298 |
|
299 |
|
300 |
#--------------------------------------------------------------------------- |
301 |
# |
302 |
# Rules |
303 |
# |
304 |
#--------------------------------------------------------------------------- |
305 |
default : build |
306 |
|
307 |
%.loop : |
308 |
@$(MAKE) $(MakeOptions) -C $(subst .loop,,$@) _$(MAKECMDGOALS)all |
309 |
|
310 |
# Create target directory |
311 |
$(PackageTargetDir) : |
312 |
$(MakeDir) $@ |
313 |
|
314 |
# .c -> .o |
315 |
$(PackageTargetDir)/%.o : %.c |
316 |
$(Print) $@ |
317 |
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
318 |
|
319 |
%.o : %.c |
320 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
321 |
|
322 |
# .cpp -> .o |
323 |
$(PackageTargetDir)/%.o : %.cpp |
324 |
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
325 |
|
326 |
%.o : %.cpp |
327 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
328 |
|
329 |
# .f -> .o |
330 |
$(PackageTargetDir)/%.o : %.f |
331 |
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
332 |
|
333 |
%.o : %.f |
334 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
335 |
|
336 |
# .F90 -> .o |
337 |
$(PackageTargetDir)/%.o : %.F90 |
338 |
$(F90Compiler) $(F90Options) -c $< -o $@ |
339 |
|
340 |
%.o : %.F90 |
341 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
342 |
|
343 |
# .java -> .class |
344 |
$(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java |
345 |
$(JavaCompiler) $(JavaCompilerOptions) $< |
346 |
|
347 |
%.class : $(PackageSourceDir)/%.java |
348 |
@$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
349 |
|
350 |
# .class -> .h |
351 |
$(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class |
352 |
$(JniCompiler) $(JniOptions) $(JavaPackageName).$* |
353 |
|
354 |
%.h : %.class |
355 |
$(MAKE) $(MakeOptions) $(PackageSourceDir)/$@ |
356 |
|
357 |
#.y -> .h |
358 |
%.h : %.y |
359 |
$(Yacc) -d $? |
360 |
@$(Move) y.tab.h $*.h |
361 |
@$(Delete) y.tab.c |
362 |
|
363 |
#.y -> .c |
364 |
%.c : %.y |
365 |
$(Yacc) -d $? |
366 |
@$(Move) y.tab.c $*.c |
367 |
@$(Delete) y.tab.h |
368 |
|
369 |
# .l -> .c |
370 |
%.c : %.l |
371 |
$(Print) $@ |
372 |
$(Print) $(Lex) -o$@ $? |
373 |
@$(Lex) -o$@ $? |
374 |
|
375 |
# .o -> .a |
376 |
$(LibDir)/%.a : $(ObjectFiles) |
377 |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
378 |
|
379 |
%.a : $(ObjectFiles) |
380 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
381 |
|
382 |
$(LibDir)/%_MPI.a : $(ParallelObjectFiles) |
383 |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
384 |
|
385 |
%_MPI.a : $(ParallelObjectFiles) |
386 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
387 |
|
388 |
# .o -> .so |
389 |
$(LibDir)/%.so : $(ObjectFiles) |
390 |
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
391 |
|
392 |
%.so : $(ObjectFiles) |
393 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
394 |
|
395 |
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
396 |
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
397 |
|
398 |
%_MPI.so : $(ParallelObjectFiles) |
399 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
400 |
|
401 |
# .class -> .jar |
402 |
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
403 |
$(Print) $@ |
404 |
@cd $(TargetDir); $(JavaArchiver) -cf $@ \ |
405 |
$(JavaClassFilesRel) $(OtherTargetFiles) |
406 |
|
407 |
%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
408 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
409 |
|
410 |
# .class -> JavaDoc |
411 |
javadoc : |
412 |
$(Print) $(JavaPackageNames) > $(DEV_ROOT)/packages.tmp |
413 |
$(JavadocGenerator) $(JavadocOptions) @$(DEV_ROOT)/packages.tmp |
414 |
$(Delete) $(DEV_ROOT)/packages.tmp |
415 |
$(Print) Done JavaDoc. |
416 |
|
417 |
# .class -> _Stub.class |
418 |
$(PackageTargetDir)/%_Stub.class : $(PackageTargetDir)/%.class |
419 |
$(Print) $@ |
420 |
$(RmiCompiler) $(RmiOptions) $(JavaPackageName).$* |
421 |
|
422 |
%_Stub.class : %.class |
423 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
424 |
|
425 |
# .class -> _Skel.class |
426 |
$(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)/%.class |
427 |
$(Print) $@ |
428 |
$(RmiCompiler) $(RmiOptions) $(JavaPackageName).$* |
429 |
|
430 |
%_Skel.class : %.class |
431 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
432 |
|
433 |
# Executable |
434 |
$(Executable) : $(ObjectFiles) |
435 |
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@ |
436 |
|
437 |
$(ParallelExecutable) : $(ParallelObjectFiles) |
438 |
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@ |
439 |
|
440 |
# Anything else is just copied from source to target |
441 |
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
442 |
$(Print) $@ |
443 |
$(Copy) $< $@ |
444 |
|
445 |
# make (or make build) |
446 |
build : $(PackageListLoop) |
447 |
$(Print) Done build. |
448 |
|
449 |
_all : _buildall |
450 |
|
451 |
_buildall : \ |
452 |
$(DependencyFile) \ |
453 |
$(PackageTargetDir) \ |
454 |
$(ObjectFiles) \ |
455 |
$(JavaClassFiles) \ |
456 |
$(RmiStubFiles) \ |
457 |
$(RmiSkeletonFiles) \ |
458 |
$(OtherTargetFiles) \ |
459 |
$(SharedLibrary) \ |
460 |
$(StaticLibrary) \ |
461 |
$(JarFile) \ |
462 |
$(Executable) |
463 |
|
464 |
|
465 |
# make clean |
466 |
clean : $(PackageListLoop) |
467 |
$(Print) Done clean. |
468 |
|
469 |
_cleanall : |
470 |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
471 |
|
472 |
# make distclean |
473 |
distclean : $(PackageListLoop) |
474 |
$(Print) Done clean. |
475 |
|
476 |
_distcleanall : |
477 |
$(Delete) $(ObjectFiles) \ |
478 |
$(ParallelObjectFiles) \ |
479 |
$(JarFile) \ |
480 |
$(SharedLibrary) \ |
481 |
$(StaticLibrary) \ |
482 |
$(ParallelSharedLibrary) \ |
483 |
$(ParallelStaticLibrary) \ |
484 |
$(Executable) \ |
485 |
$(ParallelExecutable) \ |
486 |
$(DependencyFile) |
487 |
|
488 |
|
489 |
# make depend |
490 |
depend : $(PackageListLoop) |
491 |
$(Print) Done dependencies. |
492 |
|
493 |
_dependall : $(DependencyFile) |
494 |
|
495 |
$(DependencyFile) : $(DerivedSource) |
496 |
$(Print) $@ |
497 |
@cd $(PackageSourceDir) |
498 |
|
499 |
touch Make.ctemp |
500 |
touch Make.ctemp |
501 |
|
502 |
ifneq "$(words $(CppFiles))" "0" |
503 |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
504 |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
505 |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
506 |
endif |
507 |
|
508 |
ifneq "$(words $(CFiles))" "0" |
509 |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
510 |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
511 |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
512 |
|
513 |
endif |
514 |
|
515 |
ifneq "$(words $(F90Files))" "0" |
516 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__F90 *.F90 > Make.ftemp |
517 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__F90 *.F90 >> Make.ftemp |
518 |
cat Make.ftemp >> $(DependencyFile) |
519 |
endif |
520 |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
521 |
|
522 |
# make lib |
523 |
lib : $(PackageListLoop) |
524 |
$(Print) Libraries built. |
525 |
|
526 |
_liball : $(JarFile) $(SharedLibrary) $(StaticLibrary) |
527 |
|
528 |
jar : $(JarFile) |
529 |
|
530 |
jarsign : $(JarFile) |
531 |
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
532 |
|
533 |
# make statistics |
534 |
_statisticsall : |
535 |
@$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp |
536 |
|
537 |
statistics : $(PackageListLoop) |
538 |
@$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions) |
539 |
@$(Delete) $(DEV_ROOT)/files.tmp |
540 |
$(Print) Done statistics. |
541 |
|
542 |
# make pure |
543 |
$(Executable).pure : |
544 |
$(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
545 |
$(LibList) $(ObjectFiles) -o $@ |
546 |
|
547 |
pure : $(Executable).pure |
548 |
|
549 |
# Execute |
550 |
_runexe : |
551 |
$(Executable) $(RunParameters) |
552 |
|
553 |
_runjava : |
554 |
$(JavaExecute) $(JavaRunOptions) $(JavaMainClass) $(RunParameters) |
555 |
|
556 |
run : _runjava |
557 |
|
558 |
|
559 |
ifdef $(DependencyFile) |
560 |
-include $(DependencyFile) |
561 |
endif |