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 \ |
126 |
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
127 |
|
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
128 |
|
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
129 |
< |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
129 |
> |
#Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
130 |
> |
# REMINDER: We are now using the Package line in each subdir makefile. |
131 |
> |
# This avoids the strange path problem and the subshell |
132 |
|
|
133 |
|
PackageList = $(Package) |
134 |
|
PackageSourceDir = $(SourceDir)/$(Package) |
250 |
|
# |
251 |
|
#--------------------------------------------------------------------------- |
252 |
|
Print = @echo |
253 |
< |
Move = mv |
253 |
> |
Move = mv -f |
254 |
|
Copy = cp |
255 |
|
CCompiler = @CC@ |
256 |
|
CppCompiler = @CXX@ |
259 |
|
INSTALL = @INSTALL@ |
260 |
|
InstallProgram = @INSTALL_PROGRAM@ |
261 |
|
InstallData = @INSTALL_DATA@ |
262 |
< |
MkDir = @MKINSTALLDIRS@ |
262 |
> |
MkDir = @MKINSTALLDIRS@ |
263 |
|
Delete = rm -fr |
264 |
|
StaticArchiver = @AR@ |
265 |
|
DynamicArchiver = @CC@ |
279 |
|
Lex = @LEX@ |
280 |
|
Ranlib = @RANLIB@ |
281 |
|
Doxygen = @DOXYGEN@ |
282 |
+ |
Ps = @PS@ |
283 |
+ |
PsType = @PSTYPE@ |
284 |
|
|
285 |
|
MakeOptions = -k |
286 |
|
MakeDependOptions = |
290 |
|
JniOptions = |
291 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
292 |
|
-sourcepath $(SourceDir) |
293 |
< |
COptions = $(FrcDeclare) |
294 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
295 |
< |
CppOptions = $(FrcDeclare) |
296 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
293 |
> |
COptions = $(FrcDeclare) @CFLAGS@ -DPS=$(Ps) -DPSTYPE=$(PsType) |
294 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
295 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
296 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
297 |
|
FortranOptions = |
298 |
|
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
299 |
|
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
371 |
|
|
372 |
|
# Create target directory |
373 |
|
$(PackageTargetDir) : |
374 |
< |
$(MakeDir) $@ |
374 |
> |
$(MkDir) $@ |
375 |
|
|
376 |
+ |
$(BinDir) : |
377 |
+ |
$(MkDir) $@ |
378 |
+ |
|
379 |
|
# .c -> .o |
380 |
|
$(PackageTargetDir)/%.o : %.c |
381 |
|
$(Print) $@ |
429 |
|
# .F90 -> .o |
430 |
|
$(PackageTargetDir)/%.o : %.F90 |
431 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
432 |
< |
if test -f *.$(ModSuffix); then \ |
433 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
432 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
433 |
> |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
434 |
|
fi |
435 |
|
|
436 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
437 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
438 |
< |
if test -f *.$(ModSuffix); then \ |
439 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
438 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
439 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
440 |
|
fi |
441 |
|
|
442 |
|
ifeq "$(UseMPI)" "yes" |
443 |
|
%.o : %.F90 |
444 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
445 |
< |
if test -f *.$(ModSuffix); then \ |
446 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
447 |
< |
fi |
445 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
446 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
447 |
> |
fi |
448 |
|
|
449 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
450 |
< |
if test -f *.$(ModSuffix); then \ |
451 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
450 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
451 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
452 |
|
fi |
453 |
|
|
454 |
|
else |
455 |
|
%.o : %.F90 |
456 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
457 |
< |
if test -f *.$(ModSuffix); then \ |
458 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
459 |
< |
fi |
452 |
< |
|
457 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
458 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
459 |
> |
fi |
460 |
|
endif |
461 |
|
|
462 |
|
|
576 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
577 |
|
|
578 |
|
# Executable |
579 |
< |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
580 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
579 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
580 |
> |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
581 |
|
|
582 |
< |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
583 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
582 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
583 |
> |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
584 |
|
|
585 |
|
# Anything else is just copied from source to target |
586 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
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 |
|
|
666 |
|
ifeq "$(UseMPI)" "yes" |
667 |
< |
$(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
668 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
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 |
|
|
679 |
|
ifeq "$(UseMPI)" "yes" |
680 |
< |
$(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
681 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
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 |
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) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
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 |
725 |
|
ifneq "$(words $(InstallFiles))" "0" |
726 |
|
$(InstallData) $(InstallFiles) $(MyInstallDir) |
727 |
|
endif |
728 |
< |
|
728 |
> |
|
729 |
|
# make statistics |
730 |
|
_statisticsall : |
731 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |