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 |
/usr/local/include \ |
76 |
/usr/local/mpich/include |
77 |
|
78 |
LibraryDirs = \ |
79 |
/usr/local/lib \ |
80 |
/usr/local/mpich/lib |
81 |
|
82 |
Libraries = \ |
83 |
-lsprng \ |
84 |
-lmpich |
85 |
|
86 |
LinkOptions = \ |
87 |
-L/usr/local/intel/compiler81/lib -L/usr/lib -lifport -lifcore -limf -lm -lcxa -lirc -lunwind -lirc_s |
88 |
|
89 |
OopseHome = /usr/local/oopse |
90 |
ForceParamDir = /usr/local/oopse/share/forceFields/ |
91 |
SampleSimDir = /usr/local/oopse/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 |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs))) |
225 |
LibList = $(LocalLibs:%=-l%) $(Libraries) |
226 |
ParallelLibList = $(LocalLibs:%=-l%) $(Libraries) |
227 |
|
228 |
|
229 |
#--------------------------------------------------------------------------- |
230 |
# |
231 |
# Tools & Options |
232 |
# |
233 |
#--------------------------------------------------------------------------- |
234 |
Print = @echo |
235 |
Move = mv |
236 |
Copy = cp |
237 |
CCompiler = icc |
238 |
CppCompiler = icpc |
239 |
Linker = icpc |
240 |
MakeDepend = makedepend |
241 |
Install = /usr/bin/install -c |
242 |
InstallProgram = ${INSTALL} |
243 |
InstallData = ${INSTALL} -m 644 |
244 |
MakeDir = /home/maul/gezelter/gezelter/OOPSE-2.0/ac-tools/shtool mkdir -p -f |
245 |
Delete = rm -fr |
246 |
StaticArchiver = ar |
247 |
DynamicArchiver = icc |
248 |
FortranCompiler = @FC@ |
249 |
F90Compiler = ifort |
250 |
JavaCompiler = $(JAVA_HOME)/bin/javac |
251 |
JavaArchiver = $(JAVA_HOME)/bin/jar |
252 |
JarSigner = $(JAVA_HOME)/bin/jarsigner |
253 |
JavadocGenerator = $(JAVA_HOME)/bin/javadoc |
254 |
JniCompiler = $(JAVA_HOME)/bin/javah |
255 |
RmiCompiler = $(JAVA_HOME)/bin/rmic |
256 |
JavaExecute = $(JAVA_HOME)/bin/java |
257 |
Purify = purify |
258 |
WordCount = wc |
259 |
List = cat |
260 |
Yacc = bison -y |
261 |
Lex = flex |
262 |
|
263 |
|
264 |
MakeOptions = -k |
265 |
MakeDependOptions = |
266 |
StaticArchiverOptions = rc |
267 |
DynamicArchiverOptions = -shared |
268 |
JavaArchiverOptions = |
269 |
JniOptions = |
270 |
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
271 |
-sourcepath $(SourceDir) |
272 |
COptions = $(FrcDeclare) |
273 |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
274 |
CppOptions = $(FrcDeclare) |
275 |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
276 |
FortranOptions = |
277 |
F90Options = -fpp1 -O -I$(SourceDir) -module $(TargetDir) |
278 |
F90ParallelOptions = -fpp1 -O -I$(SourceDir) -module $(TargetDir) $(ParallelDeclare) |
279 |
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
280 |
-sourcepath $(SourceDir) -deprecation |
281 |
JavaRunOptions = -classpath $(ClassPath) |
282 |
PurifyOptions = |
283 |
JavadocOptions = -d $(DocsDir) \ |
284 |
-sourcepath $(SourceDir) \ |
285 |
-classpath $(ClassPath) \ |
286 |
-author \ |
287 |
-package \ |
288 |
-use \ |
289 |
-splitIndex \ |
290 |
-version \ |
291 |
-link file:$(JAVA_HOME)/docs/api \ |
292 |
-windowtitle $(JavadocWindowTitle) \ |
293 |
-doctitle $(JavadocDocTitle) \ |
294 |
-header $(JavadocHeader) \ |
295 |
-bottom $(JavadocFooter) |
296 |
WordCountOptions = --lines |
297 |
|
298 |
Empty = |
299 |
Space = $(Empty) $(Empty) |
300 |
|
301 |
|
302 |
#--------------------------------------------------------------------------- |
303 |
# |
304 |
# Rules |
305 |
# |
306 |
#--------------------------------------------------------------------------- |
307 |
default : build |
308 |
|
309 |
%.loop : |
310 |
@$(MAKE) $(MakeOptions) -C $(subst .loop,,$@) _$(MAKECMDGOALS)all |
311 |
|
312 |
# Create target directory |
313 |
$(PackageTargetDir) : |
314 |
$(MakeDir) $@ |
315 |
|
316 |
# .c -> .o |
317 |
$(PackageTargetDir)/%.o : %.c |
318 |
$(Print) $@ |
319 |
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
320 |
|
321 |
%.o : %.c |
322 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
323 |
|
324 |
# .cpp -> .o |
325 |
$(PackageTargetDir)/%.o : %.cpp |
326 |
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
327 |
|
328 |
%.o : %.cpp |
329 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
330 |
|
331 |
# .f -> .o |
332 |
$(PackageTargetDir)/%.o : %.f |
333 |
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
334 |
|
335 |
%.o : %.f |
336 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
337 |
|
338 |
# .F90 -> .o |
339 |
$(PackageTargetDir)/%.o : %.F90 |
340 |
$(F90Compiler) $(F90Options) -c $< -o $@ |
341 |
|
342 |
%.o : %.F90 |
343 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
344 |
|
345 |
# .java -> .class |
346 |
$(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java |
347 |
$(JavaCompiler) $(JavaCompilerOptions) $< |
348 |
|
349 |
%.class : $(PackageSourceDir)/%.java |
350 |
@$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
351 |
|
352 |
# .class -> .h |
353 |
$(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class |
354 |
$(JniCompiler) $(JniOptions) $(JavaPackageName).$* |
355 |
|
356 |
%.h : %.class |
357 |
$(MAKE) $(MakeOptions) $(PackageSourceDir)/$@ |
358 |
|
359 |
#.y -> .h |
360 |
%.h : %.y |
361 |
$(Yacc) -d $? |
362 |
@$(Move) y.tab.h $*.h |
363 |
@$(Delete) y.tab.c |
364 |
|
365 |
#.y -> .c |
366 |
%.c : %.y |
367 |
$(Yacc) -d $? |
368 |
@$(Move) y.tab.c $*.c |
369 |
@$(Delete) y.tab.h |
370 |
|
371 |
# .l -> .c |
372 |
%.c : %.l |
373 |
$(Print) $@ |
374 |
$(Print) $(Lex) -o$@ $? |
375 |
@$(Lex) -o$@ $? |
376 |
|
377 |
# .o -> .a |
378 |
$(LibDir)/%.a : $(ObjectFiles) |
379 |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
380 |
|
381 |
%.a : $(ObjectFiles) |
382 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
383 |
|
384 |
$(LibDir)/%_MPI.a : $(ParallelObjectFiles) |
385 |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
386 |
|
387 |
%_MPI.a : $(ParallelObjectFiles) |
388 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
389 |
|
390 |
# .o -> .so |
391 |
$(LibDir)/%.so : $(ObjectFiles) |
392 |
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
393 |
|
394 |
%.so : $(ObjectFiles) |
395 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
396 |
|
397 |
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
398 |
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
399 |
|
400 |
%_MPI.so : $(ParallelObjectFiles) |
401 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
402 |
|
403 |
# .class -> .jar |
404 |
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
405 |
$(Print) $@ |
406 |
@cd $(TargetDir); $(JavaArchiver) -cf $@ \ |
407 |
$(JavaClassFilesRel) $(OtherTargetFiles) |
408 |
|
409 |
%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
410 |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
411 |
|
412 |
# .class -> JavaDoc |
413 |
javadoc : |
414 |
$(Print) $(JavaPackageNames) > $(DEV_ROOT)/packages.tmp |
415 |
$(JavadocGenerator) $(JavadocOptions) @$(DEV_ROOT)/packages.tmp |
416 |
$(Delete) $(DEV_ROOT)/packages.tmp |
417 |
$(Print) Done JavaDoc. |
418 |
|
419 |
# .class -> _Stub.class |
420 |
$(PackageTargetDir)/%_Stub.class : $(PackageTargetDir)/%.class |
421 |
$(Print) $@ |
422 |
$(RmiCompiler) $(RmiOptions) $(JavaPackageName).$* |
423 |
|
424 |
%_Stub.class : %.class |
425 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
426 |
|
427 |
# .class -> _Skel.class |
428 |
$(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)/%.class |
429 |
$(Print) $@ |
430 |
$(RmiCompiler) $(RmiOptions) $(JavaPackageName).$* |
431 |
|
432 |
%_Skel.class : %.class |
433 |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
434 |
|
435 |
# Executable |
436 |
$(Executable) : $(ObjectFiles) |
437 |
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@ |
438 |
|
439 |
$(ParallelExecutable) : $(ParallelObjectFiles) |
440 |
$(Linker) $(LinkOptions) $(LibDirs) $(ParallelLibList) $(ParallelObjectFiles) -o $@ |
441 |
|
442 |
# Anything else is just copied from source to target |
443 |
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
444 |
$(Print) $@ |
445 |
$(Copy) $< $@ |
446 |
|
447 |
# make (or make build) |
448 |
build : $(PackageListLoop) |
449 |
$(Print) Done build. |
450 |
|
451 |
_all : _buildall |
452 |
|
453 |
_buildall : \ |
454 |
$(DependencyFile) \ |
455 |
$(PackageTargetDir) \ |
456 |
$(ObjectFiles) \ |
457 |
$(JavaClassFiles) \ |
458 |
$(RmiStubFiles) \ |
459 |
$(RmiSkeletonFiles) \ |
460 |
$(OtherTargetFiles) \ |
461 |
$(SharedLibrary) \ |
462 |
$(StaticLibrary) \ |
463 |
$(JarFile) \ |
464 |
$(Executable) |
465 |
|
466 |
|
467 |
# make clean |
468 |
clean : $(PackageListLoop) |
469 |
$(Print) Done clean. |
470 |
|
471 |
_cleanall : |
472 |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
473 |
|
474 |
# make distclean |
475 |
distclean : $(PackageListLoop) |
476 |
$(Print) Done clean. |
477 |
|
478 |
_distcleanall : |
479 |
$(Delete) $(ObjectFiles) \ |
480 |
$(ParallelObjectFiles) \ |
481 |
$(JarFile) \ |
482 |
$(SharedLibrary) \ |
483 |
$(StaticLibrary) \ |
484 |
$(ParallelSharedLibrary) \ |
485 |
$(ParallelStaticLibrary) \ |
486 |
$(Executable) \ |
487 |
$(ParallelExecutable) \ |
488 |
$(DependencyFile) |
489 |
|
490 |
|
491 |
# make depend |
492 |
depend : $(PackageListLoop) |
493 |
$(Print) Done dependencies. |
494 |
|
495 |
_dependall : $(DependencyFile) |
496 |
|
497 |
$(DependencyFile) : $(DerivedSource) |
498 |
$(Print) $@ |
499 |
@cd $(PackageSourceDir) |
500 |
|
501 |
touch Make.ctemp |
502 |
touch Make.ctemp |
503 |
|
504 |
ifneq "$(words $(CppFiles))" "0" |
505 |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
506 |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
507 |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
508 |
endif |
509 |
|
510 |
ifneq "$(words $(CFiles))" "0" |
511 |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
512 |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
513 |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
514 |
|
515 |
endif |
516 |
|
517 |
ifneq "$(words $(F90Files))" "0" |
518 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__F90 *.F90 > Make.ftemp |
519 |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__F90 *.F90 >> Make.ftemp |
520 |
cat Make.ftemp >> $(DependencyFile) |
521 |
endif |
522 |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
523 |
|
524 |
# make lib |
525 |
lib : $(PackageListLoop) |
526 |
$(Print) Libraries built. |
527 |
|
528 |
_liball : $(JarFile) $(SharedLibrary) $(StaticLibrary) |
529 |
|
530 |
jar : $(JarFile) |
531 |
|
532 |
jarsign : $(JarFile) |
533 |
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
534 |
|
535 |
# make statistics |
536 |
_statisticsall : |
537 |
@$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp |
538 |
|
539 |
statistics : $(PackageListLoop) |
540 |
@$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions) |
541 |
@$(Delete) $(DEV_ROOT)/files.tmp |
542 |
$(Print) Done statistics. |
543 |
|
544 |
# make pure |
545 |
$(Executable).pure : |
546 |
$(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
547 |
$(LibList) $(ObjectFiles) -o $@ |
548 |
|
549 |
pure : $(Executable).pure |
550 |
|
551 |
# Execute |
552 |
_runexe : |
553 |
$(Executable) $(RunParameters) |
554 |
|
555 |
_runjava : |
556 |
$(JavaExecute) $(JavaRunOptions) $(JavaMainClass) $(RunParameters) |
557 |
|
558 |
run : _runjava |
559 |
|
560 |
|
561 |
ifdef $(DependencyFile) |
562 |
-include $(DependencyFile) |
563 |
endif |