51 |
|
minimizers \ |
52 |
|
selection \ |
53 |
|
restraints \ |
54 |
< |
|
54 |
> |
lattice \ |
55 |
> |
openbabel\ |
56 |
> |
antlr\ |
57 |
> |
mdParser |
58 |
|
#packages containing applications |
59 |
|
Applications = \ |
60 |
|
applications/oopse \ |
61 |
|
applications/dump2Xyz \ |
59 |
– |
applications/simpleBuilder\ |
62 |
|
applications/staticProps \ |
63 |
|
applications/dynamicProps \ |
64 |
+ |
applications/simpleBuilder\ |
65 |
+ |
applications/nanoRodBuilder \ |
66 |
+ |
applications/atom2mdin |
67 |
|
|
68 |
|
Samples = \ |
69 |
+ |
samples/alkane \ |
70 |
|
samples/argon \ |
71 |
< |
samples/water/dimer \ |
71 |
> |
samples/cutoff \ |
72 |
> |
samples/dipole \ |
73 |
> |
samples/gbljtest \ |
74 |
> |
samples/lipid \ |
75 |
> |
samples/metals/EAM \ |
76 |
> |
samples/metals/EAM/nanoparticle \ |
77 |
> |
samples/metals/EAM/nanorod \ |
78 |
> |
samples/metals/Sutton-Chen \ |
79 |
> |
samples/minimizer \ |
80 |
> |
samples/shape \ |
81 |
> |
samples/thermoIntegration/liquid \ |
82 |
> |
samples/thermoIntegration/solid \ |
83 |
> |
samples/water/dimer \ |
84 |
|
samples/water/spce \ |
85 |
|
samples/water/ssd \ |
86 |
|
samples/water/ssde \ |
87 |
+ |
samples/water/ssdrf \ |
88 |
+ |
samples/water/ssd-ion \ |
89 |
|
samples/water/tip3p_ice \ |
90 |
|
samples/water/tip4p \ |
91 |
< |
samples/lipid \ |
72 |
< |
samples/alkane \ |
73 |
< |
samples/minimizer \ |
74 |
< |
samples/metals \ |
75 |
< |
samples/zcons \ |
91 |
> |
samples/zcons |
92 |
|
|
93 |
|
IncludeDirs = \ |
94 |
< |
@MPI_INC_DIR@ |
94 |
> |
@CGAL_INC_DIR@ \ |
95 |
> |
@MPI_INC_DIR@ |
96 |
|
|
97 |
|
LibraryDirs = \ |
98 |
+ |
@CGAL_LIB_DIR@ \ |
99 |
|
@MPI_LIB_DIR@ |
100 |
|
|
101 |
|
Libraries = \ |
102 |
+ |
@LIBS@ \ |
103 |
+ |
@CGAL_LIBS@ \ |
104 |
|
@MPI_LIB@ \ |
105 |
< |
@MPI_F90_LIB@ |
105 |
> |
@MPI_F90_LIB@ |
106 |
|
|
107 |
|
OopseHome = @OOPSE_HOME@ |
108 |
|
ForceParamDir = $(OopseHome)/share/forceFields |
116 |
|
ModuleCase = @F90_MODULE_NAMES@ |
117 |
|
ModSuffix = @MOD@ |
118 |
|
LinkOptions = \ |
119 |
< |
@F90LIBS@ |
119 |
> |
@FCLIBS@ \ |
120 |
> |
@CXXFLAGS@ |
121 |
|
|
122 |
|
ParallelLinkOptions = \ |
123 |
< |
@F90LIBS@ |
123 |
> |
@FCLIBS@ \ |
124 |
> |
@CXXFLAGS@ |
125 |
|
|
126 |
|
|
127 |
|
#--------------------------------------------------------------------------- |
135 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
136 |
|
LibDir = $(DEV_ROOT)/lib |
137 |
|
MakeDir = $(DEV_ROOT)/make |
138 |
+ |
MainMakefile = $(MakeDir)/Makefile |
139 |
|
BinDir = $(DEV_ROOT)/bin |
140 |
|
DocsDir = $(DEV_ROOT)/docs |
141 |
|
CurrentDir = $(CURDIR) |
258 |
|
[0-9] := 0 1 2 3 4 5 6 7 8 9 # |
259 |
|
[A-F] := A B C D E F # |
260 |
|
|
261 |
< |
# Upper case and lower case functions. Each function has a single |
262 |
< |
# argument which is the text to alter |
261 |
> |
# Figure out whether we have $(eval) or not (GNU Make 3.80 and above) |
262 |
> |
# if we do not then we need to use the shell version of tr, and not the |
263 |
> |
# faster tr function above: |
264 |
|
|
265 |
< |
uc = $(call tr,$([a-z]),$([A-Z]),$1) |
266 |
< |
lc = $(call tr,$([A-Z]),$([a-z]),$1) |
265 |
> |
__have_eval := $(false) |
266 |
> |
__ignore := $(eval __have_eval := $(true)) |
267 |
|
|
268 |
+ |
ifndef __have_eval |
269 |
+ |
uc = $(shell echo $1 | tr "a-z" "A-Z") |
270 |
+ |
lc = $(shell echo $1 | tr "A-Z" "a-z") |
271 |
+ |
else |
272 |
+ |
uc = $(call tr,$([a-z]),$([A-Z]),$1) |
273 |
+ |
lc = $(call tr,$([A-Z]),$([a-z]),$1) |
274 |
+ |
endif |
275 |
+ |
|
276 |
|
# OK, now we can actually use these functions to figure out the names |
277 |
|
# of the module files: |
278 |
|
|
343 |
|
CppCompiler = @CXX@ |
344 |
|
Linker = @CXX@ |
345 |
|
MakeDepend = makedepend |
346 |
+ |
LN_S = @LN_S@ |
347 |
|
INSTALL = @INSTALL@ |
348 |
+ |
EGREP = @EGREP@ |
349 |
|
InstallProgram = @INSTALL_PROGRAM@ |
350 |
|
InstallScript = @INSTALL_SCRIPT@ |
351 |
|
InstallData = @INSTALL_DATA@ |
352 |
|
MkDir = @MKINSTALLDIRS@ |
353 |
< |
Delete = rm -fr |
353 |
> |
Delete = rm -f |
354 |
|
StaticArchiver = @AR@ |
355 |
|
DynamicArchiver = @CC@ |
356 |
|
FortranCompiler = @FC@ |
323 |
– |
F90Compiler = @F90@ |
357 |
|
JavaCompiler = $(JAVA_HOME)/bin/javac |
358 |
|
JavaArchiver = $(JAVA_HOME)/bin/jar |
359 |
|
JarSigner = $(JAVA_HOME)/bin/jarsigner |
379 |
|
-sourcepath $(SourceDir) |
380 |
|
COptions = $(FrcDeclare) @CFLAGS@ |
381 |
|
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
382 |
< |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
383 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
384 |
< |
FortranOptions = |
385 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
353 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
382 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
383 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
384 |
> |
FortranOptions = @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @FCFLAGS_SRCEXT@ |
385 |
> |
FortranParallelOptions = @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclar) @FCFLAGS_SRCEXT@ |
386 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
387 |
|
-sourcepath $(SourceDir) -deprecation |
388 |
|
JavaRunOptions = -classpath $(ClassPath) |
427 |
|
InstallFiles = $(Executable) |
428 |
|
endif |
429 |
|
InstallCommand = $(InstallProgram) |
430 |
+ |
ifneq "$(words $(LinkTargets))" "0" |
431 |
+ |
MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main)) |
432 |
+ |
MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets)) |
433 |
+ |
endif |
434 |
|
endif |
435 |
|
|
436 |
|
ifneq "$(words $(ForcefieldFiles))" "0" |
467 |
|
$(MkDir) $@ |
468 |
|
|
469 |
|
# .c -> .o |
470 |
< |
$(PackageTargetDir)/%.o : %.c |
470 |
> |
$(PackageTargetDir)/%.o : %.c $(MainMakefile) |
471 |
|
$(Print) $@ |
472 |
|
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
473 |
|
|
474 |
< |
$(PackageParallelTargetDir)/%.o : %.c |
474 |
> |
$(PackageParallelTargetDir)/%.o : %.c $(MainMakefile) |
475 |
|
$(Print) $@ |
476 |
|
$(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@ |
477 |
|
|
478 |
|
ifeq "$(UseMPI)" "yes" |
479 |
< |
%.o : %.c |
479 |
> |
%.o : %.c $(MainMakefile) |
480 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
481 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
482 |
|
else |
483 |
< |
%.o : %.c |
483 |
> |
%.o : %.c $(MainMakefile) |
484 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
485 |
|
endif |
486 |
|
|
487 |
|
# .cpp -> .o |
488 |
< |
$(PackageTargetDir)/%.o : %.cpp |
488 |
> |
$(PackageTargetDir)/%.o : %.cpp $(MainMakefile) |
489 |
|
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
490 |
|
|
491 |
< |
$(PackageParallelTargetDir)/%.o : %.cpp |
491 |
> |
$(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile) |
492 |
|
$(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@ |
493 |
|
|
494 |
|
ifeq "$(UseMPI)" "yes" |
495 |
< |
%.o : %.cpp |
495 |
> |
%.o : %.cpp $(MainMakefile) |
496 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
497 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
498 |
|
else |
499 |
< |
%.o : %.cpp |
499 |
> |
%.o : %.cpp $(MainMakefile) |
500 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
501 |
|
endif |
502 |
|
|
503 |
|
# .f -> .o |
504 |
< |
$(PackageTargetDir)/%.o : %.f |
504 |
> |
$(PackageTargetDir)/%.o : %.f $(MainMakefile) |
505 |
|
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
506 |
|
|
507 |
< |
$(PackageParallelTargetDir)/%.o : %.f |
507 |
> |
$(PackageParallelTargetDir)/%.o : %.f $(MainMakefile) |
508 |
|
$(FortranCompiler) $(FortranParallelOptions) -c $< -o $@ |
509 |
|
|
510 |
|
ifeq "$(UseMPI)" "yes" |
511 |
< |
%.o : %.f |
511 |
> |
%.o : %.f $(MainMakefile) |
512 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
513 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
514 |
|
else |
515 |
< |
%.o : %.f |
515 |
> |
%.o : %.f $(MainMakefile) |
516 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
517 |
|
endif |
518 |
|
|
519 |
|
# .F90 -> .o |
520 |
< |
$(PackageTargetDir)/%.o : %.F90 |
521 |
< |
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
520 |
> |
$(PackageTargetDir)/%.o : %.F90 $(MainMakefile) |
521 |
> |
$(FortranCompiler) $(FortranOptions) $(IncludePath) -c $< -o $@ |
522 |
|
if test -n "`ls *.$(ModSuffix)`"; then \ |
523 |
|
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
524 |
|
fi |
525 |
|
|
526 |
< |
$(PackageParallelTargetDir)/%.o : %.F90 |
527 |
< |
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
526 |
> |
$(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile) |
527 |
> |
$(FortranCompiler) $(FortranParallelOptions) $(IncludePath) -c $< -o $@ |
528 |
|
if test -n "`ls *.$(ModSuffix)`"; then \ |
529 |
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
530 |
|
fi |
531 |
|
|
532 |
|
ifeq "$(UseMPI)" "yes" |
533 |
< |
%.o : %.F90 |
533 |
> |
%.o : %.F90 $(MainMakefile) |
534 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
535 |
|
if test -n "`ls *.$(ModSuffix)`"; then\ |
536 |
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
542 |
|
fi |
543 |
|
|
544 |
|
else |
545 |
< |
%.o : %.F90 |
545 |
> |
%.o : %.F90 $(MainMakefile) |
546 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
547 |
|
if test -n "`ls *.$(ModSuffix)`"; then\ |
548 |
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
649 |
|
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
650 |
|
|
651 |
|
#GUN make funtions to merge the libraries |
652 |
< |
find_objs = $(shell $(StaticArchiver) -t $(1)) |
652 |
> |
find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF") |
653 |
|
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
654 |
|
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
655 |
|
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
656 |
|
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
657 |
+ |
do_link = $(shell $(LN_S) $(1) $(2)) |
658 |
+ |
all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib))) |
659 |
+ |
all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib))) |
660 |
+ |
all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs)) |
661 |
+ |
all_lib_parallel_objs = $(patsubst %,$(ParallelTargetDir)/%,$(call all_parallel_objs)) |
662 |
|
|
663 |
|
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
664 |
< |
$(Print) create $@ |
665 |
< |
$(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@)) |
664 |
> |
$(Print) creating $@ |
665 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs) |
666 |
|
$(Ranlib) $(CombinedStaticLib) |
667 |
|
|
668 |
|
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
669 |
< |
$(Print) create $@ |
670 |
< |
$(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@)) |
669 |
> |
$(Print) creating $@ |
670 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs) |
671 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
672 |
|
|
673 |
|
# Executable |
674 |
< |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
674 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
675 |
> |
if test ! -d $(BinDir); then \ |
676 |
> |
$(MkDir) $(BinDir) ;\ |
677 |
> |
fi |
678 |
|
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
679 |
|
|
680 |
< |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
680 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
681 |
> |
if test ! -d $(BinDir); then \ |
682 |
> |
$(MkDir) $(BinDir) ;\ |
683 |
> |
fi |
684 |
|
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
685 |
|
|
686 |
|
# Anything else is just copied from source to target |
824 |
|
install : $(InstallListLoop) |
825 |
|
$(Print) Done Install |
826 |
|
|
827 |
< |
_installall : _buildall _installdata |
827 |
> |
_installall : _buildall _installdata _installlinks |
828 |
|
|
829 |
|
$(MyInstallDir) : |
830 |
|
$(MkDir) $@ |
835 |
|
$(InstallCommand) $(InstallFiles) $(MyInstallDir) |
836 |
|
endif |
837 |
|
|
838 |
+ |
_installlinks : $(MyInstallDir) |
839 |
+ |
ifneq "$(words $(MyLinkTargets))" "0" |
840 |
+ |
@cd $(MyInstallDir) |
841 |
+ |
$(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink))) |
842 |
+ |
endif |
843 |
+ |
|
844 |
|
# make statistics |
845 |
|
_statisticsall : |
846 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
851 |
|
$(Print) Done statistics. |
852 |
|
|
853 |
|
# make pure |
854 |
< |
$(Executable).pure : |
855 |
< |
$(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
856 |
< |
$(LibList) $(ObjectFiles) -o $@ |
854 |
> |
#$(Executable).pure : |
855 |
> |
# $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
856 |
> |
# $(LibList) $(ObjectFiles) -o $@ |
857 |
> |
# |
858 |
> |
#pure : $(Executable).pure |
859 |
|
|
805 |
– |
pure : $(Executable).pure |
806 |
– |
|
860 |
|
#make cvslog |
861 |
|
cvslog: |
862 |
< |
$(DEV_ROOT)/scripts/cvs2cl.pl |
862 |
> |
$(DEV_ROOT)/scripts/cvs2cl |
863 |
|
|
864 |
|
# Execute |
865 |
|
_runexe : |