38 |
|
#packages containing libraries |
39 |
|
PackageLibs = \ |
40 |
|
utils \ |
41 |
+ |
visitors \ |
42 |
|
math \ |
43 |
|
types \ |
44 |
|
primitives \ |
46 |
|
UseTheForce \ |
47 |
|
brains \ |
48 |
|
io \ |
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@ |
290 |
|
-sourcepath $(SourceDir) |
291 |
|
COptions = $(FrcDeclare) @CFLAGS@ |
292 |
|
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
293 |
< |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
294 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
293 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
294 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
295 |
|
FortranOptions = |
296 |
|
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
297 |
|
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
369 |
|
|
370 |
|
# Create target directory |
371 |
|
$(PackageTargetDir) : |
372 |
< |
$(MakeDir) $@ |
372 |
> |
$(MkDir) $@ |
373 |
|
|
374 |
+ |
$(BinDir) : |
375 |
+ |
$(MkDir) $@ |
376 |
+ |
|
377 |
|
# .c -> .o |
378 |
|
$(PackageTargetDir)/%.o : %.c |
379 |
|
$(Print) $@ |
427 |
|
# .F90 -> .o |
428 |
|
$(PackageTargetDir)/%.o : %.F90 |
429 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
430 |
< |
if test -f *.$(ModSuffix); then \ |
431 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
430 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
431 |
> |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
432 |
|
fi |
433 |
|
|
434 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
435 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
436 |
< |
if test -f *.$(ModSuffix); then \ |
437 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
436 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
437 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
438 |
|
fi |
439 |
|
|
440 |
|
ifeq "$(UseMPI)" "yes" |
441 |
|
%.o : %.F90 |
442 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
443 |
< |
if test -f *.$(ModSuffix); then \ |
444 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
445 |
< |
fi |
443 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
444 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
445 |
> |
fi |
446 |
|
|
447 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
448 |
< |
if test -f *.$(ModSuffix); then \ |
449 |
< |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
448 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
449 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
450 |
|
fi |
451 |
|
|
452 |
|
else |
453 |
|
%.o : %.F90 |
454 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
455 |
< |
if test -f *.$(ModSuffix); then \ |
456 |
< |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
457 |
< |
fi |
449 |
< |
|
455 |
> |
if test -n "`ls *.$(ModSuffix)`"; then\ |
456 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
457 |
> |
fi |
458 |
|
endif |
459 |
|
|
460 |
|
|
574 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
575 |
|
|
576 |
|
# Executable |
577 |
< |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
578 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
577 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
578 |
> |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
579 |
|
|
580 |
< |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
581 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
580 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
581 |
> |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
582 |
|
|
583 |
|
# Anything else is just copied from source to target |
584 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
627 |
|
$(Print) Done clean. |
628 |
|
|
629 |
|
_cleanall : |
630 |
< |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
630 |
> |
$(Delete) \ |
631 |
> |
$(ObjectFiles) \ |
632 |
> |
$(ParallelObjectFiles) \ |
633 |
> |
$(JarFile) \ |
634 |
> |
$(SharedLibrary) \ |
635 |
> |
$(StaticLibrary) \ |
636 |
> |
$(ParallelSharedLibrary) \ |
637 |
> |
$(ParallelStaticLibrary) \ |
638 |
> |
$(CombinedStaticLib) \ |
639 |
> |
$(CombinedParallelStaticLib) |
640 |
|
|
641 |
|
# make distclean |
642 |
|
distclean : $(PackageListLoop) |
643 |
|
$(Print) Done clean. |
644 |
|
|
645 |
< |
_distcleanall : |
646 |
< |
$(Delete) $(ObjectFiles) \ |
630 |
< |
$(ParallelObjectFiles) \ |
631 |
< |
$(JarFile) \ |
632 |
< |
$(SharedLibrary) \ |
633 |
< |
$(StaticLibrary) \ |
634 |
< |
$(ParallelSharedLibrary) \ |
635 |
< |
$(ParallelStaticLibrary) \ |
636 |
< |
$(Executable) \ |
645 |
> |
_distcleanall : _cleanall |
646 |
> |
$(Delete) $(Executable) \ |
647 |
|
$(ParallelExecutable) \ |
648 |
|
$(DependencyFile) |
649 |
|
|
640 |
– |
|
650 |
|
# make depend |
651 |
|
depend : $(PackageListLoop) |
652 |
|
$(Print) Done dependencies. |
724 |
|
ifneq "$(words $(InstallFiles))" "0" |
725 |
|
$(InstallData) $(InstallFiles) $(MyInstallDir) |
726 |
|
endif |
727 |
< |
|
727 |
> |
|
728 |
|
# make statistics |
729 |
|
_statisticsall : |
730 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |