34 |
|
# |
35 |
|
#--------------------------------------------------------------------------- |
36 |
|
IS_UNIX=1 |
37 |
< |
#packages to be made |
38 |
< |
Packages = \ |
37 |
> |
|
38 |
> |
#packages containing libraries |
39 |
> |
PackageLibs = \ |
40 |
|
utils \ |
41 |
|
math \ |
42 |
|
types \ |
43 |
|
primitives \ |
43 |
– |
visitors \ |
44 |
|
UseTheForce/DarkSide \ |
45 |
|
UseTheForce \ |
46 |
|
brains \ |
47 |
|
io \ |
48 |
< |
integrators \ |
49 |
< |
minimizers \ |
50 |
< |
constraints \ |
51 |
< |
profiling \ |
52 |
< |
restraints \ |
48 |
> |
|
49 |
> |
#packages containing applications |
50 |
> |
Applications = \ |
51 |
|
applications/oopse \ |
52 |
|
applications/dump2Xyz \ |
53 |
< |
applications/simpleBuilder \ |
53 |
> |
applications/simpleBuilder |
54 |
|
|
55 |
< |
#packages contain libraries |
56 |
< |
PackageLibs = \ |
57 |
< |
utils \ |
58 |
< |
math \ |
59 |
< |
types \ |
60 |
< |
primitives \ |
61 |
< |
visitors \ |
62 |
< |
UseTheForce/DarkSide \ |
63 |
< |
UseTheForce \ |
64 |
< |
brains \ |
65 |
< |
io \ |
66 |
< |
integrators \ |
67 |
< |
minimizers \ |
70 |
< |
constraints \ |
71 |
< |
profiling \ |
72 |
< |
restraints \ |
55 |
> |
Samples = \ |
56 |
> |
samples/argon \ |
57 |
> |
samples/water/dimer \ |
58 |
> |
samples/water/spce \ |
59 |
> |
samples/water/ssd \ |
60 |
> |
samples/water/ssde \ |
61 |
> |
samples/water/tip3p_ice \ |
62 |
> |
samples/water/tip4p \ |
63 |
> |
samples/lipid \ |
64 |
> |
samples/alkane \ |
65 |
> |
samples/minimizer \ |
66 |
> |
samples/metals \ |
67 |
> |
samples/zcons \ |
68 |
|
|
69 |
|
IncludeDirs = \ |
70 |
< |
/usr/include \ |
71 |
< |
/usr/local/include |
70 |
> |
@SPRNG_INC_DIR@ \ |
71 |
> |
@MPI_INC_DIR@ |
72 |
|
|
73 |
|
LibraryDirs = \ |
74 |
< |
/usr/lib \ |
75 |
< |
/usr/local/mpich/lib \ |
81 |
< |
/usr/local/lib \ |
82 |
< |
/usr/local/intel/compiler80/lib \ |
74 |
> |
@SPRNG_LIB_DIR@ \ |
75 |
> |
@MPI_LIB_DIR@ |
76 |
|
|
77 |
|
Libraries = \ |
78 |
< |
mpich \ |
79 |
< |
sprng \ |
80 |
< |
ifcore \ |
78 |
> |
@SPRNG_LIB@ \ |
79 |
> |
@MPI_LIB@ \ |
80 |
> |
@MPI_F90_LIB@ |
81 |
|
|
82 |
+ |
OopseHome = @OOPSE_HOME@ |
83 |
+ |
ForceParamDir = $(OopseHome)/share/forceFields |
84 |
+ |
SampleSimDir = $(OopseHome)/share/samples |
85 |
+ |
InstallBinDir = $(OopseHome)/bin |
86 |
+ |
DocDir = $(OopseHome)/doc |
87 |
+ |
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
88 |
+ |
F90Declare = -D__FORTRAN90 |
89 |
+ |
ParallelDeclare = -DIS_MPI |
90 |
+ |
UseMPI = @USE_MPI@ |
91 |
+ |
ModuleCase = @F90_MODULE_NAMES@ |
92 |
+ |
ModSuffix = @MOD@ |
93 |
+ |
LinkOptions = \ |
94 |
+ |
@F90LIBS@ |
95 |
+ |
|
96 |
+ |
ParallelLinkOptions = \ |
97 |
+ |
@F90LIBS@ |
98 |
+ |
|
99 |
+ |
|
100 |
|
#--------------------------------------------------------------------------- |
101 |
|
# |
102 |
|
# Directories |
111 |
|
BinDir = $(DEV_ROOT)/bin |
112 |
|
DocsDir = $(DEV_ROOT)/docs |
113 |
|
CurrentDir = $(CURDIR) |
114 |
+ |
CombinedStaticLib = $(LibDir)/libOOPSE.a |
115 |
+ |
CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a |
116 |
|
|
117 |
|
ifdef Source |
118 |
|
#get the relative path of current package to source directory |
127 |
|
PackageParallelTargetDir = $(ParallelTargetDir) |
128 |
|
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
129 |
|
else |
130 |
< |
PackageList = $(Packages) $(JavaPackages) |
130 |
> |
PackageList = $(PackageLibs) $(JavaPackages) $(Applications) |
131 |
|
endif |
132 |
|
|
133 |
|
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
178 |
|
JniHeaders = $(JniSource:%.java= $(PackageSourceDir)/%.h) |
179 |
|
ObjectFiles = $(CFiles:%.c= $(PackageTargetDir)/%.o)\ |
180 |
|
$(CppFiles:%.cpp= $(PackageTargetDir)/%.o)\ |
181 |
< |
$(FortranFiles:%.f= $(PackageTargetDir)/%.o)\ |
182 |
< |
$(F90Files:%.F90= $(PackageTargetDir)/%.o)\ |
183 |
< |
$(LexFiles:%.l= $(PackageTargetDir)/%.o)\ |
184 |
< |
$(YaccFiles:%.y= $(PackageTargetDir)/%.o) |
181 |
> |
$(FortranFiles:%.f= $(PackageTargetDir)/%.o)\ |
182 |
> |
$(F90Files:%.F90= $(PackageTargetDir)/%.o)\ |
183 |
> |
$(LexFiles:%.l= $(PackageTargetDir)/%.o)\ |
184 |
> |
$(YaccFiles:%.y= $(PackageTargetDir)/%.o) |
185 |
|
ParallelObjectFiles = $(CFiles:%.c= $(PackageParallelTargetDir)/%.o)\ |
186 |
< |
$(CppFiles:%.cpp= $(PackageParallelTargetDir)/%.o)\ |
187 |
< |
$(FortranFiles:%.f= $(PackageParallelTargetDir)/%.o)\ |
188 |
< |
$(F90Files:%.F90= $(PackageParallelTargetDir)/%.o)\ |
189 |
< |
$(LexFiles:%.l= $(PackageParallelTargetDir)/%.o)\ |
190 |
< |
$(YaccFiles:%.y= $(PackageParallelTargetDir)/%.o) |
186 |
> |
$(CppFiles:%.cpp= $(PackageParallelTargetDir)/%.o)\ |
187 |
> |
$(FortranFiles:%.f= $(PackageParallelTargetDir)/%.o)\ |
188 |
> |
$(F90Files:%.F90= $(PackageParallelTargetDir)/%.o)\ |
189 |
> |
$(LexFiles:%.l= $(PackageParallelTargetDir)/%.o)\ |
190 |
> |
$(YaccFiles:%.y= $(PackageParallelTargetDir)/%.o) |
191 |
|
|
192 |
|
DerivedSource = $(YaccFiles:%.y= %.h) \ |
193 |
< |
$(YaccFiles:%.y= %.c) \ |
194 |
< |
$(LexFiles:%.l= %.c) |
193 |
> |
$(YaccFiles:%.y= %.c) \ |
194 |
> |
$(LexFiles:%.l= %.c) |
195 |
|
|
196 |
|
DerivedCFiles = $(YaccFiles:%.y= %.c) \ |
197 |
< |
$(LexFiles:%.l= %.c) |
197 |
> |
$(LexFiles:%.l= %.c) |
198 |
|
|
199 |
|
OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) |
200 |
|
|
213 |
|
Executable = $(BinDir)/$(Main) |
214 |
|
ParallelExecutable = $(BinDir)/$(Main)_MPI |
215 |
|
else |
216 |
< |
SharedLibrary = $(LibDir)/lib$(subst /,,$(Package)).so |
217 |
< |
StaticLibrary = $(LibDir)/lib$(subst /,,$(Package)).a |
218 |
< |
ParallelSharedLibrary = $(LibDir)/lib$(subst /,,$(Package))_MPI.so |
219 |
< |
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(Package))_MPI.a |
216 |
> |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
217 |
> |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
218 |
> |
ParallelSharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so |
219 |
> |
ParallelStaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a |
220 |
|
endif |
221 |
|
endif |
222 |
+ |
|
223 |
|
# |
224 |
|
# Misc |
225 |
|
# |
227 |
|
JavaPackageNames = $(subst /,.,$(JavaPackages)) |
228 |
|
IncludePath = -I$(SourceDir) $(IncludeDirs:%=-I%) |
229 |
|
LibDirs = -L$(LibDir) $(LibraryDirs:%=-L%) |
230 |
< |
LocalLibs = $(subst /,,$(PackageLibs)) |
231 |
< |
LibList = $(LocalLibs:%=-l%) $(Libraries:%=-l%) |
230 |
> |
LocalLibs = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs))) |
231 |
> |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs))) |
232 |
> |
LibList = $(LocalLibs:%=-l%) $(Libraries) |
233 |
> |
LibNames = $(LocalLibs:%=$(LibDir)/lib%.a) |
234 |
> |
ParallelLibList = $(ParallelLocalLibs:%=-l%) $(Libraries) |
235 |
> |
ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a) |
236 |
|
|
237 |
|
|
238 |
|
#--------------------------------------------------------------------------- |
247 |
|
CppCompiler = @CXX@ |
248 |
|
Linker = @CXX@ |
249 |
|
MakeDepend = makedepend |
250 |
< |
Install = @INSTALL@ |
250 |
> |
INSTALL = @INSTALL@ |
251 |
|
InstallProgram = @INSTALL_PROGRAM@ |
252 |
|
InstallData = @INSTALL_DATA@ |
253 |
< |
MakeDir = @MKINSTALLDIRS@ |
253 |
> |
MkDir = @MKINSTALLDIRS@ |
254 |
|
Delete = rm -fr |
255 |
|
StaticArchiver = @AR@ |
256 |
|
DynamicArchiver = @CC@ |
268 |
|
List = cat |
269 |
|
Yacc = @YACC@ |
270 |
|
Lex = @LEX@ |
271 |
+ |
Ranlib = @RANLIB@ |
272 |
+ |
Doxygen = @DOXYGEN@ |
273 |
|
|
254 |
– |
|
274 |
|
MakeOptions = -k |
275 |
|
MakeDependOptions = |
276 |
|
StaticArchiverOptions = rc |
279 |
|
JniOptions = |
280 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
281 |
|
-sourcepath $(SourceDir) |
282 |
+ |
COptions = $(FrcDeclare) @CFLAGS@ |
283 |
+ |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
284 |
+ |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
285 |
+ |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
286 |
|
FortranOptions = |
287 |
< |
F90Options = -I$(SourceDir) -module $(TargetDir) |
287 |
> |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) |
288 |
> |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
289 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
290 |
|
-sourcepath $(SourceDir) -deprecation |
291 |
|
JavaRunOptions = -classpath $(ClassPath) |
311 |
|
|
312 |
|
#--------------------------------------------------------------------------- |
313 |
|
# |
314 |
+ |
# Install |
315 |
+ |
# |
316 |
+ |
#--------------------------------------------------------------------------- |
317 |
+ |
|
318 |
+ |
ifneq "$(words $(SampleFiles))" "0" |
319 |
+ |
MySample = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir)) |
320 |
+ |
MyInstallDir = $(SampleSimDir)/$(MySample) |
321 |
+ |
InstallFiles = $(SampleFiles) |
322 |
+ |
InstallCommand = $(InstallData) |
323 |
+ |
endif |
324 |
+ |
|
325 |
+ |
ifneq "$(words $(Main))" "0" |
326 |
+ |
MyInstallDir = $(InstallBinDir) |
327 |
+ |
ifeq "$(UseMPI)" "yes" |
328 |
+ |
InstallFiles = $(Executable) $(ParallelExecutable) |
329 |
+ |
else |
330 |
+ |
InstallFiles = $(Executable) |
331 |
+ |
endif |
332 |
+ |
InstallCommand = $(InstallProgram) |
333 |
+ |
endif |
334 |
+ |
|
335 |
+ |
ifneq "$(words $(ForcefieldFiles))" "0" |
336 |
+ |
MyInstallDir = $(ForceParamDir) |
337 |
+ |
InstallFiles = $(ForcefieldFiles) |
338 |
+ |
InstallCommand = $(InstallData) |
339 |
+ |
endif |
340 |
+ |
|
341 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
342 |
+ |
InstallList = |
343 |
+ |
else |
344 |
+ |
InstallList = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications)) |
345 |
+ |
endif |
346 |
+ |
|
347 |
+ |
InstallListLoop = $(patsubst %,$(SourceDir)/%/.install,$(PackageList)) $(patsubst %,%/.install,$(InstallList)) |
348 |
+ |
|
349 |
+ |
|
350 |
+ |
|
351 |
+ |
#--------------------------------------------------------------------------- |
352 |
+ |
# |
353 |
|
# Rules |
354 |
|
# |
355 |
|
#--------------------------------------------------------------------------- |
367 |
|
$(Print) $@ |
368 |
|
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
369 |
|
|
370 |
+ |
$(PackageParallelTargetDir)/%.o : %.c |
371 |
+ |
$(Print) $@ |
372 |
+ |
$(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@ |
373 |
+ |
|
374 |
+ |
ifeq "$(UseMPI)" "yes" |
375 |
|
%.o : %.c |
376 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
377 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
378 |
+ |
else |
379 |
+ |
%.o : %.c |
380 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
381 |
+ |
endif |
382 |
|
|
383 |
|
# .cpp -> .o |
384 |
|
$(PackageTargetDir)/%.o : %.cpp |
385 |
|
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
386 |
|
|
387 |
+ |
$(PackageParallelTargetDir)/%.o : %.cpp |
388 |
+ |
$(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@ |
389 |
+ |
|
390 |
+ |
ifeq "$(UseMPI)" "yes" |
391 |
+ |
%.o : %.cpp |
392 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
393 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
394 |
+ |
else |
395 |
|
%.o : %.cpp |
396 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
397 |
+ |
endif |
398 |
|
|
399 |
|
# .f -> .o |
400 |
|
$(PackageTargetDir)/%.o : %.f |
401 |
|
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
402 |
|
|
403 |
+ |
$(PackageParallelTargetDir)/%.o : %.f |
404 |
+ |
$(FortranCompiler) $(FortranParallelOptions) -c $< -o $@ |
405 |
+ |
|
406 |
+ |
ifeq "$(UseMPI)" "yes" |
407 |
|
%.o : %.f |
408 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
409 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
410 |
+ |
else |
411 |
+ |
%.o : %.f |
412 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
413 |
+ |
endif |
414 |
|
|
415 |
|
# .F90 -> .o |
416 |
|
$(PackageTargetDir)/%.o : %.F90 |
417 |
< |
$(F90Compiler) $(F90Options) -c $< -o $@ |
417 |
> |
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
418 |
> |
if test -f *.$(ModSuffix); then \ |
419 |
> |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
420 |
> |
fi |
421 |
|
|
422 |
+ |
$(PackageParallelTargetDir)/%.o : %.F90 |
423 |
+ |
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
424 |
+ |
if test -f *.$(ModSuffix); then \ |
425 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
426 |
+ |
fi |
427 |
+ |
|
428 |
+ |
ifeq "$(UseMPI)" "yes" |
429 |
|
%.o : %.F90 |
430 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
431 |
+ |
if test -f *.$(ModSuffix); then \ |
432 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
433 |
+ |
fi |
434 |
|
|
435 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
436 |
+ |
if test -f *.$(ModSuffix); then \ |
437 |
+ |
$(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\ |
438 |
+ |
fi |
439 |
+ |
|
440 |
+ |
else |
441 |
+ |
%.o : %.F90 |
442 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
443 |
+ |
if test -f *.$(ModSuffix); then \ |
444 |
+ |
$(Move) *.$(ModSuffix) $(PackageTargetDir);\ |
445 |
+ |
fi |
446 |
+ |
|
447 |
+ |
endif |
448 |
+ |
|
449 |
+ |
|
450 |
|
# .java -> .class |
451 |
|
$(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java |
452 |
|
$(JavaCompiler) $(JavaCompilerOptions) $< |
480 |
|
@$(Lex) -o$@ $? |
481 |
|
|
482 |
|
# .o -> .a |
483 |
< |
$(LibDir)/%.a : $(ObjectFiles) |
483 |
> |
|
484 |
> |
$(LibDir)/%_UP.a : $(ObjectFiles) |
485 |
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
486 |
+ |
@touch $(LibDir)/.stamp_UP |
487 |
|
|
488 |
< |
%.a : $(ObjectFiles) |
368 |
< |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
369 |
< |
|
370 |
< |
$(LibDir)/%_MPI.a : $(ParallelObjectFiles) |
488 |
> |
$(LibDir)/%_MPI.a: $(ParallelObjectFiles) |
489 |
|
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
490 |
+ |
@touch $(LibDir)/.stamp_MPI |
491 |
|
|
492 |
+ |
%_UP.a : $(ObjectFiles) |
493 |
+ |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
494 |
+ |
|
495 |
|
%_MPI.a : $(ParallelObjectFiles) |
496 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
497 |
|
|
498 |
|
# .o -> .so |
499 |
< |
$(LibDir)/%.so : $(ObjectFiles) |
499 |
> |
$(LibDir)/%_UP.so : $(ObjectFiles) |
500 |
|
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
501 |
|
|
380 |
– |
%.so : $(ObjectFiles) |
381 |
– |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
382 |
– |
|
502 |
|
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
503 |
|
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
504 |
|
|
505 |
+ |
%_UP.so : $(ObjectFiles) |
506 |
+ |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
507 |
+ |
|
508 |
|
%_MPI.so : $(ParallelObjectFiles) |
509 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
510 |
|
|
540 |
|
%_Skel.class : %.class |
541 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
542 |
|
|
543 |
+ |
document : |
544 |
+ |
$(Print) Generate Documentation for OOPSE-2.0 |
545 |
+ |
@cd $(DEV_ROOT)/src |
546 |
+ |
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
547 |
+ |
|
548 |
+ |
#GUN make funtions to merge the libraries |
549 |
+ |
find_objs = $(shell $(StaticArchiver) -t $(1)) |
550 |
+ |
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
551 |
+ |
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
552 |
+ |
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
553 |
+ |
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
554 |
+ |
|
555 |
+ |
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
556 |
+ |
$(Print) create $@ |
557 |
+ |
$(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@)) |
558 |
+ |
$(Ranlib) $(CombinedStaticLib) |
559 |
+ |
|
560 |
+ |
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
561 |
+ |
$(Print) create $@ |
562 |
+ |
$(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@)) |
563 |
+ |
$(Ranlib) $(CombinedParallelStaticLib) |
564 |
+ |
|
565 |
|
# Executable |
566 |
< |
$(Executable) : $(ObjectFiles) |
567 |
< |
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@ |
566 |
> |
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
567 |
> |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
568 |
|
|
569 |
< |
$(ParallelExecutable) : $(ParallelObjectFiles) |
570 |
< |
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@ |
569 |
> |
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
570 |
> |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
571 |
|
|
572 |
|
# Anything else is just copied from source to target |
573 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
580 |
|
|
581 |
|
_all : _buildall |
582 |
|
|
583 |
+ |
_buildall : |
584 |
+ |
ifeq "$(UseMPI)" "yes" |
585 |
|
_buildall : \ |
586 |
|
$(DependencyFile) \ |
587 |
|
$(PackageTargetDir) \ |
588 |
|
$(ObjectFiles) \ |
589 |
+ |
$(ParallelObjectFiles) \ |
590 |
|
$(JavaClassFiles) \ |
591 |
|
$(RmiStubFiles) \ |
592 |
|
$(RmiSkeletonFiles) \ |
593 |
|
$(OtherTargetFiles) \ |
447 |
– |
$(SharedLibrary) \ |
594 |
|
$(StaticLibrary) \ |
595 |
+ |
$(ParallelStaticLibrary) \ |
596 |
|
$(JarFile) \ |
597 |
< |
$(Executable) |
598 |
< |
|
597 |
> |
$(Executable) \ |
598 |
> |
$(ParallelExecutable) |
599 |
> |
else |
600 |
> |
_buildall : \ |
601 |
> |
$(DependencyFile) \ |
602 |
> |
$(PackageTargetDir) \ |
603 |
> |
$(ObjectFiles) \ |
604 |
> |
$(JavaClassFiles) \ |
605 |
> |
$(RmiStubFiles) \ |
606 |
> |
$(RmiSkeletonFiles) \ |
607 |
> |
$(OtherTargetFiles) \ |
608 |
> |
$(StaticLibrary) \ |
609 |
> |
$(JarFile) \ |
610 |
> |
$(Executable) |
611 |
> |
endif |
612 |
|
|
613 |
+ |
|
614 |
|
# make clean |
615 |
|
clean : $(PackageListLoop) |
616 |
|
$(Print) Done clean. |
625 |
|
_distcleanall : |
626 |
|
$(Delete) $(ObjectFiles) \ |
627 |
|
$(ParallelObjectFiles) \ |
628 |
< |
$(JarFile) \ |
628 |
> |
$(JarFile) \ |
629 |
|
$(SharedLibrary) \ |
630 |
|
$(StaticLibrary) \ |
631 |
|
$(ParallelSharedLibrary) \ |
632 |
|
$(ParallelStaticLibrary) \ |
633 |
|
$(Executable) \ |
634 |
|
$(ParallelExecutable) \ |
635 |
< |
$(DependencyFile) |
635 |
> |
$(DependencyFile) |
636 |
|
|
637 |
|
|
638 |
|
# make depend |
645 |
|
$(Print) $@ |
646 |
|
@cd $(PackageSourceDir) |
647 |
|
|
487 |
– |
touch Make.ctemp |
488 |
– |
touch Make.ctemp |
489 |
– |
|
648 |
|
ifneq "$(words $(CppFiles))" "0" |
649 |
< |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
650 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
651 |
< |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
649 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
650 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
651 |
> |
$(Delete) Make.cpptemp |
652 |
> |
|
653 |
> |
ifeq "$(UseMPI)" "yes" |
654 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
655 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
656 |
> |
@$(Delete) Make.cpptemp |
657 |
> |
endif |
658 |
> |
|
659 |
|
endif |
660 |
|
|
661 |
|
ifneq "$(words $(CFiles))" "0" |
662 |
< |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
663 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
664 |
< |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
662 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
663 |
> |
@cat Make.ctemp >> $(DependencyFile) |
664 |
> |
$(Delete) Make.ctemp |
665 |
|
|
666 |
+ |
ifeq "$(UseMPI)" "yes" |
667 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
668 |
+ |
@cat Make.ctemp >> $(DependencyFile) |
669 |
+ |
@$(Delete) Make.ctemp |
670 |
+ |
endif |
671 |
+ |
|
672 |
|
endif |
673 |
|
|
674 |
|
ifneq "$(words $(F90Files))" "0" |
675 |
< |
$(DEV_ROOT)/scripts/sfmakedepend -I $(DEV_ROOT)/src -d '$$(DEV_ROOT)/obj' -f ./Make.ftemp -h *.F90 |
676 |
< |
cat Make.ftemp >> $(DependencyFile) |
675 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
676 |
> |
@cat Make.ftemp >> $(DependencyFile) |
677 |
> |
@$(Delete) Make.ftemp |
678 |
> |
|
679 |
> |
ifeq "$(UseMPI)" "yes" |
680 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
681 |
> |
@cat Make.ftemp >> $(DependencyFile) |
682 |
> |
@$(Delete) Make.ftemp |
683 |
> |
endif |
684 |
> |
|
685 |
|
endif |
507 |
– |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
686 |
|
|
687 |
|
# make lib |
688 |
|
lib : $(PackageListLoop) |
695 |
|
jarsign : $(JarFile) |
696 |
|
$(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself |
697 |
|
|
698 |
+ |
#make install |
699 |
+ |
%.install : |
700 |
+ |
@$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall |
701 |
+ |
|
702 |
+ |
install : $(InstallListLoop) |
703 |
+ |
$(Print) Done Install |
704 |
+ |
|
705 |
+ |
_installall : _buildall _installdata |
706 |
+ |
|
707 |
+ |
$(MyInstallDir) : |
708 |
+ |
$(MkDir) $@ |
709 |
+ |
|
710 |
+ |
_installdata : $(MyInstallDir) |
711 |
+ |
$(Print) $(InstallFiles) |
712 |
+ |
ifneq "$(words $(InstallFiles))" "0" |
713 |
+ |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
714 |
+ |
endif |
715 |
+ |
|
716 |
|
# make statistics |
717 |
|
_statisticsall : |
718 |
< |
@$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp |
718 |
> |
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
719 |
|
|
720 |
|
statistics : $(PackageListLoop) |
721 |
|
@$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions) |
729 |
|
|
730 |
|
pure : $(Executable).pure |
731 |
|
|
732 |
+ |
#make cvslog |
733 |
+ |
cvslog: |
734 |
+ |
$(DEV_ROOT)/scripts/cvs2cl.pl |
735 |
+ |
|
736 |
|
# Execute |
737 |
|
_runexe : |
738 |
|
$(Executable) $(RunParameters) |