34 |
|
# |
35 |
|
#--------------------------------------------------------------------------- |
36 |
|
IS_UNIX=1 |
37 |
< |
#packages to be made |
38 |
< |
Packages = \ |
37 |
> |
|
38 |
> |
#packages containing libraries |
39 |
> |
PackageLibs = \ |
40 |
|
utils \ |
41 |
+ |
visitors \ |
42 |
|
math \ |
43 |
|
types \ |
44 |
|
primitives \ |
43 |
– |
visitors \ |
45 |
|
UseTheForce/DarkSide \ |
46 |
|
UseTheForce \ |
47 |
|
brains \ |
48 |
|
io \ |
49 |
< |
integrators \ |
50 |
< |
minimizers \ |
51 |
< |
constraints \ |
52 |
< |
profiling \ |
52 |
< |
restraints \ |
49 |
> |
integrators\ |
50 |
> |
|
51 |
> |
#packages containing applications |
52 |
> |
Applications = \ |
53 |
|
applications/oopse \ |
54 |
|
applications/dump2Xyz \ |
55 |
< |
applications/simpleBuilder \ |
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 \ |
57 |
> |
Samples = \ |
58 |
> |
samples/argon \ |
59 |
> |
samples/water/dimer \ |
60 |
> |
samples/water/spce \ |
61 |
> |
samples/water/ssd \ |
62 |
> |
samples/water/ssde \ |
63 |
> |
samples/water/tip3p_ice \ |
64 |
> |
samples/water/tip4p \ |
65 |
> |
samples/lipid \ |
66 |
> |
samples/alkane \ |
67 |
> |
samples/minimizer \ |
68 |
> |
samples/metals \ |
69 |
> |
samples/zcons \ |
70 |
|
|
71 |
|
IncludeDirs = \ |
72 |
|
@SPRNG_INC_DIR@ \ |
82 |
|
@MPI_F90_LIB@ |
83 |
|
|
84 |
|
OopseHome = @OOPSE_HOME@ |
85 |
< |
ForceParamDir = @OOPSE_HOME@/share/forceFields/ |
86 |
< |
SampleSimDir = @OOPSE_HOME@/share/samples/ |
85 |
> |
ForceParamDir = $(OopseHome)/share/forceFields |
86 |
> |
SampleSimDir = $(OopseHome)/share/samples |
87 |
> |
InstallBinDir = $(OopseHome)/bin |
88 |
> |
DocDir = $(OopseHome)/doc |
89 |
|
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
90 |
+ |
F90Declare = -D__FORTRAN90 |
91 |
|
ParallelDeclare = -DIS_MPI |
92 |
|
UseMPI = @USE_MPI@ |
93 |
+ |
ModuleCase = @F90_MODULE_NAMES@ |
94 |
+ |
ModSuffix = @MOD@ |
95 |
+ |
LinkOptions = \ |
96 |
+ |
@F90LIBS@ |
97 |
|
|
98 |
+ |
ParallelLinkOptions = \ |
99 |
+ |
@F90LIBS@ |
100 |
+ |
|
101 |
+ |
|
102 |
|
#--------------------------------------------------------------------------- |
103 |
|
# |
104 |
|
# Directories |
109 |
|
TargetDir = $(DEV_ROOT)/obj |
110 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
111 |
|
LibDir = $(DEV_ROOT)/lib |
104 |
– |
ParallelLibDir = $(DEV_ROOT)/MPIlib |
112 |
|
MakeDir = $(DEV_ROOT)/make |
113 |
|
BinDir = $(DEV_ROOT)/bin |
114 |
|
DocsDir = $(DEV_ROOT)/docs |
115 |
|
CurrentDir = $(CURDIR) |
116 |
< |
RPath = $(shell cd $(DEV_ROOT); pwd)/lib:$(OopseHome)/lib |
117 |
< |
ParallelRPath = $(shell cd $(DEV_ROOT); pwd)/MPIlib:$(OopseHome)/MPIlib |
111 |
< |
LinkOptions = \ |
112 |
< |
@F90LIBS@ \ |
113 |
< |
-Wl,-R$(RPath) |
116 |
> |
CombinedStaticLib = $(LibDir)/libOOPSE.a |
117 |
> |
CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a |
118 |
|
|
115 |
– |
ParallelLinkOptions = \ |
116 |
– |
@F90LIBS@ \ |
117 |
– |
-Wl,-R$(ParallelRPath) |
118 |
– |
|
119 |
|
ifdef Source |
120 |
|
#get the relative path of current package to source directory |
121 |
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
129 |
|
PackageParallelTargetDir = $(ParallelTargetDir) |
130 |
|
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
131 |
|
else |
132 |
< |
PackageList = $(Packages) $(JavaPackages) |
132 |
> |
PackageList = $(PackageLibs) $(JavaPackages) $(Applications) |
133 |
|
endif |
134 |
|
|
135 |
|
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
215 |
|
Executable = $(BinDir)/$(Main) |
216 |
|
ParallelExecutable = $(BinDir)/$(Main)_MPI |
217 |
|
else |
218 |
< |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
219 |
< |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
220 |
< |
ParallelSharedLibrary = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
221 |
< |
ParallelStaticLibrary = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
218 |
> |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
219 |
> |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
220 |
> |
ParallelSharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so |
221 |
> |
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
222 |
|
endif |
223 |
|
endif |
224 |
+ |
|
225 |
|
# |
226 |
|
# Misc |
227 |
|
# |
229 |
|
JavaPackageNames = $(subst /,.,$(JavaPackages)) |
230 |
|
IncludePath = -I$(SourceDir) $(IncludeDirs:%=-I%) |
231 |
|
LibDirs = -L$(LibDir) $(LibraryDirs:%=-L%) |
232 |
< |
ParallelLibDirs = -L$(ParallelLibDir) $(LibraryDirs:%=-L%) |
233 |
< |
LocalLibs = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
233 |
< |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
232 |
> |
LocalLibs = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs))) |
233 |
> |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs))) |
234 |
|
LibList = $(LocalLibs:%=-l%) $(Libraries) |
235 |
+ |
LibNames = $(LocalLibs:%=$(LibDir)/lib%.a) |
236 |
|
ParallelLibList = $(ParallelLocalLibs:%=-l%) $(Libraries) |
237 |
+ |
ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a) |
238 |
|
|
239 |
|
|
240 |
|
#--------------------------------------------------------------------------- |
243 |
|
# |
244 |
|
#--------------------------------------------------------------------------- |
245 |
|
Print = @echo |
246 |
< |
Move = mv |
246 |
> |
Move = mv -f |
247 |
|
Copy = cp |
248 |
|
CCompiler = @CC@ |
249 |
|
CppCompiler = @CXX@ |
250 |
|
Linker = @CXX@ |
251 |
|
MakeDepend = makedepend |
252 |
< |
Install = @INSTALL@ |
252 |
> |
INSTALL = @INSTALL@ |
253 |
|
InstallProgram = @INSTALL_PROGRAM@ |
254 |
|
InstallData = @INSTALL_DATA@ |
255 |
< |
MakeDir = @MKINSTALLDIRS@ |
255 |
> |
MkDir = @MKINSTALLDIRS@ |
256 |
|
Delete = rm -fr |
257 |
|
StaticArchiver = @AR@ |
258 |
|
DynamicArchiver = @CC@ |
270 |
|
List = cat |
271 |
|
Yacc = @YACC@ |
272 |
|
Lex = @LEX@ |
273 |
+ |
Ranlib = @RANLIB@ |
274 |
+ |
Doxygen = @DOXYGEN@ |
275 |
|
|
272 |
– |
|
276 |
|
MakeOptions = -k |
277 |
|
MakeDependOptions = |
278 |
|
StaticArchiverOptions = rc |
281 |
|
JniOptions = |
282 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
283 |
|
-sourcepath $(SourceDir) |
284 |
< |
COptions = $(FrcDeclare) |
285 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
286 |
< |
CppOptions = $(FrcDeclare) |
287 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
284 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
285 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
286 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
287 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
288 |
|
FortranOptions = |
289 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
290 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
289 |
> |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
290 |
> |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
291 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
292 |
|
-sourcepath $(SourceDir) -deprecation |
293 |
|
JavaRunOptions = -classpath $(ClassPath) |
309 |
|
|
310 |
|
Empty = |
311 |
|
Space = $(Empty) $(Empty) |
312 |
+ |
|
313 |
+ |
|
314 |
+ |
#--------------------------------------------------------------------------- |
315 |
+ |
# |
316 |
+ |
# Install |
317 |
+ |
# |
318 |
+ |
#--------------------------------------------------------------------------- |
319 |
+ |
|
320 |
+ |
ifneq "$(words $(SampleFiles))" "0" |
321 |
+ |
MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) |
322 |
+ |
MyInstallDir = $(SampleSimDir)/$(MySample) |
323 |
+ |
InstallFiles = $(SampleFiles) |
324 |
+ |
InstallCommand = $(InstallData) |
325 |
+ |
endif |
326 |
+ |
|
327 |
+ |
ifneq "$(words $(Main))" "0" |
328 |
+ |
MyInstallDir = $(InstallBinDir) |
329 |
+ |
ifeq "$(UseMPI)" "yes" |
330 |
+ |
InstallFiles = $(Executable) $(ParallelExecutable) |
331 |
+ |
else |
332 |
+ |
InstallFiles = $(Executable) |
333 |
+ |
endif |
334 |
+ |
InstallCommand = $(InstallProgram) |
335 |
+ |
endif |
336 |
+ |
|
337 |
+ |
ifneq "$(words $(ForcefieldFiles))" "0" |
338 |
+ |
MyInstallDir = $(ForceParamDir) |
339 |
+ |
InstallFiles = $(ForcefieldFiles) |
340 |
+ |
InstallCommand = $(InstallData) |
341 |
+ |
endif |
342 |
+ |
|
343 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
344 |
+ |
InstallList = |
345 |
+ |
else |
346 |
+ |
InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) |
347 |
+ |
endif |
348 |
+ |
|
349 |
+ |
InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) |
350 |
|
|
351 |
|
|
352 |
+ |
|
353 |
|
#--------------------------------------------------------------------------- |
354 |
|
# |
355 |
|
# Rules |
417 |
|
# .F90 -> .o |
418 |
|
$(PackageTargetDir)/%.o : %.F90 |
419 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
420 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then \ |
421 |
+ |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
422 |
+ |
fi |
423 |
|
|
424 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
425 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
426 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then \ |
427 |
+ |
$(Move) "`ls *.$(ModSuffix)`" (PackageParallelTargetDir);\ |
428 |
+ |
fi |
429 |
|
|
430 |
|
ifeq "$(UseMPI)" "yes" |
431 |
|
%.o : %.F90 |
432 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
433 |
+ |
if test -f *.$(ModSuffix); then \ |
434 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
435 |
+ |
fi |
436 |
+ |
|
437 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
438 |
+ |
if test -f *.$(ModSuffix); then \ |
439 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
440 |
+ |
fi |
441 |
+ |
|
442 |
|
else |
443 |
|
%.o : %.F90 |
444 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
445 |
+ |
if test -f *.$(ModSuffix); then \ |
446 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
447 |
+ |
fi |
448 |
+ |
|
449 |
|
endif |
450 |
|
|
451 |
|
|
483 |
|
|
484 |
|
# .o -> .a |
485 |
|
|
486 |
< |
$(LibDir)/%.a : $(ObjectFiles) |
486 |
> |
$(LibDir)/%_UP.a : $(ObjectFiles) |
487 |
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
488 |
+ |
@touch $(LibDir)/.stamp_UP |
489 |
|
|
490 |
< |
$(ParallelLibDir)/%.a: $(ParallelObjectFiles) |
490 |
> |
$(LibDir)/%_MPI.a: $(ParallelObjectFiles) |
491 |
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
492 |
+ |
@touch $(LibDir)/.stamp_MPI |
493 |
|
|
494 |
< |
ifeq "$(UseMPI)" "yes" |
433 |
< |
%.a : $(ObjectFiles) $(ParallelObjectFiles) |
494 |
> |
%_UP.a : $(ObjectFiles) |
495 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
496 |
< |
$(MAKE) $(MakeOptions) $(ParallelLibDir)/$@ |
497 |
< |
else |
437 |
< |
%.a : $(ObjectFiles) |
496 |
> |
|
497 |
> |
%_MPI.a : $(ParallelObjectFiles) |
498 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
439 |
– |
endif |
499 |
|
|
500 |
|
# .o -> .so |
501 |
< |
$(LibDir)/%.so : $(ObjectFiles) |
501 |
> |
$(LibDir)/%_UP.so : $(ObjectFiles) |
502 |
|
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
503 |
|
|
504 |
< |
$(ParallelLibDir)/%.so : $(ParallelObjectFiles) |
504 |
> |
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
505 |
|
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
506 |
|
|
507 |
< |
ifeq "$(UseMPI)" "yes" |
449 |
< |
%.so : $(ObjectFiles) $(ParallelObjectFiles) |
507 |
> |
%_UP.so : $(ObjectFiles) |
508 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
509 |
< |
$(MAKE) $(MakeOptions) $(ParallelLibDir)/$@ |
510 |
< |
else |
453 |
< |
%.so : $(ObjectFiles) |
509 |
> |
|
510 |
> |
%_MPI.so : $(ParallelObjectFiles) |
511 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
455 |
– |
endif |
512 |
|
|
513 |
|
# .class -> .jar |
514 |
|
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
542 |
|
%_Skel.class : %.class |
543 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
544 |
|
|
545 |
+ |
document : |
546 |
+ |
$(Print) Generate Documentation for OOPSE-2.0 |
547 |
+ |
@cd $(DEV_ROOT)/src |
548 |
+ |
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
549 |
+ |
|
550 |
+ |
#GUN make funtions to merge the libraries |
551 |
+ |
find_objs = $(shell $(StaticArchiver) -t $(1)) |
552 |
+ |
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
553 |
+ |
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
554 |
+ |
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
555 |
+ |
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
556 |
+ |
|
557 |
+ |
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
558 |
+ |
$(Print) create $@ |
559 |
+ |
$(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@)) |
560 |
+ |
$(Ranlib) $(CombinedStaticLib) |
561 |
+ |
|
562 |
+ |
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
563 |
+ |
$(Print) create $@ |
564 |
+ |
$(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@)) |
565 |
+ |
$(Ranlib) $(CombinedParallelStaticLib) |
566 |
+ |
|
567 |
|
# Executable |
568 |
< |
$(Executable) : $(ObjectFiles) |
569 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(LibList) -o $@ |
568 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
569 |
> |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
570 |
|
|
571 |
< |
$(ParallelExecutable) : $(ParallelObjectFiles) |
572 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(ParallelLibDirs) $(LibList) -o $@ |
571 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
572 |
> |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
573 |
|
|
574 |
|
# Anything else is just copied from source to target |
575 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
582 |
|
|
583 |
|
_all : _buildall |
584 |
|
|
585 |
+ |
_buildall : |
586 |
|
ifeq "$(UseMPI)" "yes" |
587 |
|
_buildall : \ |
588 |
|
$(DependencyFile) \ |
593 |
|
$(RmiStubFiles) \ |
594 |
|
$(RmiSkeletonFiles) \ |
595 |
|
$(OtherTargetFiles) \ |
517 |
– |
$(SharedLibrary) \ |
596 |
|
$(StaticLibrary) \ |
519 |
– |
$(ParallelSharedLibrary) \ |
597 |
|
$(ParallelStaticLibrary) \ |
598 |
|
$(JarFile) \ |
599 |
|
$(Executable) \ |
607 |
|
$(RmiStubFiles) \ |
608 |
|
$(RmiSkeletonFiles) \ |
609 |
|
$(OtherTargetFiles) \ |
533 |
– |
$(SharedLibrary) \ |
610 |
|
$(StaticLibrary) \ |
611 |
|
$(JarFile) \ |
612 |
|
$(Executable) |
647 |
|
$(Print) $@ |
648 |
|
@cd $(PackageSourceDir) |
649 |
|
|
574 |
– |
@touch Make.ctemp |
575 |
– |
@touch Make.ctemp |
576 |
– |
|
650 |
|
ifneq "$(words $(CppFiles))" "0" |
651 |
< |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
652 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
653 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
651 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
652 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
653 |
> |
$(Delete) Make.cpptemp |
654 |
> |
|
655 |
> |
ifeq "$(UseMPI)" "yes" |
656 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
657 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
658 |
> |
@$(Delete) Make.cpptemp |
659 |
> |
endif |
660 |
> |
|
661 |
|
endif |
662 |
|
|
663 |
|
ifneq "$(words $(CFiles))" "0" |
664 |
< |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
665 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
666 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
664 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
665 |
> |
@cat Make.ctemp >> $(DependencyFile) |
666 |
> |
$(Delete) Make.ctemp |
667 |
|
|
668 |
+ |
ifeq "$(UseMPI)" "yes" |
669 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
670 |
+ |
@cat Make.ctemp >> $(DependencyFile) |
671 |
+ |
@$(Delete) Make.ctemp |
672 |
+ |
endif |
673 |
+ |
|
674 |
|
endif |
675 |
|
|
676 |
|
ifneq "$(words $(F90Files))" "0" |
677 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90 $(F90Files) > Make.ftemp |
678 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90 $(F90Files) >> Make.ftemp |
679 |
< |
cat Make.ftemp >> $(DependencyFile) |
677 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
678 |
> |
@cat Make.ftemp >> $(DependencyFile) |
679 |
> |
@$(Delete) Make.ftemp |
680 |
> |
|
681 |
> |
ifeq "$(UseMPI)" "yes" |
682 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
683 |
> |
@cat Make.ftemp >> $(DependencyFile) |
684 |
> |
@$(Delete) Make.ftemp |
685 |
> |
endif |
686 |
> |
|
687 |
|
endif |
595 |
– |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
688 |
|
|
689 |
|
# make lib |
690 |
|
lib : $(PackageListLoop) |
697 |
|
jarsign : $(JarFile) |
698 |
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
699 |
|
|
700 |
+ |
#make install |
701 |
+ |
%.install : |
702 |
+ |
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
703 |
+ |
|
704 |
+ |
install : $(InstallListLoop) |
705 |
+ |
$(Print) Done Install |
706 |
+ |
|
707 |
+ |
_installall : _buildall _installdata |
708 |
+ |
|
709 |
+ |
$(MyInstallDir) : |
710 |
+ |
$(MkDir) $@ |
711 |
+ |
|
712 |
+ |
_installdata : $(MyInstallDir) |
713 |
+ |
$(Print) $(InstallFiles) |
714 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
715 |
+ |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
716 |
+ |
endif |
717 |
+ |
|
718 |
|
# make statistics |
719 |
|
_statisticsall : |
720 |
< |
@$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp |
720 |
> |
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
721 |
|
|
722 |
|
statistics : $(PackageListLoop) |
723 |
|
@$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions) |