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 \ |
52 |
< |
restraints \ |
51 |
> |
minimizers \ |
52 |
> |
selection \ |
53 |
|
|
54 |
|
#packages containing applications |
55 |
|
Applications = \ |
56 |
|
applications/oopse \ |
57 |
|
applications/dump2Xyz \ |
58 |
< |
applications/simpleBuilder |
58 |
> |
applications/simpleBuilder\ |
59 |
> |
applications/staticProps \ |
60 |
> |
applications/dynamicProps \ |
61 |
|
|
62 |
|
Samples = \ |
63 |
|
samples/argon \ |
74 |
|
samples/zcons \ |
75 |
|
|
76 |
|
IncludeDirs = \ |
76 |
– |
@SPRNG_INC_DIR@ \ |
77 |
|
@MPI_INC_DIR@ |
78 |
|
|
79 |
|
LibraryDirs = \ |
80 |
– |
@SPRNG_LIB_DIR@ \ |
80 |
|
@MPI_LIB_DIR@ |
81 |
|
|
82 |
|
Libraries = \ |
84 |
– |
@SPRNG_LIB@ \ |
83 |
|
@MPI_LIB@ \ |
84 |
|
@MPI_F90_LIB@ |
85 |
|
|
123 |
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
124 |
|
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
125 |
|
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
126 |
< |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
126 |
> |
#Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
127 |
> |
# REMINDER: We are now using the Package line in each subdir makefile. |
128 |
> |
# This avoids the strange path problem and the subshell |
129 |
|
|
130 |
|
PackageList = $(Package) |
131 |
|
PackageSourceDir = $(SourceDir)/$(Package) |
247 |
|
# |
248 |
|
#--------------------------------------------------------------------------- |
249 |
|
Print = @echo |
250 |
< |
Move = mv |
250 |
> |
Move = mv -f |
251 |
|
Copy = cp |
252 |
|
CCompiler = @CC@ |
253 |
|
CppCompiler = @CXX@ |
256 |
|
INSTALL = @INSTALL@ |
257 |
|
InstallProgram = @INSTALL_PROGRAM@ |
258 |
|
InstallData = @INSTALL_DATA@ |
259 |
< |
MkDir = @MKINSTALLDIRS@ |
259 |
> |
MkDir = @MKINSTALLDIRS@ |
260 |
|
Delete = rm -fr |
261 |
|
StaticArchiver = @AR@ |
262 |
|
DynamicArchiver = @CC@ |
285 |
|
JniOptions = |
286 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
287 |
|
-sourcepath $(SourceDir) |
288 |
< |
COptions = $(FrcDeclare) |
289 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
290 |
< |
CppOptions = $(FrcDeclare) |
291 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
288 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
289 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
290 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
291 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
292 |
|
FortranOptions = |
293 |
|
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
294 |
|
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
366 |
|
|
367 |
|
# Create target directory |
368 |
|
$(PackageTargetDir) : |
369 |
< |
$(MakeDir) $@ |
369 |
> |
$(MkDir) $@ |
370 |
|
|
371 |
+ |
$(BinDir) : |
372 |
+ |
$(MkDir) $@ |
373 |
+ |
|
374 |
|
# .c -> .o |
375 |
|
$(PackageTargetDir)/%.o : %.c |
376 |
|
$(Print) $@ |
424 |
|
# .F90 -> .o |
425 |
|
$(PackageTargetDir)/%.o : %.F90 |
426 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
427 |
< |
if test -f *.$(ModSuffix); then \ |
428 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
427 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
428 |
> |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
429 |
|
fi |
430 |
|
|
431 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
432 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
433 |
< |
if test -f *.$(ModSuffix); then \ |
434 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
433 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
434 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
435 |
|
fi |
436 |
|
|
437 |
|
ifeq "$(UseMPI)" "yes" |
438 |
|
%.o : %.F90 |
439 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
440 |
< |
if test -f *.$(ModSuffix); then \ |
441 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
442 |
< |
fi |
440 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
441 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
442 |
> |
fi |
443 |
|
|
444 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
445 |
< |
if test -f *.$(ModSuffix); then \ |
446 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
445 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
446 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
447 |
|
fi |
448 |
|
|
449 |
|
else |
450 |
|
%.o : %.F90 |
451 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
452 |
< |
if test -f *.$(ModSuffix); then \ |
453 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
454 |
< |
fi |
452 |
< |
|
452 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
453 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
454 |
> |
fi |
455 |
|
endif |
456 |
|
|
457 |
|
|
571 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
572 |
|
|
573 |
|
# Executable |
574 |
< |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
575 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
574 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
575 |
> |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
576 |
|
|
577 |
< |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
578 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
577 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
578 |
> |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
579 |
|
|
580 |
|
# Anything else is just copied from source to target |
581 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
624 |
|
$(Print) Done clean. |
625 |
|
|
626 |
|
_cleanall : |
627 |
< |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
627 |
> |
$(Delete) \ |
628 |
> |
$(ObjectFiles) \ |
629 |
> |
$(ParallelObjectFiles) \ |
630 |
> |
$(JarFile) \ |
631 |
> |
$(SharedLibrary) \ |
632 |
> |
$(StaticLibrary) \ |
633 |
> |
$(ParallelSharedLibrary) \ |
634 |
> |
$(ParallelStaticLibrary) \ |
635 |
> |
$(CombinedStaticLib) \ |
636 |
> |
$(CombinedParallelStaticLib) |
637 |
|
|
638 |
|
# make distclean |
639 |
|
distclean : $(PackageListLoop) |
640 |
|
$(Print) Done clean. |
641 |
|
|
642 |
< |
_distcleanall : |
643 |
< |
$(Delete) $(ObjectFiles) \ |
633 |
< |
$(ParallelObjectFiles) \ |
634 |
< |
$(JarFile) \ |
635 |
< |
$(SharedLibrary) \ |
636 |
< |
$(StaticLibrary) \ |
637 |
< |
$(ParallelSharedLibrary) \ |
638 |
< |
$(ParallelStaticLibrary) \ |
639 |
< |
$(Executable) \ |
642 |
> |
_distcleanall : _cleanall |
643 |
> |
$(Delete) $(Executable) \ |
644 |
|
$(ParallelExecutable) \ |
645 |
|
$(DependencyFile) |
646 |
|
|
643 |
– |
|
647 |
|
# make depend |
648 |
|
depend : $(PackageListLoop) |
649 |
|
$(Print) Done dependencies. |
655 |
|
@cd $(PackageSourceDir) |
656 |
|
|
657 |
|
ifneq "$(words $(CppFiles))" "0" |
658 |
< |
$(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
659 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
658 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
659 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
660 |
|
$(Delete) Make.cpptemp |
661 |
|
|
662 |
|
ifeq "$(UseMPI)" "yes" |
663 |
< |
$(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
664 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
663 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
664 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
665 |
|
@$(Delete) Make.cpptemp |
666 |
|
endif |
667 |
|
|
668 |
|
endif |
669 |
|
|
670 |
|
ifneq "$(words $(CFiles))" "0" |
671 |
< |
$(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
672 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
671 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
672 |
> |
@cat Make.ctemp >> $(DependencyFile) |
673 |
|
$(Delete) Make.ctemp |
674 |
|
|
675 |
|
ifeq "$(UseMPI)" "yes" |
676 |
< |
$(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
677 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
676 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
677 |
> |
@cat Make.ctemp >> $(DependencyFile) |
678 |
|
@$(Delete) Make.ctemp |
679 |
|
endif |
680 |
|
|
681 |
|
endif |
682 |
|
|
683 |
|
ifneq "$(words $(F90Files))" "0" |
684 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
684 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
685 |
|
@cat Make.ftemp >> $(DependencyFile) |
686 |
|
@$(Delete) Make.ftemp |
687 |
|
|
688 |
|
ifeq "$(UseMPI)" "yes" |
689 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
689 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
690 |
|
@cat Make.ftemp >> $(DependencyFile) |
691 |
|
@$(Delete) Make.ftemp |
692 |
|
endif |
721 |
|
ifneq "$(words $(InstallFiles))" "0" |
722 |
|
$(InstallData) $(InstallFiles) $(MyInstallDir) |
723 |
|
endif |
724 |
< |
|
724 |
> |
|
725 |
|
# make statistics |
726 |
|
_statisticsall : |
727 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |