41 |
|
math \ |
42 |
|
types \ |
43 |
|
primitives \ |
44 |
– |
visitors \ |
44 |
|
UseTheForce/DarkSide \ |
45 |
|
UseTheForce \ |
46 |
|
brains \ |
47 |
|
io \ |
49 |
– |
integrators \ |
50 |
– |
minimizers \ |
48 |
|
constraints \ |
49 |
|
profiling \ |
50 |
|
restraints \ |
55 |
|
applications/dump2Xyz \ |
56 |
|
applications/simpleBuilder |
57 |
|
|
58 |
+ |
Samples = \ |
59 |
+ |
samples/argon \ |
60 |
+ |
samples/water/dimer \ |
61 |
+ |
samples/water/spce \ |
62 |
+ |
samples/water/ssd \ |
63 |
+ |
samples/water/ssde \ |
64 |
+ |
samples/water/tip3p_ice \ |
65 |
+ |
samples/water/tip4p \ |
66 |
+ |
samples/lipid \ |
67 |
+ |
samples/alkane \ |
68 |
+ |
samples/minimizer \ |
69 |
+ |
samples/metals \ |
70 |
+ |
samples/zcons \ |
71 |
+ |
|
72 |
|
IncludeDirs = \ |
73 |
|
@SPRNG_INC_DIR@ \ |
74 |
|
@MPI_INC_DIR@ |
83 |
|
@MPI_F90_LIB@ |
84 |
|
|
85 |
|
OopseHome = @OOPSE_HOME@ |
86 |
< |
ForceParamDir = @OOPSE_HOME@/share/forceFields/ |
87 |
< |
SampleSimDir = @OOPSE_HOME@/share/samples/ |
86 |
> |
ForceParamDir = $(OopseHome)/share/forceFields |
87 |
> |
SampleSimDir = $(OopseHome)/share/samples |
88 |
> |
InstallBinDir = $(OopseHome)/bin |
89 |
> |
DocDir = $(OopseHome)/doc |
90 |
|
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
91 |
+ |
F90Declare = -D__FORTRAN90 |
92 |
|
ParallelDeclare = -DIS_MPI |
93 |
|
UseMPI = @USE_MPI@ |
94 |
+ |
ModuleCase = @F90_MODULE_NAMES@ |
95 |
+ |
ModSuffix = @MOD@ |
96 |
|
LinkOptions = \ |
97 |
|
@F90LIBS@ |
98 |
|
|
110 |
|
TargetDir = $(DEV_ROOT)/obj |
111 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
112 |
|
LibDir = $(DEV_ROOT)/lib |
97 |
– |
ParallelLibDir = $(DEV_ROOT)/MPIlib |
113 |
|
MakeDir = $(DEV_ROOT)/make |
114 |
|
BinDir = $(DEV_ROOT)/bin |
115 |
|
DocsDir = $(DEV_ROOT)/docs |
222 |
|
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
223 |
|
endif |
224 |
|
endif |
225 |
+ |
|
226 |
|
# |
227 |
|
# Misc |
228 |
|
# |
250 |
|
CppCompiler = @CXX@ |
251 |
|
Linker = @CXX@ |
252 |
|
MakeDepend = makedepend |
253 |
< |
Install = @INSTALL@ |
253 |
> |
INSTALL = @INSTALL@ |
254 |
|
InstallProgram = @INSTALL_PROGRAM@ |
255 |
|
InstallData = @INSTALL_DATA@ |
256 |
< |
MakeDir = @MKINSTALLDIRS@ |
256 |
> |
MkDir = @MKINSTALLDIRS@ |
257 |
|
Delete = rm -fr |
258 |
|
StaticArchiver = @AR@ |
259 |
|
DynamicArchiver = @CC@ |
272 |
|
Yacc = @YACC@ |
273 |
|
Lex = @LEX@ |
274 |
|
Ranlib = @RANLIB@ |
275 |
+ |
Doxygen = @DOXYGEN@ |
276 |
|
|
260 |
– |
|
277 |
|
MakeOptions = -k |
278 |
|
MakeDependOptions = |
279 |
|
StaticArchiverOptions = rc |
282 |
|
JniOptions = |
283 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
284 |
|
-sourcepath $(SourceDir) |
285 |
< |
COptions = $(FrcDeclare) |
286 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
287 |
< |
CppOptions = $(FrcDeclare) |
288 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
285 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
286 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
287 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
288 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
289 |
|
FortranOptions = |
290 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
291 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
290 |
> |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
291 |
> |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
292 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
293 |
|
-sourcepath $(SourceDir) -deprecation |
294 |
|
JavaRunOptions = -classpath $(ClassPath) |
314 |
|
|
315 |
|
#--------------------------------------------------------------------------- |
316 |
|
# |
317 |
+ |
# Install |
318 |
+ |
# |
319 |
+ |
#--------------------------------------------------------------------------- |
320 |
+ |
|
321 |
+ |
ifneq "$(words $(SampleFiles))" "0" |
322 |
+ |
MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) |
323 |
+ |
MyInstallDir = $(SampleSimDir)/$(MySample) |
324 |
+ |
InstallFiles = $(SampleFiles) |
325 |
+ |
InstallCommand = $(InstallData) |
326 |
+ |
endif |
327 |
+ |
|
328 |
+ |
ifneq "$(words $(Main))" "0" |
329 |
+ |
MyInstallDir = $(InstallBinDir) |
330 |
+ |
ifeq "$(UseMPI)" "yes" |
331 |
+ |
InstallFiles = $(Executable) $(ParallelExecutable) |
332 |
+ |
else |
333 |
+ |
InstallFiles = $(Executable) |
334 |
+ |
endif |
335 |
+ |
InstallCommand = $(InstallProgram) |
336 |
+ |
endif |
337 |
+ |
|
338 |
+ |
ifneq "$(words $(ForcefieldFiles))" "0" |
339 |
+ |
MyInstallDir = $(ForceParamDir) |
340 |
+ |
InstallFiles = $(ForcefieldFiles) |
341 |
+ |
InstallCommand = $(InstallData) |
342 |
+ |
endif |
343 |
+ |
|
344 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
345 |
+ |
InstallList = |
346 |
+ |
else |
347 |
+ |
InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) |
348 |
+ |
endif |
349 |
+ |
|
350 |
+ |
InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) |
351 |
+ |
|
352 |
+ |
|
353 |
+ |
|
354 |
+ |
#--------------------------------------------------------------------------- |
355 |
+ |
# |
356 |
|
# Rules |
357 |
|
# |
358 |
|
#--------------------------------------------------------------------------- |
418 |
|
# .F90 -> .o |
419 |
|
$(PackageTargetDir)/%.o : %.F90 |
420 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
421 |
+ |
if test -f *.$(ModSuffix); then \ |
422 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
423 |
+ |
fi |
424 |
|
|
425 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
426 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
427 |
+ |
if test -f *.$(ModSuffix); then \ |
428 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
429 |
+ |
fi |
430 |
|
|
431 |
|
ifeq "$(UseMPI)" "yes" |
432 |
|
%.o : %.F90 |
433 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
434 |
+ |
if test -f *.$(ModSuffix); then \ |
435 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
436 |
+ |
fi |
437 |
+ |
|
438 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
439 |
+ |
if test -f *.$(ModSuffix); then \ |
440 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
441 |
+ |
fi |
442 |
+ |
|
443 |
|
else |
444 |
|
%.o : %.F90 |
445 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
446 |
+ |
if test -f *.$(ModSuffix); then \ |
447 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
448 |
+ |
fi |
449 |
+ |
|
450 |
|
endif |
451 |
|
|
452 |
|
|
543 |
|
%_Skel.class : %.class |
544 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
545 |
|
|
546 |
+ |
document : |
547 |
+ |
$(Print) Generate Documentation for OOPSE-2.0 |
548 |
+ |
@cd $(DEV_ROOT)/src |
549 |
+ |
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
550 |
+ |
|
551 |
|
#GUN make funtions to merge the libraries |
552 |
|
find_objs = $(shell $(StaticArchiver) -t $(1)) |
553 |
|
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
583 |
|
|
584 |
|
_all : _buildall |
585 |
|
|
586 |
+ |
_buildall : |
587 |
|
ifeq "$(UseMPI)" "yes" |
588 |
|
_buildall : \ |
589 |
|
$(DependencyFile) \ |
648 |
|
$(Print) $@ |
649 |
|
@cd $(PackageSourceDir) |
650 |
|
|
572 |
– |
@touch Make.ctemp |
573 |
– |
@touch Make.ctemp |
574 |
– |
|
651 |
|
ifneq "$(words $(CppFiles))" "0" |
652 |
< |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
653 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
654 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
652 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
653 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
654 |
> |
$(Delete) Make.cpptemp |
655 |
> |
|
656 |
> |
ifeq "$(UseMPI)" "yes" |
657 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
658 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
659 |
> |
@$(Delete) Make.cpptemp |
660 |
> |
endif |
661 |
> |
|
662 |
|
endif |
663 |
|
|
664 |
|
ifneq "$(words $(CFiles))" "0" |
665 |
< |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
666 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
667 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
665 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
666 |
> |
@cat Make.ctemp >> $(DependencyFile) |
667 |
> |
$(Delete) Make.ctemp |
668 |
|
|
669 |
+ |
ifeq "$(UseMPI)" "yes" |
670 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
671 |
+ |
@cat Make.ctemp >> $(DependencyFile) |
672 |
+ |
@$(Delete) Make.ctemp |
673 |
+ |
endif |
674 |
+ |
|
675 |
|
endif |
676 |
|
|
677 |
|
ifneq "$(words $(F90Files))" "0" |
678 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90 $(F90Files) > Make.ftemp |
679 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90 $(F90Files) >> Make.ftemp |
680 |
< |
cat Make.ftemp >> $(DependencyFile) |
678 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
679 |
> |
@cat Make.ftemp >> $(DependencyFile) |
680 |
> |
@$(Delete) Make.ftemp |
681 |
> |
|
682 |
> |
ifeq "$(UseMPI)" "yes" |
683 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
684 |
> |
@cat Make.ftemp >> $(DependencyFile) |
685 |
> |
@$(Delete) Make.ftemp |
686 |
> |
endif |
687 |
> |
|
688 |
|
endif |
593 |
– |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
689 |
|
|
690 |
|
# make lib |
691 |
|
lib : $(PackageListLoop) |
698 |
|
jarsign : $(JarFile) |
699 |
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
700 |
|
|
701 |
+ |
#make install |
702 |
+ |
%.install : |
703 |
+ |
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
704 |
+ |
|
705 |
+ |
install : $(InstallListLoop) |
706 |
+ |
$(Print) Done Install |
707 |
+ |
|
708 |
+ |
_installall : _buildall _installdata |
709 |
+ |
|
710 |
+ |
$(MyInstallDir) : |
711 |
+ |
$(MkDir) $@ |
712 |
+ |
|
713 |
+ |
_installdata : $(MyInstallDir) |
714 |
+ |
$(Print) $(InstallFiles) |
715 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
716 |
+ |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
717 |
+ |
endif |
718 |
+ |
|
719 |
|
# make statistics |
720 |
|
_statisticsall : |
721 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |