41 |
|
math \ |
42 |
|
types \ |
43 |
|
primitives \ |
44 |
– |
visitors \ |
44 |
|
UseTheForce/DarkSide \ |
45 |
|
UseTheForce \ |
46 |
|
brains \ |
47 |
|
io \ |
49 |
– |
integrators \ |
50 |
– |
minimizers \ |
51 |
– |
constraints \ |
52 |
– |
profiling \ |
53 |
– |
restraints \ |
48 |
|
|
49 |
|
#packages containing applications |
50 |
|
Applications = \ |
80 |
|
@MPI_F90_LIB@ |
81 |
|
|
82 |
|
OopseHome = @OOPSE_HOME@ |
83 |
< |
ForceParamDir = @OOPSE_HOME@/share/forceFields/ |
84 |
< |
SampleSimDir = @OOPSE_HOME@/share/samples/ |
83 |
> |
ForceParamDir = $(OopseHome)/share/forceFields |
84 |
> |
SampleSimDir = $(OopseHome)/share/samples |
85 |
> |
InstallBinDir = $(OopseHome)/bin |
86 |
> |
DocDir = $(OopseHome)/doc |
87 |
|
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
88 |
|
F90Declare = -D__FORTRAN90 |
89 |
|
ParallelDeclare = -DIS_MPI |
219 |
|
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
220 |
|
endif |
221 |
|
endif |
222 |
+ |
|
223 |
|
# |
224 |
|
# Misc |
225 |
|
# |
247 |
|
CppCompiler = @CXX@ |
248 |
|
Linker = @CXX@ |
249 |
|
MakeDepend = makedepend |
250 |
< |
Install = @INSTALL@ |
250 |
> |
INSTALL = @INSTALL@ |
251 |
|
InstallProgram = @INSTALL_PROGRAM@ |
252 |
|
InstallData = @INSTALL_DATA@ |
253 |
< |
MakeDir = @MKINSTALLDIRS@ |
253 |
> |
MkDir = @MKINSTALLDIRS@ |
254 |
|
Delete = rm -fr |
255 |
|
StaticArchiver = @AR@ |
256 |
|
DynamicArchiver = @CC@ |
279 |
|
JniOptions = |
280 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
281 |
|
-sourcepath $(SourceDir) |
282 |
< |
COptions = $(FrcDeclare) |
283 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
284 |
< |
CppOptions = $(FrcDeclare) |
285 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
282 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
283 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
284 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
285 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
286 |
|
FortranOptions = |
287 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
288 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
287 |
> |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
288 |
> |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
289 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
290 |
|
-sourcepath $(SourceDir) -deprecation |
291 |
|
JavaRunOptions = -classpath $(ClassPath) |
307 |
|
|
308 |
|
Empty = |
309 |
|
Space = $(Empty) $(Empty) |
310 |
+ |
|
311 |
+ |
|
312 |
+ |
#--------------------------------------------------------------------------- |
313 |
+ |
# |
314 |
+ |
# Install |
315 |
+ |
# |
316 |
+ |
#--------------------------------------------------------------------------- |
317 |
+ |
|
318 |
+ |
ifneq "$(words $(SampleFiles))" "0" |
319 |
+ |
MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) |
320 |
+ |
MyInstallDir = $(SampleSimDir)/$(MySample) |
321 |
+ |
InstallFiles = $(SampleFiles) |
322 |
+ |
InstallCommand = $(InstallData) |
323 |
+ |
endif |
324 |
|
|
325 |
+ |
ifneq "$(words $(Main))" "0" |
326 |
+ |
MyInstallDir = $(InstallBinDir) |
327 |
+ |
ifeq "$(UseMPI)" "yes" |
328 |
+ |
InstallFiles = $(Executable) $(ParallelExecutable) |
329 |
+ |
else |
330 |
+ |
InstallFiles = $(Executable) |
331 |
+ |
endif |
332 |
+ |
InstallCommand = $(InstallProgram) |
333 |
+ |
endif |
334 |
|
|
335 |
+ |
ifneq "$(words $(ForcefieldFiles))" "0" |
336 |
+ |
MyInstallDir = $(ForceParamDir) |
337 |
+ |
InstallFiles = $(ForcefieldFiles) |
338 |
+ |
InstallCommand = $(InstallData) |
339 |
+ |
endif |
340 |
+ |
|
341 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
342 |
+ |
InstallList = |
343 |
+ |
else |
344 |
+ |
InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) |
345 |
+ |
endif |
346 |
+ |
|
347 |
+ |
InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) |
348 |
+ |
|
349 |
+ |
|
350 |
+ |
|
351 |
|
#--------------------------------------------------------------------------- |
352 |
|
# |
353 |
|
# Rules |
415 |
|
# .F90 -> .o |
416 |
|
$(PackageTargetDir)/%.o : %.F90 |
417 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
418 |
+ |
if test -f *.$(ModSuffix); then \ |
419 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
420 |
+ |
fi |
421 |
|
|
422 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
423 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
424 |
+ |
if test -f *.$(ModSuffix); then \ |
425 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
426 |
+ |
fi |
427 |
|
|
428 |
|
ifeq "$(UseMPI)" "yes" |
429 |
|
%.o : %.F90 |
430 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
431 |
+ |
if test -f *.$(ModSuffix); then \ |
432 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
433 |
+ |
fi |
434 |
+ |
|
435 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
436 |
+ |
if test -f *.$(ModSuffix); then \ |
437 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
438 |
+ |
fi |
439 |
+ |
|
440 |
|
else |
441 |
|
%.o : %.F90 |
442 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
443 |
+ |
if test -f *.$(ModSuffix); then \ |
444 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
445 |
+ |
fi |
446 |
+ |
|
447 |
|
endif |
448 |
|
|
449 |
|
|
580 |
|
|
581 |
|
_all : _buildall |
582 |
|
|
583 |
+ |
_buildall : |
584 |
|
ifeq "$(UseMPI)" "yes" |
585 |
|
_buildall : \ |
586 |
|
$(DependencyFile) \ |
646 |
|
@cd $(PackageSourceDir) |
647 |
|
|
648 |
|
ifneq "$(words $(CppFiles))" "0" |
649 |
< |
$(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
650 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
649 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
650 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
651 |
|
$(Delete) Make.cpptemp |
652 |
< |
$(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
653 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
652 |
> |
|
653 |
> |
ifeq "$(UseMPI)" "yes" |
654 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
655 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
656 |
|
@$(Delete) Make.cpptemp |
657 |
+ |
endif |
658 |
+ |
|
659 |
|
endif |
660 |
|
|
661 |
|
ifneq "$(words $(CFiles))" "0" |
662 |
< |
$(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
663 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
662 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
663 |
> |
@cat Make.ctemp >> $(DependencyFile) |
664 |
|
$(Delete) Make.ctemp |
665 |
< |
$(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
666 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
665 |
> |
|
666 |
> |
ifeq "$(UseMPI)" "yes" |
667 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
668 |
> |
@cat Make.ctemp >> $(DependencyFile) |
669 |
|
@$(Delete) Make.ctemp |
670 |
+ |
endif |
671 |
+ |
|
672 |
|
endif |
673 |
|
|
674 |
|
ifneq "$(words $(F90Files))" "0" |
675 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
613 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
675 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
676 |
|
@cat Make.ftemp >> $(DependencyFile) |
677 |
|
@$(Delete) Make.ftemp |
678 |
+ |
|
679 |
+ |
ifeq "$(UseMPI)" "yes" |
680 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
681 |
+ |
@cat Make.ftemp >> $(DependencyFile) |
682 |
+ |
@$(Delete) Make.ftemp |
683 |
+ |
endif |
684 |
+ |
|
685 |
|
endif |
686 |
|
|
687 |
|
# make lib |
695 |
|
jarsign : $(JarFile) |
696 |
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
697 |
|
|
698 |
+ |
#make install |
699 |
+ |
%.install : |
700 |
+ |
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
701 |
+ |
|
702 |
+ |
install : $(InstallListLoop) |
703 |
+ |
$(Print) Done Install |
704 |
+ |
|
705 |
+ |
_installall : _buildall _installdata |
706 |
+ |
|
707 |
+ |
$(MyInstallDir) : |
708 |
+ |
$(MkDir) $@ |
709 |
+ |
|
710 |
+ |
_installdata : $(MyInstallDir) |
711 |
+ |
$(Print) $(InstallFiles) |
712 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
713 |
+ |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
714 |
+ |
endif |
715 |
+ |
|
716 |
|
# make statistics |
717 |
|
_statisticsall : |
718 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |