34 |
|
# |
35 |
|
#--------------------------------------------------------------------------- |
36 |
|
IS_UNIX=1 |
37 |
< |
#packages to be made |
38 |
< |
Packages = \ |
37 |
> |
|
38 |
> |
#packages containing libraries |
39 |
> |
PackageLibs = \ |
40 |
|
utils \ |
41 |
+ |
visitors \ |
42 |
|
math \ |
43 |
|
types \ |
44 |
|
primitives \ |
43 |
– |
visitors \ |
45 |
|
UseTheForce/DarkSide \ |
46 |
|
UseTheForce \ |
47 |
|
brains \ |
48 |
|
io \ |
49 |
< |
integrators \ |
49 |
< |
minimizers \ |
49 |
> |
integrators\ |
50 |
|
constraints \ |
51 |
< |
profiling \ |
52 |
< |
restraints \ |
51 |
> |
minimizers \ |
52 |
> |
selection \ |
53 |
> |
|
54 |
> |
#packages containing applications |
55 |
> |
Applications = \ |
56 |
|
applications/oopse \ |
57 |
|
applications/dump2Xyz \ |
58 |
< |
applications/simpleBuilder \ |
58 |
> |
applications/simpleBuilder\ |
59 |
|
|
60 |
< |
#packages contain libraries |
61 |
< |
PackageLibs = \ |
62 |
< |
utils \ |
63 |
< |
math \ |
64 |
< |
types \ |
65 |
< |
primitives \ |
66 |
< |
visitors \ |
67 |
< |
UseTheForce/DarkSide \ |
68 |
< |
UseTheForce \ |
69 |
< |
brains \ |
70 |
< |
io \ |
71 |
< |
integrators \ |
72 |
< |
minimizers \ |
70 |
< |
constraints \ |
71 |
< |
profiling \ |
72 |
< |
restraints \ |
60 |
> |
Samples = \ |
61 |
> |
samples/argon \ |
62 |
> |
samples/water/dimer \ |
63 |
> |
samples/water/spce \ |
64 |
> |
samples/water/ssd \ |
65 |
> |
samples/water/ssde \ |
66 |
> |
samples/water/tip3p_ice \ |
67 |
> |
samples/water/tip4p \ |
68 |
> |
samples/lipid \ |
69 |
> |
samples/alkane \ |
70 |
> |
samples/minimizer \ |
71 |
> |
samples/metals \ |
72 |
> |
samples/zcons \ |
73 |
|
|
74 |
|
IncludeDirs = \ |
75 |
|
@SPRNG_INC_DIR@ \ |
84 |
|
@MPI_LIB@ \ |
85 |
|
@MPI_F90_LIB@ |
86 |
|
|
87 |
– |
LinkOptions = \ |
88 |
– |
@F90LIBS@ |
89 |
– |
|
87 |
|
OopseHome = @OOPSE_HOME@ |
88 |
< |
ForceParamDir = @OOPSE_HOME@/share/forceFields/ |
89 |
< |
SampleSimDir = @OOPSE_HOME@/share/samples/ |
88 |
> |
ForceParamDir = $(OopseHome)/share/forceFields |
89 |
> |
SampleSimDir = $(OopseHome)/share/samples |
90 |
> |
InstallBinDir = $(OopseHome)/bin |
91 |
> |
DocDir = $(OopseHome)/doc |
92 |
|
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
93 |
+ |
F90Declare = -D__FORTRAN90 |
94 |
|
ParallelDeclare = -DIS_MPI |
95 |
|
UseMPI = @USE_MPI@ |
96 |
+ |
ModuleCase = @F90_MODULE_NAMES@ |
97 |
+ |
ModSuffix = @MOD@ |
98 |
+ |
LinkOptions = \ |
99 |
+ |
@F90LIBS@ |
100 |
|
|
101 |
+ |
ParallelLinkOptions = \ |
102 |
+ |
@F90LIBS@ |
103 |
+ |
|
104 |
+ |
|
105 |
|
#--------------------------------------------------------------------------- |
106 |
|
# |
107 |
|
# Directories |
112 |
|
TargetDir = $(DEV_ROOT)/obj |
113 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
114 |
|
LibDir = $(DEV_ROOT)/lib |
107 |
– |
ParallelLibDir = $(DEV_ROOT)/MPIlib |
115 |
|
MakeDir = $(DEV_ROOT)/make |
116 |
|
BinDir = $(DEV_ROOT)/bin |
117 |
|
DocsDir = $(DEV_ROOT)/docs |
118 |
|
CurrentDir = $(CURDIR) |
119 |
+ |
CombinedStaticLib = $(LibDir)/libOOPSE.a |
120 |
+ |
CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a |
121 |
|
|
122 |
|
ifdef Source |
123 |
|
#get the relative path of current package to source directory |
124 |
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
125 |
|
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
126 |
|
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
127 |
< |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
127 |
> |
#Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
128 |
> |
# REMINDER: We are now using the Package line in each subdir makefile. |
129 |
> |
# This avoids the strange path problem and the subshell |
130 |
|
|
131 |
|
PackageList = $(Package) |
132 |
|
PackageSourceDir = $(SourceDir)/$(Package) |
134 |
|
PackageParallelTargetDir = $(ParallelTargetDir) |
135 |
|
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
136 |
|
else |
137 |
< |
PackageList = $(Packages) $(JavaPackages) |
137 |
> |
PackageList = $(PackageLibs) $(JavaPackages) $(Applications) |
138 |
|
endif |
139 |
|
|
140 |
|
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
220 |
|
Executable = $(BinDir)/$(Main) |
221 |
|
ParallelExecutable = $(BinDir)/$(Main)_MPI |
222 |
|
else |
223 |
< |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
224 |
< |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
225 |
< |
ParallelSharedLibrary = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
226 |
< |
ParallelStaticLibrary = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
223 |
> |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
224 |
> |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
225 |
> |
ParallelSharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so |
226 |
> |
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
227 |
|
endif |
228 |
|
endif |
229 |
+ |
|
230 |
|
# |
231 |
|
# Misc |
232 |
|
# |
234 |
|
JavaPackageNames = $(subst /,.,$(JavaPackages)) |
235 |
|
IncludePath = -I$(SourceDir) $(IncludeDirs:%=-I%) |
236 |
|
LibDirs = -L$(LibDir) $(LibraryDirs:%=-L%) |
237 |
< |
ParallelLibDirs = -L$(ParallelLibDir) $(LibraryDirs:%=-L%) |
238 |
< |
LocalLibs = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
227 |
< |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
237 |
> |
LocalLibs = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs))) |
238 |
> |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs))) |
239 |
|
LibList = $(LocalLibs:%=-l%) $(Libraries) |
240 |
+ |
LibNames = $(LocalLibs:%=$(LibDir)/lib%.a) |
241 |
|
ParallelLibList = $(ParallelLocalLibs:%=-l%) $(Libraries) |
242 |
+ |
ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a) |
243 |
|
|
244 |
|
|
245 |
|
#--------------------------------------------------------------------------- |
248 |
|
# |
249 |
|
#--------------------------------------------------------------------------- |
250 |
|
Print = @echo |
251 |
< |
Move = mv |
251 |
> |
Move = mv -f |
252 |
|
Copy = cp |
253 |
|
CCompiler = @CC@ |
254 |
|
CppCompiler = @CXX@ |
255 |
|
Linker = @CXX@ |
256 |
|
MakeDepend = makedepend |
257 |
< |
Install = @INSTALL@ |
257 |
> |
INSTALL = @INSTALL@ |
258 |
|
InstallProgram = @INSTALL_PROGRAM@ |
259 |
|
InstallData = @INSTALL_DATA@ |
260 |
< |
MakeDir = @MKINSTALLDIRS@ |
260 |
> |
MkDir = @MKINSTALLDIRS@ |
261 |
|
Delete = rm -fr |
262 |
|
StaticArchiver = @AR@ |
263 |
|
DynamicArchiver = @CC@ |
275 |
|
List = cat |
276 |
|
Yacc = @YACC@ |
277 |
|
Lex = @LEX@ |
278 |
+ |
Ranlib = @RANLIB@ |
279 |
+ |
Doxygen = @DOXYGEN@ |
280 |
|
|
266 |
– |
|
281 |
|
MakeOptions = -k |
282 |
|
MakeDependOptions = |
283 |
|
StaticArchiverOptions = rc |
286 |
|
JniOptions = |
287 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
288 |
|
-sourcepath $(SourceDir) |
289 |
< |
COptions = $(FrcDeclare) |
290 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
291 |
< |
CppOptions = $(FrcDeclare) |
292 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
289 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
290 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
291 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
292 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@ |
293 |
|
FortranOptions = |
294 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
295 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
294 |
> |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
295 |
> |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
296 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
297 |
|
-sourcepath $(SourceDir) -deprecation |
298 |
|
JavaRunOptions = -classpath $(ClassPath) |
314 |
|
|
315 |
|
Empty = |
316 |
|
Space = $(Empty) $(Empty) |
317 |
+ |
|
318 |
+ |
|
319 |
+ |
#--------------------------------------------------------------------------- |
320 |
+ |
# |
321 |
+ |
# Install |
322 |
+ |
# |
323 |
+ |
#--------------------------------------------------------------------------- |
324 |
+ |
|
325 |
+ |
ifneq "$(words $(SampleFiles))" "0" |
326 |
+ |
MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) |
327 |
+ |
MyInstallDir = $(SampleSimDir)/$(MySample) |
328 |
+ |
InstallFiles = $(SampleFiles) |
329 |
+ |
InstallCommand = $(InstallData) |
330 |
+ |
endif |
331 |
+ |
|
332 |
+ |
ifneq "$(words $(Main))" "0" |
333 |
+ |
MyInstallDir = $(InstallBinDir) |
334 |
+ |
ifeq "$(UseMPI)" "yes" |
335 |
+ |
InstallFiles = $(Executable) $(ParallelExecutable) |
336 |
+ |
else |
337 |
+ |
InstallFiles = $(Executable) |
338 |
+ |
endif |
339 |
+ |
InstallCommand = $(InstallProgram) |
340 |
+ |
endif |
341 |
+ |
|
342 |
+ |
ifneq "$(words $(ForcefieldFiles))" "0" |
343 |
+ |
MyInstallDir = $(ForceParamDir) |
344 |
+ |
InstallFiles = $(ForcefieldFiles) |
345 |
+ |
InstallCommand = $(InstallData) |
346 |
+ |
endif |
347 |
+ |
|
348 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
349 |
+ |
InstallList = |
350 |
+ |
else |
351 |
+ |
InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) |
352 |
+ |
endif |
353 |
+ |
|
354 |
+ |
InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) |
355 |
+ |
|
356 |
|
|
357 |
|
|
358 |
|
#--------------------------------------------------------------------------- |
367 |
|
|
368 |
|
# Create target directory |
369 |
|
$(PackageTargetDir) : |
370 |
< |
$(MakeDir) $@ |
370 |
> |
$(MkDir) $@ |
371 |
|
|
372 |
+ |
$(BinDir) : |
373 |
+ |
$(MkDir) $@ |
374 |
+ |
|
375 |
|
# .c -> .o |
376 |
|
$(PackageTargetDir)/%.o : %.c |
377 |
|
$(Print) $@ |
425 |
|
# .F90 -> .o |
426 |
|
$(PackageTargetDir)/%.o : %.F90 |
427 |
|
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
428 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then \ |
429 |
+ |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
430 |
+ |
fi |
431 |
|
|
432 |
|
$(PackageParallelTargetDir)/%.o : %.F90 |
433 |
|
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
434 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then \ |
435 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
436 |
+ |
fi |
437 |
|
|
438 |
|
ifeq "$(UseMPI)" "yes" |
439 |
|
%.o : %.F90 |
440 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
441 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
442 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
443 |
+ |
fi |
444 |
+ |
|
445 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
446 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
447 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
448 |
+ |
fi |
449 |
+ |
|
450 |
|
else |
451 |
|
%.o : %.F90 |
452 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
453 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
454 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
455 |
+ |
fi |
456 |
|
endif |
457 |
|
|
458 |
|
|
490 |
|
|
491 |
|
# .o -> .a |
492 |
|
|
493 |
< |
$(LibDir)/%.a : $(ObjectFiles) |
493 |
> |
$(LibDir)/%_UP.a : $(ObjectFiles) |
494 |
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
495 |
+ |
@touch $(LibDir)/.stamp_UP |
496 |
|
|
497 |
< |
$(ParallelLibDir)/%.a: $(ParallelObjectFiles) |
497 |
> |
$(LibDir)/%_MPI.a: $(ParallelObjectFiles) |
498 |
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
499 |
+ |
@touch $(LibDir)/.stamp_MPI |
500 |
|
|
501 |
< |
ifeq "$(UseMPI)" "yes" |
427 |
< |
%.a : $(ObjectFiles) $(ParallelObjectFiles) |
501 |
> |
%_UP.a : $(ObjectFiles) |
502 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
503 |
< |
$(MAKE) $(MakeOptions) $(ParallelLibDir)/$@ |
504 |
< |
else |
431 |
< |
%.a : $(ObjectFiles) |
503 |
> |
|
504 |
> |
%_MPI.a : $(ParallelObjectFiles) |
505 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
433 |
– |
endif |
506 |
|
|
507 |
|
# .o -> .so |
508 |
< |
$(LibDir)/%.so : $(ObjectFiles) |
508 |
> |
$(LibDir)/%_UP.so : $(ObjectFiles) |
509 |
|
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
510 |
|
|
511 |
< |
$(ParallelLibDir)/%.so : $(ParallelObjectFiles) |
511 |
> |
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
512 |
|
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
513 |
|
|
514 |
< |
ifeq "$(UseMPI)" "yes" |
443 |
< |
%.so : $(ObjectFiles) $(ParallelObjectFiles) |
514 |
> |
%_UP.so : $(ObjectFiles) |
515 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
516 |
< |
$(MAKE) $(MakeOptions) $(ParallelLibDir)/$@ |
517 |
< |
else |
447 |
< |
%.so : $(ObjectFiles) |
516 |
> |
|
517 |
> |
%_MPI.so : $(ParallelObjectFiles) |
518 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
449 |
– |
endif |
519 |
|
|
520 |
|
# .class -> .jar |
521 |
|
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
549 |
|
%_Skel.class : %.class |
550 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
551 |
|
|
552 |
< |
# Executable |
553 |
< |
$(Executable) : $(ObjectFiles) |
554 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(LibList) $(LibList) $(LibList) -o $@ |
552 |
> |
document : |
553 |
> |
$(Print) Generate Documentation for OOPSE-2.0 |
554 |
> |
@cd $(DEV_ROOT)/src |
555 |
> |
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
556 |
|
|
557 |
< |
$(ParallelExecutable) : $(ParallelObjectFiles) |
558 |
< |
$(Linker) $(ParallelObjectFiles) $(LinkOptions) $(ParallelLibDirs) $(ParallelLibList) $(ParallelLibList) $(ParallelLibList) -o $@ |
557 |
> |
#GUN make funtions to merge the libraries |
558 |
> |
find_objs = $(shell $(StaticArchiver) -t $(1)) |
559 |
> |
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
560 |
> |
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
561 |
> |
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
562 |
> |
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
563 |
|
|
564 |
+ |
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
565 |
+ |
$(Print) create $@ |
566 |
+ |
$(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@)) |
567 |
+ |
$(Ranlib) $(CombinedStaticLib) |
568 |
+ |
|
569 |
+ |
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
570 |
+ |
$(Print) create $@ |
571 |
+ |
$(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@)) |
572 |
+ |
$(Ranlib) $(CombinedParallelStaticLib) |
573 |
+ |
|
574 |
+ |
# Executable |
575 |
+ |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir) |
576 |
+ |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
577 |
+ |
|
578 |
+ |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir) |
579 |
+ |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
580 |
+ |
|
581 |
|
# Anything else is just copied from source to target |
582 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
583 |
|
$(Print) $@ |
589 |
|
|
590 |
|
_all : _buildall |
591 |
|
|
592 |
+ |
_buildall : |
593 |
|
ifeq "$(UseMPI)" "yes" |
594 |
|
_buildall : \ |
595 |
|
$(DependencyFile) \ |
654 |
|
$(Print) $@ |
655 |
|
@cd $(PackageSourceDir) |
656 |
|
|
565 |
– |
@touch Make.ctemp |
566 |
– |
@touch Make.ctemp |
567 |
– |
|
657 |
|
ifneq "$(words $(CppFiles))" "0" |
658 |
< |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
659 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
660 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
658 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
659 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
660 |
> |
$(Delete) Make.cpptemp |
661 |
> |
|
662 |
> |
ifeq "$(UseMPI)" "yes" |
663 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
664 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
665 |
> |
@$(Delete) Make.cpptemp |
666 |
> |
endif |
667 |
> |
|
668 |
|
endif |
669 |
|
|
670 |
|
ifneq "$(words $(CFiles))" "0" |
671 |
< |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
672 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
673 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
671 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
672 |
> |
@cat Make.ctemp >> $(DependencyFile) |
673 |
> |
$(Delete) Make.ctemp |
674 |
|
|
675 |
+ |
ifeq "$(UseMPI)" "yes" |
676 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
677 |
+ |
@cat Make.ctemp >> $(DependencyFile) |
678 |
+ |
@$(Delete) Make.ctemp |
679 |
+ |
endif |
680 |
+ |
|
681 |
|
endif |
682 |
|
|
683 |
|
ifneq "$(words $(F90Files))" "0" |
684 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90 $(F90Files) > Make.ftemp |
685 |
< |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90 $(F90Files) >> Make.ftemp |
686 |
< |
cat Make.ftemp >> $(DependencyFile) |
684 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
685 |
> |
@cat Make.ftemp >> $(DependencyFile) |
686 |
> |
@$(Delete) Make.ftemp |
687 |
> |
|
688 |
> |
ifeq "$(UseMPI)" "yes" |
689 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
690 |
> |
@cat Make.ftemp >> $(DependencyFile) |
691 |
> |
@$(Delete) Make.ftemp |
692 |
> |
endif |
693 |
> |
|
694 |
|
endif |
586 |
– |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
695 |
|
|
696 |
|
# make lib |
697 |
|
lib : $(PackageListLoop) |
704 |
|
jarsign : $(JarFile) |
705 |
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
706 |
|
|
707 |
+ |
#make install |
708 |
+ |
%.install : |
709 |
+ |
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
710 |
+ |
|
711 |
+ |
install : $(InstallListLoop) |
712 |
+ |
$(Print) Done Install |
713 |
+ |
|
714 |
+ |
_installall : _buildall _installdata |
715 |
+ |
|
716 |
+ |
$(MyInstallDir) : |
717 |
+ |
$(MkDir) $@ |
718 |
+ |
|
719 |
+ |
_installdata : $(MyInstallDir) |
720 |
+ |
$(Print) $(InstallFiles) |
721 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
722 |
+ |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
723 |
+ |
endif |
724 |
+ |
|
725 |
|
# make statistics |
726 |
|
_statisticsall : |
727 |
< |
@$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp |
727 |
> |
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
728 |
|
|
729 |
|
statistics : $(PackageListLoop) |
730 |
|
@$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions) |