50 |
|
constraints \ |
51 |
|
minimizers \ |
52 |
|
selection \ |
53 |
< |
|
53 |
> |
restraints \ |
54 |
> |
lattice \ |
55 |
> |
openbabel\ |
56 |
> |
antlr\ |
57 |
> |
mdParser |
58 |
|
#packages containing applications |
59 |
|
Applications = \ |
60 |
|
applications/oopse \ |
61 |
|
applications/dump2Xyz \ |
58 |
– |
applications/simpleBuilder\ |
62 |
|
applications/staticProps \ |
63 |
|
applications/dynamicProps \ |
64 |
+ |
applications/simpleBuilder\ |
65 |
+ |
applications/nanoRodBuilder \ |
66 |
+ |
applications/atom2mdin |
67 |
|
|
68 |
|
Samples = \ |
69 |
|
samples/argon \ |
70 |
< |
samples/water/dimer \ |
70 |
> |
samples/water/dimer \ |
71 |
|
samples/water/spce \ |
72 |
|
samples/water/ssd \ |
73 |
|
samples/water/ssde \ |
74 |
+ |
samples/water/ssdrf \ |
75 |
+ |
samples/water/ssd-ion \ |
76 |
|
samples/water/tip3p_ice \ |
77 |
|
samples/water/tip4p \ |
78 |
|
samples/lipid \ |
79 |
|
samples/alkane \ |
80 |
|
samples/minimizer \ |
81 |
|
samples/metals \ |
82 |
+ |
samples/thermoIntegration/liquid \ |
83 |
+ |
samples/thermoIntegration/solid \ |
84 |
+ |
samples/dipole \ |
85 |
+ |
samples/shape \ |
86 |
|
samples/zcons \ |
87 |
|
|
88 |
|
IncludeDirs = \ |
89 |
< |
@SPRNG_INC_DIR@ \ |
90 |
< |
@MPI_INC_DIR@ |
89 |
> |
@CGAL_INC_DIR@ \ |
90 |
> |
@MPI_INC_DIR@ |
91 |
|
|
92 |
|
LibraryDirs = \ |
93 |
< |
@SPRNG_LIB_DIR@ \ |
93 |
> |
@CGAL_LIB_DIR@ \ |
94 |
|
@MPI_LIB_DIR@ |
95 |
|
|
96 |
|
Libraries = \ |
97 |
< |
@SPRNG_LIB@ \ |
97 |
> |
@LIBS@ \ |
98 |
> |
@CGAL_LIBS@ \ |
99 |
|
@MPI_LIB@ \ |
100 |
< |
@MPI_F90_LIB@ |
100 |
> |
@MPI_F90_LIB@ |
101 |
|
|
102 |
|
OopseHome = @OOPSE_HOME@ |
103 |
|
ForceParamDir = $(OopseHome)/share/forceFields |
128 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
129 |
|
LibDir = $(DEV_ROOT)/lib |
130 |
|
MakeDir = $(DEV_ROOT)/make |
131 |
+ |
MainMakefile = $(MakeDir)/Makefile |
132 |
|
BinDir = $(DEV_ROOT)/bin |
133 |
|
DocsDir = $(DEV_ROOT)/docs |
134 |
|
CurrentDir = $(CURDIR) |
220 |
|
$(LexFiles:%.l= %.c) |
221 |
|
|
222 |
|
OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) |
223 |
+ |
|
224 |
+ |
########################################################################### |
225 |
+ |
# |
226 |
+ |
# Figure out the names of the module files based on some work done by |
227 |
+ |
# configure. The tr function below is from John Graham-Cumming |
228 |
+ |
# (http://www.jgc.org). |
229 |
+ |
# |
230 |
+ |
# The tr function. Has three arguments: |
231 |
+ |
# |
232 |
+ |
# $1 The list of characters to translate from |
233 |
+ |
# $2 The list of characters to translate to |
234 |
+ |
# $3 The text to translate |
235 |
+ |
# |
236 |
+ |
# For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L. |
237 |
+ |
|
238 |
+ |
tr = $(eval __t := $3) \ |
239 |
+ |
$(foreach c, \ |
240 |
+ |
$(join $(addsuffix :,$1),$2), \ |
241 |
+ |
$(eval __t := \ |
242 |
+ |
$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \ |
243 |
+ |
$(__t))))$(__t) |
244 |
+ |
|
245 |
+ |
# Common character classes for use with the tr function. Each of |
246 |
+ |
# these is actually a variable declaration and must be wrapped with |
247 |
+ |
# $() or ${} to be used. |
248 |
|
|
249 |
+ |
[A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # |
250 |
+ |
[a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z # |
251 |
+ |
[0-9] := 0 1 2 3 4 5 6 7 8 9 # |
252 |
+ |
[A-F] := A B C D E F # |
253 |
+ |
|
254 |
+ |
# Figure out whether we have $(eval) or not (GNU Make 3.80 and above) |
255 |
+ |
# if we do not then we need to use the shell version of tr, and not the |
256 |
+ |
# faster tr function above: |
257 |
+ |
|
258 |
+ |
__have_eval := $(false) |
259 |
+ |
__ignore := $(eval __have_eval := $(true)) |
260 |
+ |
|
261 |
+ |
ifndef __have_eval |
262 |
+ |
uc = $(shell echo $1 | tr "a-z" "A-Z") |
263 |
+ |
lc = $(shell echo $1 | tr "A-Z" "a-z") |
264 |
+ |
else |
265 |
+ |
uc = $(call tr,$([a-z]),$([A-Z]),$1) |
266 |
+ |
lc = $(call tr,$([A-Z]),$([a-z]),$1) |
267 |
+ |
endif |
268 |
+ |
|
269 |
+ |
# OK, now we can actually use these functions to figure out the names |
270 |
+ |
# of the module files: |
271 |
+ |
|
272 |
+ |
ifneq "$(words $(Modules))" "0" |
273 |
+ |
ifeq "$(ModuleCase)" "UPPER" |
274 |
+ |
MODULES = $(call uc,$(Modules)) |
275 |
+ |
else |
276 |
+ |
ifeq "$(ModuleCase)" "lower" |
277 |
+ |
MODULES = $(call lc,$(Modules)) |
278 |
+ |
else |
279 |
+ |
MODULES = $(Modules) |
280 |
+ |
endif |
281 |
+ |
endif |
282 |
+ |
ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix)) |
283 |
+ |
ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix)) |
284 |
+ |
endif |
285 |
+ |
# |
286 |
+ |
########################################################################### |
287 |
+ |
|
288 |
|
ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries)) |
289 |
|
ThirdPartyJars = $(subst $(Space),$(X),$(ThirdPartyJarsTmp)) |
290 |
|
|
296 |
|
#if Main is defined, do not build library. It may not be true sometimes |
297 |
|
ifneq "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0" |
298 |
|
DependencyFile = $(PackageSourceDir)/Makedepend |
299 |
< |
ifneq "$(Main)" "" |
299 |
> |
ifneq "$(words $(Main))" "0" |
300 |
|
Executable = $(BinDir)/$(Main) |
301 |
< |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
301 |
> |
ifeq "$(BuiltParallelExe)" "1" |
302 |
> |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
303 |
> |
endif |
304 |
|
else |
305 |
|
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
306 |
|
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
336 |
|
CppCompiler = @CXX@ |
337 |
|
Linker = @CXX@ |
338 |
|
MakeDepend = makedepend |
339 |
+ |
LN_S = @LN_S@ |
340 |
|
INSTALL = @INSTALL@ |
341 |
+ |
EGREP = @EGREP@ |
342 |
|
InstallProgram = @INSTALL_PROGRAM@ |
343 |
+ |
InstallScript = @INSTALL_SCRIPT@ |
344 |
|
InstallData = @INSTALL_DATA@ |
345 |
|
MkDir = @MKINSTALLDIRS@ |
346 |
< |
Delete = rm -fr |
346 |
> |
Delete = rm -f |
347 |
|
StaticArchiver = @AR@ |
348 |
|
DynamicArchiver = @CC@ |
349 |
|
FortranCompiler = @FC@ |
362 |
|
Lex = @LEX@ |
363 |
|
Ranlib = @RANLIB@ |
364 |
|
Doxygen = @DOXYGEN@ |
282 |
– |
Ps = @PS@ |
283 |
– |
PsType = @PSTYPE@ |
365 |
|
|
366 |
|
MakeOptions = -k |
367 |
|
MakeDependOptions = |
371 |
|
JniOptions = |
372 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
373 |
|
-sourcepath $(SourceDir) |
374 |
< |
COptions = $(FrcDeclare) @CFLAGS@ -DPS=$(Ps) -DPSTYPE=$(PsType) |
374 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
375 |
|
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
376 |
|
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
377 |
|
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
422 |
|
InstallFiles = $(Executable) |
423 |
|
endif |
424 |
|
InstallCommand = $(InstallProgram) |
425 |
+ |
ifneq "$(words $(LinkTargets))" "0" |
426 |
+ |
MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main)) |
427 |
+ |
MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets)) |
428 |
+ |
endif |
429 |
|
endif |
430 |
|
|
431 |
|
ifneq "$(words $(ForcefieldFiles))" "0" |
462 |
|
$(MkDir) $@ |
463 |
|
|
464 |
|
# .c -> .o |
465 |
< |
$(PackageTargetDir)/%.o : %.c |
465 |
> |
$(PackageTargetDir)/%.o : %.c $(MainMakefile) |
466 |
|
$(Print) $@ |
467 |
|
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
468 |
|
|
469 |
< |
$(PackageParallelTargetDir)/%.o : %.c |
469 |
> |
$(PackageParallelTargetDir)/%.o : %.c $(MainMakefile) |
470 |
|
$(Print) $@ |
471 |
|
$(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@ |
472 |
|
|
473 |
|
ifeq "$(UseMPI)" "yes" |
474 |
< |
%.o : %.c |
474 |
> |
%.o : %.c $(MainMakefile) |
475 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
476 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
477 |
|
else |
478 |
< |
%.o : %.c |
478 |
> |
%.o : %.c $(MainMakefile) |
479 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
480 |
|
endif |
481 |
|
|
482 |
|
# .cpp -> .o |
483 |
< |
$(PackageTargetDir)/%.o : %.cpp |
483 |
> |
$(PackageTargetDir)/%.o : %.cpp $(MainMakefile) |
484 |
|
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
485 |
|
|
486 |
< |
$(PackageParallelTargetDir)/%.o : %.cpp |
486 |
> |
$(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile) |
487 |
|
$(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@ |
488 |
|
|
489 |
|
ifeq "$(UseMPI)" "yes" |
490 |
< |
%.o : %.cpp |
490 |
> |
%.o : %.cpp $(MainMakefile) |
491 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
492 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
493 |
|
else |
494 |
< |
%.o : %.cpp |
494 |
> |
%.o : %.cpp $(MainMakefile) |
495 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
496 |
|
endif |
497 |
|
|
498 |
|
# .f -> .o |
499 |
< |
$(PackageTargetDir)/%.o : %.f |
499 |
> |
$(PackageTargetDir)/%.o : %.f $(MainMakefile) |
500 |
|
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
501 |
|
|
502 |
< |
$(PackageParallelTargetDir)/%.o : %.f |
502 |
> |
$(PackageParallelTargetDir)/%.o : %.f $(MainMakefile) |
503 |
|
$(FortranCompiler) $(FortranParallelOptions) -c $< -o $@ |
504 |
|
|
505 |
|
ifeq "$(UseMPI)" "yes" |
506 |
< |
%.o : %.f |
506 |
> |
%.o : %.f $(MainMakefile) |
507 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
508 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
509 |
|
else |
510 |
< |
%.o : %.f |
510 |
> |
%.o : %.f $(MainMakefile) |
511 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
512 |
|
endif |
513 |
|
|
514 |
|
# .F90 -> .o |
515 |
< |
$(PackageTargetDir)/%.o : %.F90 |
515 |
> |
$(PackageTargetDir)/%.o : %.F90 $(MainMakefile) |
516 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
517 |
|
if test -n "`ls *.$(ModSuffix)`"; then \ |
518 |
|
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
519 |
|
fi |
520 |
|
|
521 |
< |
$(PackageParallelTargetDir)/%.o : %.F90 |
521 |
> |
$(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile) |
522 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
523 |
|
if test -n "`ls *.$(ModSuffix)`"; then \ |
524 |
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
525 |
|
fi |
526 |
|
|
527 |
|
ifeq "$(UseMPI)" "yes" |
528 |
< |
%.o : %.F90 |
528 |
> |
%.o : %.F90 $(MainMakefile) |
529 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
530 |
|
if test -n "`ls *.$(ModSuffix)`"; then\ |
531 |
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
537 |
|
fi |
538 |
|
|
539 |
|
else |
540 |
< |
%.o : %.F90 |
540 |
> |
%.o : %.F90 $(MainMakefile) |
541 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
542 |
|
if test -n "`ls *.$(ModSuffix)`"; then\ |
543 |
|
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
644 |
|
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
645 |
|
|
646 |
|
#GUN make funtions to merge the libraries |
647 |
< |
find_objs = $(shell $(StaticArchiver) -t $(1)) |
647 |
> |
find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF") |
648 |
|
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
649 |
|
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
650 |
|
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
651 |
|
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
652 |
+ |
do_link = $(shell $(LN_S) $(1) $(2)) |
653 |
+ |
all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib))) |
654 |
+ |
all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib))) |
655 |
+ |
all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs)) |
656 |
+ |
all_lib_parallel_objs = $(patsubst %,$(TargetDir)/%,$(call all_parallel_objs)) |
657 |
|
|
658 |
|
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
659 |
< |
$(Print) create $@ |
660 |
< |
$(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@)) |
659 |
> |
$(Print) creating $@ |
660 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs) |
661 |
|
$(Ranlib) $(CombinedStaticLib) |
662 |
|
|
663 |
|
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
664 |
< |
$(Print) create $@ |
665 |
< |
$(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@)) |
664 |
> |
$(Print) creating $@ |
665 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs) |
666 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
667 |
|
|
668 |
|
# Executable |
713 |
|
$(Executable) |
714 |
|
endif |
715 |
|
|
716 |
+ |
echo : $(PackageListLoop) |
717 |
+ |
$(Print) Done echo. |
718 |
|
|
719 |
+ |
_echoall : |
720 |
+ |
$(Print) $(Modules) |
721 |
+ |
|
722 |
|
# make clean |
723 |
|
clean : $(PackageListLoop) |
724 |
|
$(Print) Done clean. |
725 |
|
|
726 |
|
_cleanall : |
727 |
< |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
727 |
> |
$(Delete) \ |
728 |
> |
$(ObjectFiles) \ |
729 |
> |
$(ModuleFiles) \ |
730 |
> |
$(ParallelObjectFiles) \ |
731 |
> |
$(ParallelModuleFiles) \ |
732 |
> |
$(JarFile) \ |
733 |
> |
$(SharedLibrary) \ |
734 |
> |
$(StaticLibrary) \ |
735 |
> |
$(ParallelSharedLibrary) \ |
736 |
> |
$(ParallelStaticLibrary) \ |
737 |
> |
$(CombinedStaticLib) \ |
738 |
> |
$(CombinedParallelStaticLib) |
739 |
|
|
740 |
|
# make distclean |
741 |
|
distclean : $(PackageListLoop) |
742 |
|
$(Print) Done clean. |
743 |
|
|
744 |
< |
_distcleanall : |
745 |
< |
$(Delete) $(ObjectFiles) \ |
640 |
< |
$(ParallelObjectFiles) \ |
641 |
< |
$(JarFile) \ |
642 |
< |
$(SharedLibrary) \ |
643 |
< |
$(StaticLibrary) \ |
644 |
< |
$(ParallelSharedLibrary) \ |
645 |
< |
$(ParallelStaticLibrary) \ |
646 |
< |
$(Executable) \ |
744 |
> |
_distcleanall : _cleanall |
745 |
> |
$(Delete) $(Executable) \ |
746 |
|
$(ParallelExecutable) \ |
747 |
|
$(DependencyFile) |
748 |
|
|
650 |
– |
|
749 |
|
# make depend |
750 |
|
depend : $(PackageListLoop) |
751 |
|
$(Print) Done dependencies. |
813 |
|
install : $(InstallListLoop) |
814 |
|
$(Print) Done Install |
815 |
|
|
816 |
< |
_installall : _buildall _installdata |
816 |
> |
_installall : _buildall _installdata _installlinks |
817 |
|
|
818 |
|
$(MyInstallDir) : |
819 |
|
$(MkDir) $@ |
821 |
|
_installdata : $(MyInstallDir) |
822 |
|
$(Print) $(InstallFiles) |
823 |
|
ifneq "$(words $(InstallFiles))" "0" |
824 |
< |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
824 |
> |
$(InstallCommand) $(InstallFiles) $(MyInstallDir) |
825 |
|
endif |
826 |
|
|
827 |
+ |
_installlinks : $(MyInstallDir) |
828 |
+ |
ifneq "$(words $(MyLinkTargets))" "0" |
829 |
+ |
@cd $(MyInstallDir) |
830 |
+ |
$(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink))) |
831 |
+ |
endif |
832 |
+ |
|
833 |
|
# make statistics |
834 |
|
_statisticsall : |
835 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
840 |
|
$(Print) Done statistics. |
841 |
|
|
842 |
|
# make pure |
843 |
< |
$(Executable).pure : |
844 |
< |
$(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
845 |
< |
$(LibList) $(ObjectFiles) -o $@ |
843 |
> |
#$(Executable).pure : |
844 |
> |
# $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
845 |
> |
# $(LibList) $(ObjectFiles) -o $@ |
846 |
> |
# |
847 |
> |
#pure : $(Executable).pure |
848 |
|
|
743 |
– |
pure : $(Executable).pure |
744 |
– |
|
849 |
|
#make cvslog |
850 |
|
cvslog: |
851 |
< |
$(DEV_ROOT)/scripts/cvs2cl.pl |
851 |
> |
$(DEV_ROOT)/scripts/cvs2cl |
852 |
|
|
853 |
|
# Execute |
854 |
|
_runexe : |