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 |
222 |
|
else |
248 |
|
# |
249 |
|
#--------------------------------------------------------------------------- |
250 |
|
Print = @echo |
251 |
< |
Move = mv |
251 |
> |
Move = mv -f |
252 |
|
Copy = cp |
253 |
|
CCompiler = @CC@ |
254 |
|
CppCompiler = @CXX@ |
256 |
|
MakeDepend = makedepend |
257 |
|
INSTALL = @INSTALL@ |
258 |
|
InstallProgram = @INSTALL_PROGRAM@ |
259 |
+ |
InstallScript = @INSTALL_SCRIPT@ |
260 |
|
InstallData = @INSTALL_DATA@ |
261 |
< |
MkDir = @MKINSTALLDIRS@ |
261 |
> |
MkDir = @MKINSTALLDIRS@ |
262 |
|
Delete = rm -fr |
263 |
|
StaticArchiver = @AR@ |
264 |
|
DynamicArchiver = @CC@ |
287 |
|
JniOptions = |
288 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
289 |
|
-sourcepath $(SourceDir) |
290 |
< |
COptions = $(FrcDeclare) |
291 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
292 |
< |
CppOptions = $(FrcDeclare) |
293 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
290 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
291 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
292 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
293 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
294 |
|
FortranOptions = |
295 |
|
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
296 |
|
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
368 |
|
|
369 |
|
# Create target directory |
370 |
|
$(PackageTargetDir) : |
371 |
< |
$(MakeDir) $@ |
371 |
> |
$(MkDir) $@ |
372 |
|
|
373 |
+ |
$(BinDir) : |
374 |
+ |
$(MkDir) $@ |
375 |
+ |
|
376 |
|
# .c -> .o |
377 |
|
$(PackageTargetDir)/%.o : %.c |
378 |
|
$(Print) $@ |
426 |
|
# .F90 -> .o |
427 |
|
$(PackageTargetDir)/%.o : %.F90 |
428 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
429 |
< |
if test -f *.$(ModSuffix); then \ |
430 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
429 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
430 |
> |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
431 |
|
fi |
432 |
|
|
433 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
434 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
435 |
< |
if test -f *.$(ModSuffix); then \ |
436 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
435 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
436 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
437 |
|
fi |
438 |
|
|
439 |
|
ifeq "$(UseMPI)" "yes" |
440 |
|
%.o : %.F90 |
441 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
442 |
< |
if test -f *.$(ModSuffix); then \ |
443 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
444 |
< |
fi |
442 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
443 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
444 |
> |
fi |
445 |
|
|
446 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
447 |
< |
if test -f *.$(ModSuffix); then \ |
448 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
447 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
448 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
449 |
|
fi |
450 |
|
|
451 |
|
else |
452 |
|
%.o : %.F90 |
453 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
454 |
< |
if test -f *.$(ModSuffix); then \ |
455 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
456 |
< |
fi |
452 |
< |
|
454 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
455 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
456 |
> |
fi |
457 |
|
endif |
458 |
|
|
459 |
|
|
573 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
574 |
|
|
575 |
|
# Executable |
576 |
< |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
577 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
576 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
577 |
> |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
578 |
|
|
579 |
< |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
580 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
579 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
580 |
> |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
581 |
|
|
582 |
|
# Anything else is just copied from source to target |
583 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
626 |
|
$(Print) Done clean. |
627 |
|
|
628 |
|
_cleanall : |
629 |
< |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
629 |
> |
$(Delete) \ |
630 |
> |
$(ObjectFiles) \ |
631 |
> |
$(ParallelObjectFiles) \ |
632 |
> |
$(JarFile) \ |
633 |
> |
$(SharedLibrary) \ |
634 |
> |
$(StaticLibrary) \ |
635 |
> |
$(ParallelSharedLibrary) \ |
636 |
> |
$(ParallelStaticLibrary) \ |
637 |
> |
$(CombinedStaticLib) \ |
638 |
> |
$(CombinedParallelStaticLib) |
639 |
|
|
640 |
|
# make distclean |
641 |
|
distclean : $(PackageListLoop) |
642 |
|
$(Print) Done clean. |
643 |
|
|
644 |
< |
_distcleanall : |
645 |
< |
$(Delete) $(ObjectFiles) \ |
633 |
< |
$(ParallelObjectFiles) \ |
634 |
< |
$(JarFile) \ |
635 |
< |
$(SharedLibrary) \ |
636 |
< |
$(StaticLibrary) \ |
637 |
< |
$(ParallelSharedLibrary) \ |
638 |
< |
$(ParallelStaticLibrary) \ |
639 |
< |
$(Executable) \ |
644 |
> |
_distcleanall : _cleanall |
645 |
> |
$(Delete) $(Executable) \ |
646 |
|
$(ParallelExecutable) \ |
647 |
|
$(DependencyFile) |
648 |
|
|
643 |
– |
|
649 |
|
# make depend |
650 |
|
depend : $(PackageListLoop) |
651 |
|
$(Print) Done dependencies. |
721 |
|
_installdata : $(MyInstallDir) |
722 |
|
$(Print) $(InstallFiles) |
723 |
|
ifneq "$(words $(InstallFiles))" "0" |
724 |
< |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
724 |
> |
$(InstallCommand) $(InstallFiles) $(MyInstallDir) |
725 |
|
endif |
726 |
< |
|
726 |
> |
|
727 |
|
# make statistics |
728 |
|
_statisticsall : |
729 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |