38 |
|
#packages containing libraries |
39 |
|
PackageLibs = \ |
40 |
|
utils \ |
41 |
+ |
visitors \ |
42 |
|
math \ |
43 |
|
types \ |
44 |
|
primitives \ |
44 |
– |
visitors \ |
45 |
|
UseTheForce/DarkSide \ |
46 |
|
UseTheForce \ |
47 |
|
brains \ |
48 |
|
io \ |
49 |
< |
integrators \ |
50 |
< |
minimizers \ |
49 |
> |
integrators\ |
50 |
|
constraints \ |
51 |
< |
profiling \ |
51 |
> |
minimizers \ |
52 |
> |
selection \ |
53 |
|
restraints \ |
54 |
|
|
55 |
|
#packages containing applications |
56 |
|
Applications = \ |
57 |
|
applications/oopse \ |
58 |
|
applications/dump2Xyz \ |
59 |
< |
applications/simpleBuilder |
59 |
> |
applications/simpleBuilder\ |
60 |
> |
applications/staticProps \ |
61 |
> |
applications/dynamicProps \ |
62 |
|
|
63 |
|
Samples = \ |
64 |
|
samples/argon \ |
75 |
|
samples/zcons \ |
76 |
|
|
77 |
|
IncludeDirs = \ |
76 |
– |
@SPRNG_INC_DIR@ \ |
78 |
|
@MPI_INC_DIR@ |
79 |
|
|
80 |
|
LibraryDirs = \ |
80 |
– |
@SPRNG_LIB_DIR@ \ |
81 |
|
@MPI_LIB_DIR@ |
82 |
|
|
83 |
|
Libraries = \ |
84 |
– |
@SPRNG_LIB@ \ |
84 |
|
@MPI_LIB@ \ |
85 |
|
@MPI_F90_LIB@ |
86 |
|
|
124 |
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
125 |
|
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
126 |
|
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
127 |
< |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
127 |
> |
#Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
128 |
> |
# REMINDER: We are now using the Package line in each subdir makefile. |
129 |
> |
# This avoids the strange path problem and the subshell |
130 |
|
|
131 |
|
PackageList = $(Package) |
132 |
|
PackageSourceDir = $(SourceDir)/$(Package) |
216 |
|
#if Main is defined, do not build library. It may not be true sometimes |
217 |
|
ifneq "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0" |
218 |
|
DependencyFile = $(PackageSourceDir)/Makedepend |
219 |
< |
ifneq "$(Main)" "" |
219 |
> |
ifneq "$(words $(Main))" "0" |
220 |
|
Executable = $(BinDir)/$(Main) |
221 |
< |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
221 |
> |
ifeq "$(BuiltParallelExe)" "1" |
222 |
> |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
223 |
> |
endif |
224 |
|
else |
225 |
|
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
226 |
|
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
250 |
|
# |
251 |
|
#--------------------------------------------------------------------------- |
252 |
|
Print = @echo |
253 |
< |
Move = mv |
253 |
> |
Move = mv -f |
254 |
|
Copy = cp |
255 |
|
CCompiler = @CC@ |
256 |
|
CppCompiler = @CXX@ |
258 |
|
MakeDepend = makedepend |
259 |
|
INSTALL = @INSTALL@ |
260 |
|
InstallProgram = @INSTALL_PROGRAM@ |
261 |
+ |
InstallScript = @INSTALL_SCRIPT@ |
262 |
|
InstallData = @INSTALL_DATA@ |
263 |
< |
MkDir = @MKINSTALLDIRS@ |
263 |
> |
MkDir = @MKINSTALLDIRS@ |
264 |
|
Delete = rm -fr |
265 |
|
StaticArchiver = @AR@ |
266 |
|
DynamicArchiver = @CC@ |
289 |
|
JniOptions = |
290 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
291 |
|
-sourcepath $(SourceDir) |
292 |
< |
COptions = $(FrcDeclare) |
293 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
294 |
< |
CppOptions = $(FrcDeclare) |
295 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
292 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
293 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
294 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
295 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
296 |
|
FortranOptions = |
297 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
298 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
297 |
> |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
298 |
> |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
299 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
300 |
|
-sourcepath $(SourceDir) -deprecation |
301 |
|
JavaRunOptions = -classpath $(ClassPath) |
370 |
|
|
371 |
|
# Create target directory |
372 |
|
$(PackageTargetDir) : |
373 |
< |
$(MakeDir) $@ |
373 |
> |
$(MkDir) $@ |
374 |
|
|
375 |
+ |
$(BinDir) : |
376 |
+ |
$(MkDir) $@ |
377 |
+ |
|
378 |
|
# .c -> .o |
379 |
|
$(PackageTargetDir)/%.o : %.c |
380 |
|
$(Print) $@ |
428 |
|
# .F90 -> .o |
429 |
|
$(PackageTargetDir)/%.o : %.F90 |
430 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
431 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then \ |
432 |
+ |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
433 |
+ |
fi |
434 |
|
|
435 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
436 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
437 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then \ |
438 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
439 |
+ |
fi |
440 |
|
|
441 |
|
ifeq "$(UseMPI)" "yes" |
442 |
|
%.o : %.F90 |
443 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
444 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
445 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
446 |
+ |
fi |
447 |
+ |
|
448 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
449 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
450 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
451 |
+ |
fi |
452 |
+ |
|
453 |
|
else |
454 |
|
%.o : %.F90 |
455 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
456 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
457 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
458 |
+ |
fi |
459 |
|
endif |
460 |
|
|
461 |
|
|
575 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
576 |
|
|
577 |
|
# Executable |
578 |
< |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
579 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
578 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
579 |
> |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
580 |
|
|
581 |
< |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
582 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
581 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
582 |
> |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
583 |
|
|
584 |
|
# Anything else is just copied from source to target |
585 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
628 |
|
$(Print) Done clean. |
629 |
|
|
630 |
|
_cleanall : |
631 |
< |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
631 |
> |
$(Delete) \ |
632 |
> |
$(ObjectFiles) \ |
633 |
> |
$(ParallelObjectFiles) \ |
634 |
> |
$(JarFile) \ |
635 |
> |
$(SharedLibrary) \ |
636 |
> |
$(StaticLibrary) \ |
637 |
> |
$(ParallelSharedLibrary) \ |
638 |
> |
$(ParallelStaticLibrary) \ |
639 |
> |
$(CombinedStaticLib) \ |
640 |
> |
$(CombinedParallelStaticLib) |
641 |
|
|
642 |
|
# make distclean |
643 |
|
distclean : $(PackageListLoop) |
644 |
|
$(Print) Done clean. |
645 |
|
|
646 |
< |
_distcleanall : |
647 |
< |
$(Delete) $(ObjectFiles) \ |
615 |
< |
$(ParallelObjectFiles) \ |
616 |
< |
$(JarFile) \ |
617 |
< |
$(SharedLibrary) \ |
618 |
< |
$(StaticLibrary) \ |
619 |
< |
$(ParallelSharedLibrary) \ |
620 |
< |
$(ParallelStaticLibrary) \ |
621 |
< |
$(Executable) \ |
646 |
> |
_distcleanall : _cleanall |
647 |
> |
$(Delete) $(Executable) \ |
648 |
|
$(ParallelExecutable) \ |
649 |
|
$(DependencyFile) |
650 |
|
|
625 |
– |
|
651 |
|
# make depend |
652 |
|
depend : $(PackageListLoop) |
653 |
|
$(Print) Done dependencies. |
659 |
|
@cd $(PackageSourceDir) |
660 |
|
|
661 |
|
ifneq "$(words $(CppFiles))" "0" |
662 |
< |
$(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
663 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
662 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
663 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
664 |
|
$(Delete) Make.cpptemp |
665 |
< |
$(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
666 |
< |
@cat Make.cpptemp | 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 $(CppFiles)>> Make.cpptemp |
668 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
669 |
|
@$(Delete) Make.cpptemp |
670 |
+ |
endif |
671 |
+ |
|
672 |
|
endif |
673 |
|
|
674 |
|
ifneq "$(words $(CFiles))" "0" |
675 |
< |
$(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
676 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
675 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
676 |
> |
@cat Make.ctemp >> $(DependencyFile) |
677 |
|
$(Delete) Make.ctemp |
678 |
< |
$(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
679 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
678 |
> |
|
679 |
> |
ifeq "$(UseMPI)" "yes" |
680 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
681 |
> |
@cat Make.ctemp >> $(DependencyFile) |
682 |
|
@$(Delete) Make.ctemp |
683 |
+ |
endif |
684 |
+ |
|
685 |
|
endif |
686 |
|
|
687 |
|
ifneq "$(words $(F90Files))" "0" |
688 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
656 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
688 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
689 |
|
@cat Make.ftemp >> $(DependencyFile) |
690 |
|
@$(Delete) Make.ftemp |
691 |
+ |
|
692 |
+ |
ifeq "$(UseMPI)" "yes" |
693 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
694 |
+ |
@cat Make.ftemp >> $(DependencyFile) |
695 |
+ |
@$(Delete) Make.ftemp |
696 |
+ |
endif |
697 |
+ |
|
698 |
|
endif |
699 |
|
|
700 |
|
# make lib |
723 |
|
_installdata : $(MyInstallDir) |
724 |
|
$(Print) $(InstallFiles) |
725 |
|
ifneq "$(words $(InstallFiles))" "0" |
726 |
< |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
726 |
> |
$(InstallCommand) $(InstallFiles) $(MyInstallDir) |
727 |
|
endif |
728 |
< |
|
728 |
> |
|
729 |
|
# make statistics |
730 |
|
_statisticsall : |
731 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |