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