38 |
|
#packages containing libraries |
39 |
|
PackageLibs = \ |
40 |
|
utils \ |
41 |
+ |
visitors \ |
42 |
|
math \ |
43 |
|
types \ |
44 |
|
primitives \ |
44 |
– |
visitors \ |
45 |
|
UseTheForce/DarkSide \ |
46 |
|
UseTheForce \ |
47 |
|
brains \ |
48 |
|
io \ |
49 |
< |
integrators \ |
50 |
< |
minimizers \ |
49 |
> |
integrators\ |
50 |
|
constraints \ |
51 |
< |
profiling \ |
51 |
> |
minimizers \ |
52 |
> |
selection \ |
53 |
|
restraints \ |
54 |
< |
|
54 |
> |
lattice \ |
55 |
> |
openbabel\ |
56 |
> |
antlr\ |
57 |
> |
mdParser |
58 |
|
#packages containing applications |
59 |
|
Applications = \ |
60 |
|
applications/oopse \ |
61 |
|
applications/dump2Xyz \ |
62 |
< |
applications/simpleBuilder |
62 |
> |
applications/staticProps \ |
63 |
> |
applications/dynamicProps \ |
64 |
> |
applications/simpleBuilder\ |
65 |
> |
applications/nanoRodBuilder \ |
66 |
> |
applications/atom2mdin \ |
67 |
> |
applications/hydrodynamics |
68 |
|
|
69 |
|
Samples = \ |
70 |
+ |
samples/alkane \ |
71 |
|
samples/argon \ |
72 |
< |
samples/water/dimer \ |
72 |
> |
samples/cutoff \ |
73 |
> |
samples/dipole \ |
74 |
> |
samples/gbljtest \ |
75 |
> |
samples/lipid \ |
76 |
> |
samples/metals/EAM \ |
77 |
> |
samples/metals/EAM/nanoparticle \ |
78 |
> |
samples/metals/EAM/nanorod \ |
79 |
> |
samples/metals/Sutton-Chen \ |
80 |
> |
samples/minimizer \ |
81 |
> |
samples/shape \ |
82 |
> |
samples/thermoIntegration/liquid \ |
83 |
> |
samples/thermoIntegration/solid \ |
84 |
> |
samples/water/dimer \ |
85 |
|
samples/water/spce \ |
86 |
|
samples/water/ssd \ |
87 |
|
samples/water/ssde \ |
88 |
+ |
samples/water/ssdrf \ |
89 |
+ |
samples/water/ssd-ion \ |
90 |
|
samples/water/tip3p_ice \ |
91 |
|
samples/water/tip4p \ |
92 |
< |
samples/lipid \ |
70 |
< |
samples/alkane \ |
71 |
< |
samples/minimizer \ |
72 |
< |
samples/metals \ |
73 |
< |
samples/zcons \ |
92 |
> |
samples/zcons |
93 |
|
|
94 |
|
IncludeDirs = \ |
95 |
< |
@SPRNG_INC_DIR@ \ |
96 |
< |
@MPI_INC_DIR@ |
95 |
> |
@CGAL_INC_DIR@ \ |
96 |
> |
@MPI_INC_DIR@ |
97 |
|
|
98 |
|
LibraryDirs = \ |
99 |
< |
@SPRNG_LIB_DIR@ \ |
99 |
> |
@CGAL_LIB_DIR@ \ |
100 |
|
@MPI_LIB_DIR@ |
101 |
|
|
102 |
|
Libraries = \ |
103 |
< |
@SPRNG_LIB@ \ |
103 |
> |
@LIBS@ \ |
104 |
> |
@CGAL_LIBS@ \ |
105 |
|
@MPI_LIB@ \ |
106 |
< |
@MPI_F90_LIB@ |
106 |
> |
@MPI_F90_LIB@ |
107 |
|
|
108 |
|
OopseHome = @OOPSE_HOME@ |
109 |
< |
ForceParamDir = @OOPSE_HOME@/share/forceFields |
110 |
< |
SampleSimDir = @OOPSE_HOME@/share/samples |
111 |
< |
InstallBinDir = @OOPSE_HOME@/bin |
112 |
< |
DocDir = @OOPSE_HOME@/doc |
109 |
> |
ForceParamDir = $(OopseHome)/share/forceFields |
110 |
> |
SampleSimDir = $(OopseHome)/share/samples |
111 |
> |
InstallBinDir = $(OopseHome)/bin |
112 |
> |
DocDir = $(OopseHome)/doc |
113 |
|
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
114 |
|
F90Declare = -D__FORTRAN90 |
115 |
|
ParallelDeclare = -DIS_MPI |
117 |
|
ModuleCase = @F90_MODULE_NAMES@ |
118 |
|
ModSuffix = @MOD@ |
119 |
|
LinkOptions = \ |
120 |
< |
@F90LIBS@ |
120 |
> |
@FCLIBS@ \ |
121 |
> |
@CXXFLAGS@ |
122 |
|
|
123 |
|
ParallelLinkOptions = \ |
124 |
< |
@F90LIBS@ |
124 |
> |
@FCLIBS@ \ |
125 |
> |
@CXXFLAGS@ |
126 |
|
|
127 |
|
|
128 |
|
#--------------------------------------------------------------------------- |
136 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
137 |
|
LibDir = $(DEV_ROOT)/lib |
138 |
|
MakeDir = $(DEV_ROOT)/make |
139 |
+ |
MainMakefile = $(MakeDir)/Makefile |
140 |
|
BinDir = $(DEV_ROOT)/bin |
141 |
|
DocsDir = $(DEV_ROOT)/docs |
142 |
|
CurrentDir = $(CURDIR) |
148 |
|
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
149 |
|
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
150 |
|
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
151 |
< |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
151 |
> |
#Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
152 |
> |
# REMINDER: We are now using the Package line in each subdir makefile. |
153 |
> |
# This avoids the strange path problem and the subshell |
154 |
|
|
155 |
|
PackageList = $(Package) |
156 |
|
PackageSourceDir = $(SourceDir)/$(Package) |
229 |
|
|
230 |
|
OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) |
231 |
|
|
232 |
+ |
########################################################################### |
233 |
+ |
# |
234 |
+ |
# Figure out the names of the module files based on some work done by |
235 |
+ |
# configure. The tr function below is from John Graham-Cumming |
236 |
+ |
# (http://www.jgc.org). |
237 |
+ |
# |
238 |
+ |
# The tr function. Has three arguments: |
239 |
+ |
# |
240 |
+ |
# $1 The list of characters to translate from |
241 |
+ |
# $2 The list of characters to translate to |
242 |
+ |
# $3 The text to translate |
243 |
+ |
# |
244 |
+ |
# For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L. |
245 |
+ |
|
246 |
+ |
tr = $(eval __t := $3) \ |
247 |
+ |
$(foreach c, \ |
248 |
+ |
$(join $(addsuffix :,$1),$2), \ |
249 |
+ |
$(eval __t := \ |
250 |
+ |
$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \ |
251 |
+ |
$(__t))))$(__t) |
252 |
+ |
|
253 |
+ |
# Common character classes for use with the tr function. Each of |
254 |
+ |
# these is actually a variable declaration and must be wrapped with |
255 |
+ |
# $() or ${} to be used. |
256 |
+ |
|
257 |
+ |
[A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # |
258 |
+ |
[a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z # |
259 |
+ |
[0-9] := 0 1 2 3 4 5 6 7 8 9 # |
260 |
+ |
[A-F] := A B C D E F # |
261 |
+ |
|
262 |
+ |
# Figure out whether we have $(eval) or not (GNU Make 3.80 and above) |
263 |
+ |
# if we do not then we need to use the shell version of tr, and not the |
264 |
+ |
# faster tr function above: |
265 |
+ |
|
266 |
+ |
__have_eval := $(false) |
267 |
+ |
__ignore := $(eval __have_eval := $(true)) |
268 |
+ |
|
269 |
+ |
ifndef __have_eval |
270 |
+ |
uc = $(shell echo $1 | tr "a-z" "A-Z") |
271 |
+ |
lc = $(shell echo $1 | tr "A-Z" "a-z") |
272 |
+ |
else |
273 |
+ |
uc = $(call tr,$([a-z]),$([A-Z]),$1) |
274 |
+ |
lc = $(call tr,$([A-Z]),$([a-z]),$1) |
275 |
+ |
endif |
276 |
+ |
|
277 |
+ |
# OK, now we can actually use these functions to figure out the names |
278 |
+ |
# of the module files: |
279 |
+ |
|
280 |
+ |
ifneq "$(words $(Modules))" "0" |
281 |
+ |
ifeq "$(ModuleCase)" "UPPER" |
282 |
+ |
MODULES = $(call uc,$(Modules)) |
283 |
+ |
else |
284 |
+ |
ifeq "$(ModuleCase)" "lower" |
285 |
+ |
MODULES = $(call lc,$(Modules)) |
286 |
+ |
else |
287 |
+ |
MODULES = $(Modules) |
288 |
+ |
endif |
289 |
+ |
endif |
290 |
+ |
ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix)) |
291 |
+ |
ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix)) |
292 |
+ |
endif |
293 |
+ |
# |
294 |
+ |
########################################################################### |
295 |
+ |
|
296 |
|
ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries)) |
297 |
|
ThirdPartyJars = $(subst $(Space),$(X),$(ThirdPartyJarsTmp)) |
298 |
|
|
304 |
|
#if Main is defined, do not build library. It may not be true sometimes |
305 |
|
ifneq "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0" |
306 |
|
DependencyFile = $(PackageSourceDir)/Makedepend |
307 |
< |
ifneq "$(Main)" "" |
307 |
> |
ifneq "$(words $(Main))" "0" |
308 |
|
Executable = $(BinDir)/$(Main) |
309 |
< |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
309 |
> |
ifeq "$(BuiltParallelExe)" "1" |
310 |
> |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
311 |
> |
endif |
312 |
|
else |
313 |
|
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so |
314 |
|
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a |
338 |
|
# |
339 |
|
#--------------------------------------------------------------------------- |
340 |
|
Print = @echo |
341 |
< |
Move = mv |
341 |
> |
Move = mv -f |
342 |
|
Copy = cp |
343 |
|
CCompiler = @CC@ |
344 |
|
CppCompiler = @CXX@ |
345 |
|
Linker = @CXX@ |
346 |
|
MakeDepend = makedepend |
347 |
< |
Install = @INSTALL@ |
347 |
> |
LN_S = @LN_S@ |
348 |
> |
INSTALL = @INSTALL@ |
349 |
> |
EGREP = @EGREP@ |
350 |
|
InstallProgram = @INSTALL_PROGRAM@ |
351 |
+ |
InstallScript = @INSTALL_SCRIPT@ |
352 |
|
InstallData = @INSTALL_DATA@ |
353 |
< |
MkDir = @MKINSTALLDIRS@ |
354 |
< |
Delete = rm -fr |
353 |
> |
MkDir = @MKINSTALLDIRS@ |
354 |
> |
Delete = rm -f |
355 |
|
StaticArchiver = @AR@ |
356 |
|
DynamicArchiver = @CC@ |
357 |
|
FortranCompiler = @FC@ |
264 |
– |
F90Compiler = @F90@ |
358 |
|
JavaCompiler = $(JAVA_HOME)/bin/javac |
359 |
|
JavaArchiver = $(JAVA_HOME)/bin/jar |
360 |
|
JarSigner = $(JAVA_HOME)/bin/jarsigner |
378 |
|
JniOptions = |
379 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
380 |
|
-sourcepath $(SourceDir) |
381 |
< |
COptions = $(FrcDeclare) |
382 |
< |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
383 |
< |
CppOptions = $(FrcDeclare) |
384 |
< |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
385 |
< |
FortranOptions = |
386 |
< |
F90Options = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir) |
294 |
< |
F90ParallelOptions = @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) |
381 |
> |
COptions = $(FrcDeclare) @CFLAGS@ |
382 |
> |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@ |
383 |
> |
CppOptions = $(FrcDeclare) @CXXFLAGS@ |
384 |
> |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ |
385 |
> |
FortranOptions = @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @FCFLAGS_SRCEXT@ |
386 |
> |
FortranParallelOptions = @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclar) @FCFLAGS_SRCEXT@ |
387 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
388 |
|
-sourcepath $(SourceDir) -deprecation |
389 |
|
JavaRunOptions = -classpath $(ClassPath) |
428 |
|
InstallFiles = $(Executable) |
429 |
|
endif |
430 |
|
InstallCommand = $(InstallProgram) |
431 |
+ |
ifneq "$(words $(LinkTargets))" "0" |
432 |
+ |
MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main)) |
433 |
+ |
MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets)) |
434 |
+ |
endif |
435 |
|
endif |
436 |
|
|
437 |
|
ifneq "$(words $(ForcefieldFiles))" "0" |
462 |
|
|
463 |
|
# Create target directory |
464 |
|
$(PackageTargetDir) : |
465 |
< |
$(MakeDir) $@ |
465 |
> |
$(MkDir) $@ |
466 |
|
|
467 |
+ |
$(BinDir) : |
468 |
+ |
$(MkDir) $@ |
469 |
+ |
|
470 |
|
# .c -> .o |
471 |
< |
$(PackageTargetDir)/%.o : %.c |
471 |
> |
$(PackageTargetDir)/%.o : %.c $(MainMakefile) |
472 |
|
$(Print) $@ |
473 |
|
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
474 |
|
|
475 |
< |
$(PackageParallelTargetDir)/%.o : %.c |
475 |
> |
$(PackageParallelTargetDir)/%.o : %.c $(MainMakefile) |
476 |
|
$(Print) $@ |
477 |
|
$(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@ |
478 |
|
|
479 |
|
ifeq "$(UseMPI)" "yes" |
480 |
< |
%.o : %.c |
480 |
> |
%.o : %.c $(MainMakefile) |
481 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
482 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
483 |
|
else |
484 |
< |
%.o : %.c |
484 |
> |
%.o : %.c $(MainMakefile) |
485 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
486 |
|
endif |
487 |
|
|
488 |
|
# .cpp -> .o |
489 |
< |
$(PackageTargetDir)/%.o : %.cpp |
489 |
> |
$(PackageTargetDir)/%.o : %.cpp $(MainMakefile) |
490 |
|
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
491 |
|
|
492 |
< |
$(PackageParallelTargetDir)/%.o : %.cpp |
492 |
> |
$(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile) |
493 |
|
$(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@ |
494 |
|
|
495 |
|
ifeq "$(UseMPI)" "yes" |
496 |
< |
%.o : %.cpp |
496 |
> |
%.o : %.cpp $(MainMakefile) |
497 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
498 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
499 |
|
else |
500 |
< |
%.o : %.cpp |
500 |
> |
%.o : %.cpp $(MainMakefile) |
501 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
502 |
|
endif |
503 |
|
|
504 |
|
# .f -> .o |
505 |
< |
$(PackageTargetDir)/%.o : %.f |
505 |
> |
$(PackageTargetDir)/%.o : %.f $(MainMakefile) |
506 |
|
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
507 |
|
|
508 |
< |
$(PackageParallelTargetDir)/%.o : %.f |
508 |
> |
$(PackageParallelTargetDir)/%.o : %.f $(MainMakefile) |
509 |
|
$(FortranCompiler) $(FortranParallelOptions) -c $< -o $@ |
510 |
|
|
511 |
|
ifeq "$(UseMPI)" "yes" |
512 |
< |
%.o : %.f |
512 |
> |
%.o : %.f $(MainMakefile) |
513 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
514 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
515 |
|
else |
516 |
< |
%.o : %.f |
516 |
> |
%.o : %.f $(MainMakefile) |
517 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
518 |
|
endif |
519 |
|
|
520 |
|
# .F90 -> .o |
521 |
< |
$(PackageTargetDir)/%.o : %.F90 |
522 |
< |
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
521 |
> |
$(PackageTargetDir)/%.o : %.F90 $(MainMakefile) |
522 |
> |
$(FortranCompiler) $(FortranOptions) $(IncludePath) -c $< -o $@ |
523 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
524 |
> |
$(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\ |
525 |
> |
fi |
526 |
|
|
527 |
< |
$(PackageParallelTargetDir)/%.o : %.F90 |
528 |
< |
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
527 |
> |
$(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile) |
528 |
> |
$(FortranCompiler) $(FortranParallelOptions) $(IncludePath) -c $< -o $@ |
529 |
> |
if test -n "`ls *.$(ModSuffix)`"; then \ |
530 |
> |
$(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\ |
531 |
> |
fi |
532 |
|
|
533 |
|
ifeq "$(UseMPI)" "yes" |
534 |
< |
%.o : %.F90 |
534 |
> |
%.o : %.F90 $(MainMakefile) |
535 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
536 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
537 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
538 |
+ |
fi |
539 |
+ |
|
540 |
|
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
541 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
542 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
543 |
+ |
fi |
544 |
+ |
|
545 |
|
else |
546 |
< |
%.o : %.F90 |
546 |
> |
%.o : %.F90 $(MainMakefile) |
547 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
548 |
+ |
if test -n "`ls *.$(ModSuffix)`"; then\ |
549 |
+ |
$(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\ |
550 |
+ |
fi |
551 |
|
endif |
552 |
|
|
553 |
|
|
650 |
|
$(Doxygen) $(DEV_ROOT)/make/Doxyfile |
651 |
|
|
652 |
|
#GUN make funtions to merge the libraries |
653 |
< |
find_objs = $(shell $(StaticArchiver) -t $(1)) |
653 |
> |
find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF") |
654 |
|
extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1))) |
655 |
|
create_archive = $(shell $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1))) |
656 |
|
remove_objs = $(shell $(Delete) $(call find_objs, $(1))) |
657 |
|
do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1)) |
658 |
+ |
do_link = $(shell $(LN_S) $(1) $(2)) |
659 |
+ |
all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib))) |
660 |
+ |
all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib))) |
661 |
+ |
all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs)) |
662 |
+ |
all_lib_parallel_objs = $(patsubst %,$(ParallelTargetDir)/%,$(call all_parallel_objs)) |
663 |
|
|
664 |
|
$(CombinedStaticLib) : $(LibDir)/.stamp_UP |
665 |
< |
$(Print) create $@ |
666 |
< |
$(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@)) |
665 |
> |
$(Print) creating $@ |
666 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs) |
667 |
|
$(Ranlib) $(CombinedStaticLib) |
668 |
|
|
669 |
|
$(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI |
670 |
< |
$(Print) create $@ |
671 |
< |
$(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@)) |
670 |
> |
$(Print) creating $@ |
671 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs) |
672 |
|
$(Ranlib) $(CombinedParallelStaticLib) |
673 |
|
|
674 |
|
# Executable |
675 |
|
$(Executable) : $(CombinedStaticLib) $(ObjectFiles) |
676 |
< |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@ |
676 |
> |
if test ! -d $(BinDir); then \ |
677 |
> |
$(MkDir) $(BinDir) ;\ |
678 |
> |
fi |
679 |
> |
$(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@ |
680 |
|
|
681 |
|
$(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) |
682 |
< |
$(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@ |
682 |
> |
if test ! -d $(BinDir); then \ |
683 |
> |
$(MkDir) $(BinDir) ;\ |
684 |
> |
fi |
685 |
> |
$(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@ |
686 |
|
|
687 |
|
# Anything else is just copied from source to target |
688 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
725 |
|
$(Executable) |
726 |
|
endif |
727 |
|
|
728 |
+ |
echo : $(PackageListLoop) |
729 |
+ |
$(Print) Done echo. |
730 |
|
|
731 |
+ |
_echoall : |
732 |
+ |
$(Print) $(Modules) |
733 |
+ |
|
734 |
|
# make clean |
735 |
|
clean : $(PackageListLoop) |
736 |
|
$(Print) Done clean. |
737 |
|
|
738 |
|
_cleanall : |
739 |
< |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
739 |
> |
$(Delete) \ |
740 |
> |
$(ObjectFiles) \ |
741 |
> |
$(ModuleFiles) \ |
742 |
> |
$(ParallelObjectFiles) \ |
743 |
> |
$(ParallelModuleFiles) \ |
744 |
> |
$(JarFile) \ |
745 |
> |
$(SharedLibrary) \ |
746 |
> |
$(StaticLibrary) \ |
747 |
> |
$(ParallelSharedLibrary) \ |
748 |
> |
$(ParallelStaticLibrary) \ |
749 |
> |
$(CombinedStaticLib) \ |
750 |
> |
$(CombinedParallelStaticLib) |
751 |
|
|
752 |
|
# make distclean |
753 |
|
distclean : $(PackageListLoop) |
754 |
|
$(Print) Done clean. |
755 |
|
|
756 |
< |
_distcleanall : |
757 |
< |
$(Delete) $(ObjectFiles) \ |
615 |
< |
$(ParallelObjectFiles) \ |
616 |
< |
$(JarFile) \ |
617 |
< |
$(SharedLibrary) \ |
618 |
< |
$(StaticLibrary) \ |
619 |
< |
$(ParallelSharedLibrary) \ |
620 |
< |
$(ParallelStaticLibrary) \ |
621 |
< |
$(Executable) \ |
756 |
> |
_distcleanall : _cleanall |
757 |
> |
$(Delete) $(Executable) \ |
758 |
|
$(ParallelExecutable) \ |
759 |
|
$(DependencyFile) |
760 |
|
|
625 |
– |
|
761 |
|
# make depend |
762 |
|
depend : $(PackageListLoop) |
763 |
|
$(Print) Done dependencies. |
769 |
|
@cd $(PackageSourceDir) |
770 |
|
|
771 |
|
ifneq "$(words $(CppFiles))" "0" |
772 |
< |
$(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
773 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
772 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp |
773 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
774 |
|
$(Delete) Make.cpptemp |
775 |
< |
$(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
776 |
< |
@cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
775 |
> |
|
776 |
> |
ifeq "$(UseMPI)" "yes" |
777 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp |
778 |
> |
@cat Make.cpptemp >> $(DependencyFile) |
779 |
|
@$(Delete) Make.cpptemp |
780 |
+ |
endif |
781 |
+ |
|
782 |
|
endif |
783 |
|
|
784 |
|
ifneq "$(words $(CFiles))" "0" |
785 |
< |
$(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
786 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile) |
785 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
786 |
> |
@cat Make.ctemp >> $(DependencyFile) |
787 |
|
$(Delete) Make.ctemp |
788 |
< |
$(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
789 |
< |
@cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile) |
788 |
> |
|
789 |
> |
ifeq "$(UseMPI)" "yes" |
790 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles) >> Make.ctemp |
791 |
> |
@cat Make.ctemp >> $(DependencyFile) |
792 |
|
@$(Delete) Make.ctemp |
793 |
+ |
endif |
794 |
+ |
|
795 |
|
endif |
796 |
|
|
797 |
|
ifneq "$(words $(F90Files))" "0" |
798 |
< |
$(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 |
798 |
> |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp |
799 |
|
@cat Make.ftemp >> $(DependencyFile) |
800 |
|
@$(Delete) Make.ftemp |
801 |
+ |
|
802 |
+ |
ifeq "$(UseMPI)" "yes" |
803 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) >> Make.ftemp |
804 |
+ |
@cat Make.ftemp >> $(DependencyFile) |
805 |
+ |
@$(Delete) Make.ftemp |
806 |
+ |
endif |
807 |
+ |
|
808 |
|
endif |
809 |
|
|
810 |
|
# make lib |
825 |
|
install : $(InstallListLoop) |
826 |
|
$(Print) Done Install |
827 |
|
|
828 |
< |
_installall : _buildall _installdata |
828 |
> |
_installall : _buildall _installdata _installlinks |
829 |
|
|
830 |
|
$(MyInstallDir) : |
831 |
|
$(MkDir) $@ |
833 |
|
_installdata : $(MyInstallDir) |
834 |
|
$(Print) $(InstallFiles) |
835 |
|
ifneq "$(words $(InstallFiles))" "0" |
836 |
< |
$(InstallData) $(InstallFiles) $(MyInstallDir) |
836 |
> |
$(InstallCommand) $(InstallFiles) $(MyInstallDir) |
837 |
|
endif |
838 |
< |
|
838 |
> |
|
839 |
> |
_installlinks : $(MyInstallDir) |
840 |
> |
ifneq "$(words $(MyLinkTargets))" "0" |
841 |
> |
@cd $(MyInstallDir) |
842 |
> |
$(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink))) |
843 |
> |
endif |
844 |
> |
|
845 |
|
# make statistics |
846 |
|
_statisticsall : |
847 |
|
@$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp |
852 |
|
$(Print) Done statistics. |
853 |
|
|
854 |
|
# make pure |
855 |
< |
$(Executable).pure : |
856 |
< |
$(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
857 |
< |
$(LibList) $(ObjectFiles) -o $@ |
855 |
> |
#$(Executable).pure : |
856 |
> |
# $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \ |
857 |
> |
# $(LibList) $(ObjectFiles) -o $@ |
858 |
> |
# |
859 |
> |
#pure : $(Executable).pure |
860 |
|
|
704 |
– |
pure : $(Executable).pure |
705 |
– |
|
861 |
|
#make cvslog |
862 |
|
cvslog: |
863 |
< |
$(DEV_ROOT)/scripts/cvs2cl.pl |
863 |
> |
$(DEV_ROOT)/scripts/cvs2cl |
864 |
|
|
865 |
|
# Execute |
866 |
|
_runexe : |