86 |
|
@MPI_F90_LIB@ |
87 |
|
|
88 |
|
OopseHome = @OOPSE_HOME@ |
89 |
< |
ForceParamDir = @OOPSE_HOME@/share/forceFields/ |
90 |
< |
SampleSimDir = @OOPSE_HOME@/share/samples/ |
89 |
> |
ForceParamDir = @OOPSE_HOME@/share/forceFields |
90 |
> |
SampleSimDir = @OOPSE_HOME@/share/samples |
91 |
> |
InstallBinDir = @OOPSE_HOME@/bin |
92 |
> |
DocDir = @OOPSE_HOME@/doc |
93 |
|
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
94 |
|
F90Declare = -D__FORTRAN90 |
95 |
|
ParallelDeclare = -DIS_MPI |
225 |
|
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
226 |
|
endif |
227 |
|
endif |
228 |
+ |
|
229 |
|
# |
230 |
|
# Misc |
231 |
|
# |
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 |
|
|
276 |
– |
|
280 |
|
MakeOptions = -k |
281 |
|
MakeDependOptions = |
282 |
|
StaticArchiverOptions = rc |
313 |
|
|
314 |
|
Empty = |
315 |
|
Space = $(Empty) $(Empty) |
316 |
+ |
|
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 |
528 |
|
%_Skel.class : %.class |
529 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
530 |
|
|
531 |
+ |
document : |
532 |
+ |
$(Print) Generate Documentation for OOPSE-2.0 |
533 |
+ |
@cd $(DEV_ROOT)/src |
534 |
+ |
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
535 |
+ |
|
536 |
|
#GUN make funtions to merge the libraries |
537 |
|
find_objs = $(shell $(StaticArchiver) -t $(1)) |
538 |
|
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
568 |
|
|
569 |
|
_all : _buildall |
570 |
|
|
571 |
+ |
_buildall : |
572 |
|
ifeq "$(UseMPI)" "yes" |
573 |
|
_buildall : \ |
574 |
|
$(DependencyFile) \ |
635 |
|
|
636 |
|
ifneq "$(words $(CppFiles))" "0" |
637 |
|
$(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
638 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
638 |
> |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
639 |
|
$(Delete) Make.cpptemp |
640 |
|
$(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
641 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
642 |
< |
$(Delete) Make.cpptemp |
641 |
> |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
642 |
> |
@$(Delete) Make.cpptemp |
643 |
|
endif |
644 |
|
|
645 |
|
ifneq "$(words $(CFiles))" "0" |
646 |
|
$(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
647 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
647 |
> |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
648 |
|
$(Delete) Make.ctemp |
649 |
|
$(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
650 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
651 |
< |
$(Delete) Make.ctemp |
650 |
> |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
651 |
> |
@$(Delete) Make.ctemp |
652 |
|
endif |
653 |
|
|
654 |
|
ifneq "$(words $(F90Files))" "0" |
655 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) $(F90Files) > Make.ftemp |
656 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) $(F90Files) >> Make.ftemp |
657 |
< |
cat Make.ftemp >> $(DependencyFile) |
658 |
< |
$(Delete) Make.ftemp |
655 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
656 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
657 |
> |
@cat Make.ftemp >> $(DependencyFile) |
658 |
> |
@$(Delete) Make.ftemp |
659 |
|
endif |
660 |
|
|
661 |
|
# make lib |
669 |
|
jarsign : $(JarFile) |
670 |
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
671 |
|
|
672 |
+ |
#make install |
673 |
+ |
%.install : |
674 |
+ |
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
675 |
+ |
|
676 |
+ |
install : $(InstallListLoop) |
677 |
+ |
$(Print) Done Install |
678 |
+ |
|
679 |
+ |
_installall : _buildall _installdata |
680 |
+ |
|
681 |
+ |
$(MyInstallDir) : |
682 |
+ |
$(MkDir) $@ |
683 |
+ |
|
684 |
+ |
_installdata : $(MyInstallDir) |
685 |
+ |
$(Print) $(InstallFiles) |
686 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
687 |
+ |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
688 |
+ |
endif |
689 |
+ |
|
690 |
|
# make statistics |
691 |
|
_statisticsall : |
692 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |