33 |
|
# $< - Current dependency |
34 |
|
# |
35 |
|
#--------------------------------------------------------------------------- |
36 |
+ |
IS_UNIX=1 |
37 |
+ |
#packages to be made |
38 |
+ |
Packages = \ |
39 |
+ |
utils \ |
40 |
+ |
math \ |
41 |
+ |
types \ |
42 |
+ |
primitives \ |
43 |
+ |
visitors \ |
44 |
+ |
UseTheForce/DarkSide \ |
45 |
+ |
UseTheForce \ |
46 |
+ |
brains \ |
47 |
+ |
io \ |
48 |
+ |
integrators \ |
49 |
+ |
minimizers \ |
50 |
+ |
constraints \ |
51 |
+ |
profiling \ |
52 |
+ |
restraints \ |
53 |
+ |
applications/oopse \ |
54 |
+ |
applications/dump2Xyz \ |
55 |
+ |
applications/simpleBuilder \ |
56 |
+ |
|
57 |
+ |
#packages contain libraries |
58 |
+ |
PackageLibs = \ |
59 |
+ |
utils \ |
60 |
+ |
math \ |
61 |
+ |
types \ |
62 |
+ |
primitives \ |
63 |
+ |
visitors \ |
64 |
+ |
UseTheForce/DarkSide \ |
65 |
+ |
UseTheForce \ |
66 |
+ |
brains \ |
67 |
+ |
io \ |
68 |
+ |
integrators \ |
69 |
+ |
minimizers \ |
70 |
+ |
constraints \ |
71 |
+ |
profiling \ |
72 |
+ |
restraints \ |
73 |
+ |
|
74 |
+ |
IncludeDirs = \ |
75 |
+ |
/usr/local/include \ |
76 |
+ |
/usr/local/mpich/include |
77 |
+ |
|
78 |
+ |
LibraryDirs = \ |
79 |
+ |
/usr/local/lib \ |
80 |
+ |
/usr/local/mpich/lib |
81 |
+ |
|
82 |
+ |
Libraries = \ |
83 |
+ |
-lsprng \ |
84 |
+ |
-lmpich \ |
85 |
+ |
-lfmpich |
86 |
+ |
|
87 |
+ |
LinkOptions = \ |
88 |
+ |
-L/usr/local/intel/compiler81/lib -L/usr/lib -lifport -lifcore -limf -lm -lcxa -lirc -lunwind -lirc_s |
89 |
+ |
|
90 |
+ |
OopseHome = /usr/local/oopse |
91 |
+ |
ForceParamDir = /usr/local/oopse/share/forceFields/ |
92 |
+ |
SampleSimDir = /usr/local/oopse/share/samples/ |
93 |
+ |
FrcDeclare = -DFRC_PATH="$(ForceParamDir)" |
94 |
+ |
ParallelDeclare = -DIS_MPI |
95 |
+ |
UseMPI = yes |
96 |
+ |
|
97 |
|
#--------------------------------------------------------------------------- |
98 |
|
# |
99 |
|
# Directories |
100 |
|
# |
101 |
|
#--------------------------------------------------------------------------- |
41 |
– |
SourceDir = $(DEV_ROOT)/src |
42 |
– |
TargetDir = $(DEV_ROOT)/obj |
43 |
– |
LibDir = $(DEV_ROOT)/lib |
44 |
– |
MakeDir = $(DEV_ROOT)/make |
45 |
– |
BinDir = $(DEV_ROOT)/bin |
46 |
– |
DocsDir = $(DEV_ROOT)/docs |
47 |
– |
CurrentDir = $(CURDIR) |
102 |
|
|
103 |
+ |
SourceDir = $(DEV_ROOT)/src |
104 |
+ |
TargetDir = $(DEV_ROOT)/obj |
105 |
+ |
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
106 |
+ |
LibDir = $(DEV_ROOT)/lib |
107 |
+ |
ParallelLibDir = $(DEV_ROOT)/MPIlib |
108 |
+ |
MakeDir = $(DEV_ROOT)/make |
109 |
+ |
BinDir = $(DEV_ROOT)/bin |
110 |
+ |
DocsDir = $(DEV_ROOT)/docs |
111 |
+ |
CurrentDir = $(CURDIR) |
112 |
+ |
|
113 |
|
ifdef Source |
114 |
< |
Package = $(subst $(SourceDir)/,,$(CurrentDir)) |
115 |
< |
PackageList = $(Package) |
116 |
< |
PackageSourceDir = $(SourceDir)/$(Package) |
117 |
< |
PackageTargetDir = $(TargetDir)/$(Package) |
118 |
< |
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
114 |
> |
#get the relative path of current package to source directory |
115 |
> |
# /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside |
116 |
> |
#Package = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g') |
117 |
> |
#use shell script to get the absolute path and then rip it off from $(CurrentDir) |
118 |
> |
Package = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir)) |
119 |
> |
|
120 |
> |
PackageList = $(Package) |
121 |
> |
PackageSourceDir = $(SourceDir)/$(Package) |
122 |
> |
PackageTargetDir = $(TargetDir) |
123 |
> |
PackageParallelTargetDir = $(ParallelTargetDir) |
124 |
> |
JavaMainClass = $(subst /,.,$(Package)).$(Main) |
125 |
|
else |
126 |
< |
PackageList = $(Packages) $(JavaPackages) |
126 |
> |
PackageList = $(Packages) $(JavaPackages) |
127 |
|
endif |
128 |
|
|
129 |
< |
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
129 |
> |
PackageListLoop = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList)) |
130 |
|
|
131 |
< |
JRE = $(JAVA_HOME)/jre/lib/rt.jar |
131 |
> |
JRE = $(JAVA_HOME)/jre/lib/rt.jar |
132 |
|
|
133 |
|
ifdef IS_UNIX |
134 |
|
X = : |
149 |
|
FortranFiles = $(filter %.f, $(Source)) |
150 |
|
F90Files = $(filter %.F90, $(Source)) |
151 |
|
CorbaFiles = $(filter %.idl, $(Source)) |
152 |
+ |
LexFiles = $(filter %.l, $(Source)) |
153 |
+ |
YaccFiles = $(filter %.y, $(Source)) |
154 |
|
OtherSourceFiles = $(filter-out $(JavaFiles) $(CppFiles) $(CFiles) \ |
155 |
< |
$(FortranFiles) $(F90Files) \ |
156 |
< |
$(CorbaFiles), \ |
155 |
> |
$(FortranFiles) $(F90Files) $(LexFiles) \ |
156 |
> |
$(YaccFiles) $(CorbaFiles), \ |
157 |
|
$(Source)) |
158 |
|
ManifestFile = $(PackageSourceDir)/Manifest |
87 |
– |
SourceFiles = $(JavaFiles:%.java= $(PackageSourceDir)/%.java)\ |
88 |
– |
$(CppFiles:%.cpp= $(PackageSourceDir)/%.cpp)\ |
89 |
– |
$(CFiles:%.c= $(PackageSourceDir)/%.c)\ |
90 |
– |
$(FortranFiles:%.f= $(PackageSourceDir)/%.f)\ |
91 |
– |
$(F90Files:%.F90= $(PackageSourceDir)/%.F90) |
159 |
|
|
160 |
+ |
SourceFiles = $(JavaFiles)\ |
161 |
+ |
$(CppFiles)\ |
162 |
+ |
$(CFiles)\ |
163 |
+ |
$(FortranFiles)\ |
164 |
+ |
$(F90Files)\ |
165 |
+ |
$(LexFiles)\ |
166 |
+ |
$(YaccFiles) |
167 |
+ |
|
168 |
|
# Target |
169 |
|
JavaClassFiles = $(JavaFiles:%.java= $(PackageTargetDir)/%.class) |
170 |
|
JavaClassFilesRel = $(JavaFiles:%.java= $(Package)/%.class) |
173 |
|
JniClassFiles = $(JniSource:%.java= $(PackageTargetDir)/%.class) |
174 |
|
JniHeaders = $(JniSource:%.java= $(PackageSourceDir)/%.h) |
175 |
|
ObjectFiles = $(CFiles:%.c= $(PackageTargetDir)/%.o)\ |
176 |
< |
$(CppFiles:%.cpp= $(PackageTargetDir)/%.o)\ |
176 |
> |
$(CppFiles:%.cpp= $(PackageTargetDir)/%.o)\ |
177 |
|
$(FortranFiles:%.f= $(PackageTargetDir)/%.o)\ |
178 |
< |
$(F90Files:%.F90= $(PackageTargetDir)/%.o) |
178 |
> |
$(F90Files:%.F90= $(PackageTargetDir)/%.o)\ |
179 |
> |
$(LexFiles:%.l= $(PackageTargetDir)/%.o)\ |
180 |
> |
$(YaccFiles:%.y= $(PackageTargetDir)/%.o) |
181 |
> |
ParallelObjectFiles = $(CFiles:%.c= $(PackageParallelTargetDir)/%.o)\ |
182 |
> |
$(CppFiles:%.cpp= $(PackageParallelTargetDir)/%.o)\ |
183 |
> |
$(FortranFiles:%.f= $(PackageParallelTargetDir)/%.o)\ |
184 |
> |
$(F90Files:%.F90= $(PackageParallelTargetDir)/%.o)\ |
185 |
> |
$(LexFiles:%.l= $(PackageParallelTargetDir)/%.o)\ |
186 |
> |
$(YaccFiles:%.y= $(PackageParallelTargetDir)/%.o) |
187 |
> |
|
188 |
> |
DerivedSource = $(YaccFiles:%.y= %.h) \ |
189 |
> |
$(YaccFiles:%.y= %.c) \ |
190 |
> |
$(LexFiles:%.l= %.c) |
191 |
> |
|
192 |
> |
DerivedCFiles = $(YaccFiles:%.y= %.c) \ |
193 |
> |
$(LexFiles:%.l= %.c) |
194 |
> |
|
195 |
|
OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) |
196 |
|
|
197 |
|
ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries)) |
201 |
|
JavaPackageName = $(subst /,.,$(Package)) |
202 |
|
JarFile = $(LibDir)/$(subst /,,$(Package)).jar |
203 |
|
endif |
204 |
< |
ifneq "$(words $(ObjectFiles))" "0" |
204 |
> |
|
205 |
> |
#if Main is defined, do not build library. It may not be true sometimes |
206 |
> |
ifneq "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0" |
207 |
|
DependencyFile = $(PackageSourceDir)/Makedepend |
115 |
– |
SharedLibrary = $(LibDir)/lib$(subst /,,$(Package)).so |
116 |
– |
StaticLibrary = $(LibDir)/lib$(subst /,,$(Package)).a |
208 |
|
ifneq "$(Main)" "" |
209 |
< |
Executable = $(BinDir)/$(Main) |
209 |
> |
Executable = $(BinDir)/$(Main) |
210 |
> |
ParallelExecutable = $(BinDir)/$(Main)_MPI |
211 |
> |
else |
212 |
> |
SharedLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
213 |
> |
StaticLibrary = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
214 |
> |
ParallelSharedLibrary = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so |
215 |
> |
ParallelStaticLibrary = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a |
216 |
|
endif |
217 |
|
endif |
218 |
|
# |
222 |
|
JavaPackageNames = $(subst /,.,$(JavaPackages)) |
223 |
|
IncludePath = -I$(SourceDir) $(IncludeDirs:%=-I%) |
224 |
|
LibDirs = -L$(LibDir) $(LibraryDirs:%=-L%) |
225 |
< |
LocalLibs = $(subst /,,$(Packages)) |
226 |
< |
LibList = $(LocalLibs:%=-l%) $(Libraries:%=-l%) |
225 |
> |
ParallelLibDirs = -L$(ParallelLibDir) $(LibraryDirs:%=-L%) |
226 |
> |
LocalLibs = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
227 |
> |
ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%, $(PackageLibs))) |
228 |
> |
LibList = $(LocalLibs:%=-l%) $(Libraries) |
229 |
> |
ParallelLibList = $(ParallelLocalLibs:%=-l%) $(Libraries) |
230 |
|
|
231 |
|
|
232 |
|
#--------------------------------------------------------------------------- |
235 |
|
# |
236 |
|
#--------------------------------------------------------------------------- |
237 |
|
Print = @echo |
238 |
+ |
Move = mv |
239 |
|
Copy = cp |
240 |
< |
CCompiler = gcc |
241 |
< |
CppCompiler = gcc |
242 |
< |
Linker = gcc |
240 |
> |
CCompiler = icc |
241 |
> |
CppCompiler = icpc |
242 |
> |
Linker = icpc |
243 |
|
MakeDepend = makedepend |
244 |
< |
MakeDir = mkdir -p |
244 |
> |
Install = /usr/bin/install -c |
245 |
> |
InstallProgram = ${INSTALL} |
246 |
> |
InstallData = ${INSTALL} -m 644 |
247 |
> |
MakeDir = /home/maul/gezelter/tim/code/OOPSE-2.0/ac-tools/shtool mkdir -p -f |
248 |
|
Delete = rm -fr |
249 |
|
StaticArchiver = ar |
250 |
< |
DynamicArchiver = gcc |
251 |
< |
FortranCompiler = f77 |
252 |
< |
F90Compiler = f90 |
250 |
> |
DynamicArchiver = icc |
251 |
> |
FortranCompiler = @FC@ |
252 |
> |
F90Compiler = ifort |
253 |
|
JavaCompiler = $(JAVA_HOME)/bin/javac |
254 |
|
JavaArchiver = $(JAVA_HOME)/bin/jar |
255 |
|
JarSigner = $(JAVA_HOME)/bin/jarsigner |
260 |
|
Purify = purify |
261 |
|
WordCount = wc |
262 |
|
List = cat |
263 |
+ |
Yacc = bison -y |
264 |
+ |
Lex = flex |
265 |
|
|
266 |
< |
MakeOptions = -k -s |
266 |
> |
|
267 |
> |
MakeOptions = -k |
268 |
|
MakeDependOptions = |
269 |
|
StaticArchiverOptions = rc |
270 |
|
DynamicArchiverOptions = -shared |
272 |
|
JniOptions = |
273 |
|
RmiOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
274 |
|
-sourcepath $(SourceDir) |
275 |
+ |
COptions = $(FrcDeclare) |
276 |
+ |
CParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
277 |
+ |
CppOptions = $(FrcDeclare) |
278 |
+ |
CppParallelOptions = $(FrcDeclare) $(ParallelDeclare) |
279 |
|
FortranOptions = |
280 |
< |
F90Options = -I$(SourceDir) |
280 |
> |
F90Options = -fpp1 -O -I$(SourceDir) -module $(TargetDir) |
281 |
> |
F90ParallelOptions = -fpp1 -O -I$(SourceDir) -module $(ParallelTargetDir) $(ParallelDeclare) |
282 |
|
JavaCompilerOptions = -d $(TargetDir) -classpath $(ClassPath) \ |
283 |
|
-sourcepath $(SourceDir) -deprecation |
284 |
|
JavaRunOptions = -classpath $(ClassPath) |
317 |
|
$(MakeDir) $@ |
318 |
|
|
319 |
|
# .c -> .o |
320 |
< |
$(PackageTargetDir)/%.o : $(PackageTargetDir) $(PackageSourceDir)/%.c |
321 |
< |
$(Print) $@ |
322 |
< |
@$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
320 |
> |
$(PackageTargetDir)/%.o : %.c |
321 |
> |
$(Print) $@ |
322 |
> |
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
323 |
|
|
324 |
< |
%.o : $(PackageSourceDir)/%.c |
324 |
> |
$(PackageParallelTargetDir)/%.o : %.c |
325 |
> |
$(Print) $@ |
326 |
> |
$(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@ |
327 |
> |
|
328 |
> |
ifeq "$(UseMPI)" "yes" |
329 |
> |
%.o : %.c |
330 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
331 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
332 |
+ |
else |
333 |
+ |
%.o : %.c |
334 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
335 |
+ |
endif |
336 |
|
|
337 |
|
# .cpp -> .o |
338 |
< |
$(PackageTargetDir)/%.o : $(PackageSourceDir)/%.cpp |
217 |
< |
$(Print) $@ |
338 |
> |
$(PackageTargetDir)/%.o : %.cpp |
339 |
|
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
340 |
|
|
341 |
< |
%.o : $(PackageSourceDir)/%.cpp |
341 |
> |
$(PackageParallelTargetDir)/%.o : %.cpp |
342 |
> |
$(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@ |
343 |
> |
|
344 |
> |
ifeq "$(UseMPI)" "yes" |
345 |
> |
%.o : %.cpp |
346 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
347 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
348 |
+ |
else |
349 |
+ |
%.o : %.cpp |
350 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
351 |
+ |
endif |
352 |
|
|
353 |
|
# .f -> .o |
354 |
< |
$(PackageTargetDir)/%.o : $(PackageSourceDir)/%.f |
355 |
< |
$(Print) $@ |
226 |
< |
@$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
354 |
> |
$(PackageTargetDir)/%.o : %.f |
355 |
> |
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
356 |
|
|
357 |
< |
%.o : $(PackageSourceDir)/%.f |
357 |
> |
$(PackageParallelTargetDir)/%.o : %.f |
358 |
> |
$(FortranCompiler) $(FortranParallelOptions) -c $< -o $@ |
359 |
> |
|
360 |
> |
ifeq "$(UseMPI)" "yes" |
361 |
> |
%.o : %.f |
362 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
363 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
364 |
+ |
else |
365 |
+ |
%.o : %.f |
366 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
367 |
+ |
endif |
368 |
|
|
369 |
|
# .F90 -> .o |
370 |
< |
$(PackageTargetDir)/%.o : $(PackageSourceDir)/%.F90 |
371 |
< |
$(Print) $@ |
234 |
< |
@$(F90Compiler) $(F90Options) -c $< -o $@ |
370 |
> |
$(PackageTargetDir)/%.o : %.F90 |
371 |
> |
$(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@ |
372 |
|
|
373 |
< |
%.o : $(PackageSourceDir)/%.F90 |
373 |
> |
$(PackageParallelTargetDir)/%.o : %.F90 |
374 |
> |
$(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@ |
375 |
> |
|
376 |
> |
ifeq "$(UseMPI)" "yes" |
377 |
> |
%.o : %.F90 |
378 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
379 |
+ |
$(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@ |
380 |
+ |
else |
381 |
+ |
%.o : %.F90 |
382 |
+ |
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
383 |
+ |
endif |
384 |
|
|
385 |
+ |
|
386 |
|
# .java -> .class |
387 |
|
$(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java |
388 |
< |
$(Print) $@ |
242 |
< |
@$(JavaCompiler) $(JavaCompilerOptions) $< |
388 |
> |
$(JavaCompiler) $(JavaCompilerOptions) $< |
389 |
|
|
390 |
|
%.class : $(PackageSourceDir)/%.java |
391 |
|
@$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
392 |
|
|
393 |
|
# .class -> .h |
394 |
|
$(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class |
249 |
– |
$(Print) $@ |
395 |
|
$(JniCompiler) $(JniOptions) $(JavaPackageName).$* |
396 |
|
|
397 |
|
%.h : %.class |
398 |
|
$(MAKE) $(MakeOptions) $(PackageSourceDir)/$@ |
399 |
|
|
400 |
+ |
#.y -> .h |
401 |
+ |
%.h : %.y |
402 |
+ |
$(Yacc) -d $? |
403 |
+ |
@$(Move) y.tab.h $*.h |
404 |
+ |
@$(Delete) y.tab.c |
405 |
+ |
|
406 |
+ |
#.y -> .c |
407 |
+ |
%.c : %.y |
408 |
+ |
$(Yacc) -d $? |
409 |
+ |
@$(Move) y.tab.c $*.c |
410 |
+ |
@$(Delete) y.tab.h |
411 |
+ |
|
412 |
+ |
# .l -> .c |
413 |
+ |
%.c : %.l |
414 |
+ |
$(Print) $@ |
415 |
+ |
$(Print) $(Lex) -o$@ $? |
416 |
+ |
@$(Lex) -o$@ $? |
417 |
+ |
|
418 |
|
# .o -> .a |
419 |
+ |
|
420 |
|
$(LibDir)/%.a : $(ObjectFiles) |
421 |
< |
$(Print) $@ |
258 |
< |
@$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
421 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
422 |
|
|
423 |
+ |
$(ParallelLibDir)/%.a: $(ParallelObjectFiles) |
424 |
+ |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
425 |
+ |
|
426 |
+ |
ifeq "$(UseMPI)" "yes" |
427 |
+ |
%.a : $(ObjectFiles) $(ParallelObjectFiles) |
428 |
+ |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
429 |
+ |
$(MAKE) $(MakeOptions) $(ParallelLibDir)/$@ |
430 |
+ |
else |
431 |
|
%.a : $(ObjectFiles) |
432 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
433 |
+ |
endif |
434 |
|
|
435 |
|
# .o -> .so |
436 |
|
$(LibDir)/%.so : $(ObjectFiles) |
265 |
– |
$(Print) $@ |
437 |
|
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
438 |
|
|
439 |
+ |
$(ParallelLibDir)/%.so : $(ParallelObjectFiles) |
440 |
+ |
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
441 |
+ |
|
442 |
+ |
ifeq "$(UseMPI)" "yes" |
443 |
+ |
%.so : $(ObjectFiles) $(ParallelObjectFiles) |
444 |
+ |
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
445 |
+ |
$(MAKE) $(MakeOptions) $(ParallelLibDir)/$@ |
446 |
+ |
else |
447 |
|
%.so : $(ObjectFiles) |
448 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
449 |
+ |
endif |
450 |
|
|
451 |
|
# .class -> .jar |
452 |
|
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
482 |
|
|
483 |
|
# Executable |
484 |
|
$(Executable) : $(ObjectFiles) |
485 |
< |
$(Print) $@ |
306 |
< |
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@ |
485 |
> |
$(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(LibList) $(LibList) $(LibList) -o $@ |
486 |
|
|
487 |
+ |
$(ParallelExecutable) : $(ParallelObjectFiles) |
488 |
+ |
$(Linker) $(ParallelObjectFiles) $(LinkOptions) $(ParallelLibDirs) $(ParallelLibList) $(ParallelLibList) $(ParallelLibList) -o $@ |
489 |
+ |
|
490 |
|
# Anything else is just copied from source to target |
491 |
|
$(PackageTargetDir)/% : $(PackageSourceDir)/% |
492 |
|
$(Print) $@ |
498 |
|
|
499 |
|
_all : _buildall |
500 |
|
|
501 |
+ |
ifeq "$(UseMPI)" "yes" |
502 |
|
_buildall : \ |
503 |
|
$(DependencyFile) \ |
504 |
|
$(PackageTargetDir) \ |
505 |
|
$(ObjectFiles) \ |
506 |
+ |
$(ParallelObjectFiles) \ |
507 |
|
$(JavaClassFiles) \ |
508 |
|
$(RmiStubFiles) \ |
509 |
|
$(RmiSkeletonFiles) \ |
510 |
|
$(OtherTargetFiles) \ |
327 |
– |
$(SharedLibrary) \ |
511 |
|
$(StaticLibrary) \ |
512 |
+ |
$(ParallelStaticLibrary) \ |
513 |
|
$(JarFile) \ |
514 |
< |
$(Executable) |
514 |
> |
$(Executable) \ |
515 |
> |
$(ParallelExecutable) |
516 |
> |
else |
517 |
> |
_buildall : \ |
518 |
> |
$(DependencyFile) \ |
519 |
> |
$(PackageTargetDir) \ |
520 |
> |
$(ObjectFiles) \ |
521 |
> |
$(JavaClassFiles) \ |
522 |
> |
$(RmiStubFiles) \ |
523 |
> |
$(RmiSkeletonFiles) \ |
524 |
> |
$(OtherTargetFiles) \ |
525 |
> |
$(StaticLibrary) \ |
526 |
> |
$(JarFile) \ |
527 |
> |
$(Executable) |
528 |
> |
endif |
529 |
|
|
530 |
|
|
531 |
|
# make clean |
533 |
|
$(Print) Done clean. |
534 |
|
|
535 |
|
_cleanall : |
536 |
< |
$(Delete) $(PackageTargetDir)/* \ |
537 |
< |
$(JarFile) \ |
536 |
> |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
537 |
> |
|
538 |
> |
# make distclean |
539 |
> |
distclean : $(PackageListLoop) |
540 |
> |
$(Print) Done clean. |
541 |
> |
|
542 |
> |
_distcleanall : |
543 |
> |
$(Delete) $(ObjectFiles) \ |
544 |
> |
$(ParallelObjectFiles) \ |
545 |
> |
$(JarFile) \ |
546 |
|
$(SharedLibrary) \ |
547 |
|
$(StaticLibrary) \ |
548 |
+ |
$(ParallelSharedLibrary) \ |
549 |
+ |
$(ParallelStaticLibrary) \ |
550 |
|
$(Executable) \ |
551 |
< |
$(DependencyFile) |
551 |
> |
$(ParallelExecutable) \ |
552 |
> |
$(DependencyFile) |
553 |
|
|
554 |
|
|
555 |
|
# make depend |
558 |
|
|
559 |
|
_dependall : $(DependencyFile) |
560 |
|
|
561 |
< |
$(DependencyFile) : |
562 |
< |
$(Print) $@ |
563 |
< |
@cd $(PackageSourceDir); \ |
355 |
< |
$(MakeDepend) $(MakeDependOptions) -f- -p$(PackageTargetDir)/ \ |
356 |
< |
$(IncludePath) $(Source) > $(DependencyFile) |
561 |
> |
$(DependencyFile) : $(DerivedSource) |
562 |
> |
$(Print) $@ |
563 |
> |
@cd $(PackageSourceDir) |
564 |
|
|
565 |
+ |
@touch Make.ctemp |
566 |
+ |
@touch Make.ctemp |
567 |
+ |
|
568 |
+ |
ifneq "$(words $(CppFiles))" "0" |
569 |
+ |
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
570 |
+ |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
571 |
+ |
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
572 |
+ |
endif |
573 |
+ |
|
574 |
+ |
ifneq "$(words $(CFiles))" "0" |
575 |
+ |
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
576 |
+ |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
577 |
+ |
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
578 |
+ |
|
579 |
+ |
endif |
580 |
+ |
|
581 |
+ |
ifneq "$(words $(F90Files))" "0" |
582 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90 $(F90Files) > Make.ftemp |
583 |
+ |
$(DEV_ROOT)/scripts/filepp -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90 $(F90Files) >> Make.ftemp |
584 |
+ |
cat Make.ftemp >> $(DependencyFile) |
585 |
+ |
endif |
586 |
+ |
$(Delete) Make.cpptemp Make.ctemp Make.ftemp |
587 |
+ |
|
588 |
|
# make lib |
589 |
|
lib : $(PackageListLoop) |
590 |
|
$(Print) Libraries built. |
612 |
|
|
613 |
|
pure : $(Executable).pure |
614 |
|
|
615 |
+ |
#make cvslog |
616 |
+ |
cvslog: |
617 |
+ |
$(DEV_ROOT)/scripts/cvs2cl.pl |
618 |
+ |
|
619 |
|
# Execute |
620 |
|
_runexe : |
621 |
|
$(Executable) $(RunParameters) |