| 33 |
|
# $< - Current dependency |
| 34 |
|
# |
| 35 |
|
#--------------------------------------------------------------------------- |
| 36 |
< |
|
| 37 |
< |
#--------------------------------------------------------------------------- |
| 38 |
< |
# |
| 39 |
< |
# Packages |
| 40 |
< |
# |
| 41 |
< |
#--------------------------------------------------------------------------- |
| 42 |
< |
|
| 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 |
| 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 |
| 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/include \ |
| 76 |
> |
/usr/local/include |
| 77 |
> |
|
| 78 |
> |
LibraryDirs = \ |
| 79 |
> |
/usr/lib \ |
| 80 |
> |
/usr/local/mpich/lib \ |
| 81 |
> |
/usr/local/lib \ |
| 82 |
> |
/usr/local/intel/compiler80/lib \ |
| 83 |
|
|
| 84 |
+ |
Libraries = \ |
| 85 |
+ |
mpich \ |
| 86 |
+ |
sprng \ |
| 87 |
+ |
ifcore \ |
| 88 |
+ |
|
| 89 |
|
#--------------------------------------------------------------------------- |
| 90 |
|
# |
| 91 |
|
# Directories |
| 92 |
|
# |
| 93 |
|
#--------------------------------------------------------------------------- |
| 94 |
|
|
| 84 |
– |
srcdir = @srcdir@ |
| 95 |
|
SourceDir = $(DEV_ROOT)/src |
| 96 |
|
TargetDir = $(DEV_ROOT)/obj |
| 97 |
|
ParallelTargetDir = $(DEV_ROOT)/MPIobj |
| 252 |
|
Lex = @LEX@ |
| 253 |
|
|
| 254 |
|
|
| 255 |
< |
MakeOptions = -k -s |
| 255 |
> |
MakeOptions = -k |
| 256 |
|
MakeDependOptions = |
| 257 |
|
StaticArchiverOptions = rc |
| 258 |
|
DynamicArchiverOptions = -shared |
| 302 |
|
# .c -> .o |
| 303 |
|
$(PackageTargetDir)/%.o : %.c |
| 304 |
|
$(Print) $@ |
| 305 |
< |
$(Print) $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
| 296 |
< |
@$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
| 305 |
> |
$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@ |
| 306 |
|
|
| 307 |
|
%.o : %.c |
| 308 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
| 309 |
|
|
| 310 |
|
# .cpp -> .o |
| 311 |
|
$(PackageTargetDir)/%.o : %.cpp |
| 303 |
– |
$(Print) $@ |
| 304 |
– |
$(Print) $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
| 312 |
|
$(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@ |
| 313 |
|
|
| 314 |
|
%.o : %.cpp |
| 316 |
|
|
| 317 |
|
# .f -> .o |
| 318 |
|
$(PackageTargetDir)/%.o : %.f |
| 319 |
< |
$(Print) $@ |
| 313 |
< |
$(Print) $(FortranCompiler) $(FortranOptions) -c $< -o $@ |
| 314 |
< |
@$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
| 319 |
> |
$(FortranCompiler) $(FortranOptions) -c $< -o $@ |
| 320 |
|
|
| 321 |
|
%.o : %.f |
| 322 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
| 323 |
|
|
| 324 |
|
# .F90 -> .o |
| 325 |
|
$(PackageTargetDir)/%.o : %.F90 |
| 326 |
< |
$(Print) $@ |
| 322 |
< |
$(Print) $(F90Compiler) $(F90Options) -c $< -o $@ |
| 323 |
< |
@$(F90Compiler) $(F90Options) -c $< -o $@ |
| 326 |
> |
$(F90Compiler) $(F90Options) -c $< -o $@ |
| 327 |
|
|
| 328 |
|
%.o : %.F90 |
| 329 |
|
$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
| 330 |
|
|
| 331 |
|
# .java -> .class |
| 332 |
|
$(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java |
| 333 |
< |
$(Print) $@ |
| 331 |
< |
$(Print) $(JavaCompiler) $(JavaCompilerOptions) $< |
| 332 |
< |
@$(JavaCompiler) $(JavaCompilerOptions) $< |
| 333 |
> |
$(JavaCompiler) $(JavaCompilerOptions) $< |
| 334 |
|
|
| 335 |
|
%.class : $(PackageSourceDir)/%.java |
| 336 |
|
@$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@ |
| 337 |
|
|
| 338 |
|
# .class -> .h |
| 339 |
|
$(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class |
| 339 |
– |
$(Print) $@ |
| 340 |
– |
$(Print) $(JniCompiler) $(JniOptions) $(JavaPackageName).$* |
| 340 |
|
$(JniCompiler) $(JniOptions) $(JavaPackageName).$* |
| 341 |
|
|
| 342 |
|
%.h : %.class |
| 344 |
|
|
| 345 |
|
#.y -> .h |
| 346 |
|
%.h : %.y |
| 347 |
< |
$(Print) $@ |
| 349 |
< |
$(Print) @$(Yacc) -d $? |
| 350 |
< |
@$(Yacc) -d $? |
| 347 |
> |
$(Yacc) -d $? |
| 348 |
|
@$(Move) y.tab.h $*.h |
| 349 |
|
@$(Delete) y.tab.c |
| 350 |
|
|
| 351 |
|
#.y -> .c |
| 352 |
|
%.c : %.y |
| 353 |
< |
$(Print) $@ |
| 357 |
< |
$(Print) $(Yacc) -d $? |
| 358 |
< |
@$(Yacc) -d $? |
| 353 |
> |
$(Yacc) -d $? |
| 354 |
|
@$(Move) y.tab.c $*.c |
| 355 |
|
@$(Delete) y.tab.h |
| 356 |
|
|
| 362 |
|
|
| 363 |
|
# .o -> .a |
| 364 |
|
$(LibDir)/%.a : $(ObjectFiles) |
| 365 |
< |
$(Print) $@ |
| 371 |
< |
$(Print) $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
| 372 |
< |
@$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
| 365 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles) |
| 366 |
|
|
| 367 |
|
%.a : $(ObjectFiles) |
| 368 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
| 369 |
|
|
| 370 |
|
$(LibDir)/%_MPI.a : $(ParallelObjectFiles) |
| 371 |
< |
$(Print) $@ |
| 379 |
< |
$(Print) $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
| 380 |
< |
@$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
| 371 |
> |
$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles) |
| 372 |
|
|
| 373 |
|
%_MPI.a : $(ParallelObjectFiles) |
| 374 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
| 375 |
|
|
| 376 |
|
# .o -> .so |
| 377 |
|
$(LibDir)/%.so : $(ObjectFiles) |
| 387 |
– |
$(Print) $@ |
| 388 |
– |
$(Print) $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
| 378 |
|
$(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@ |
| 379 |
|
|
| 380 |
|
%.so : $(ObjectFiles) |
| 381 |
|
$(MAKE) $(MakeOptions) $(LibDir)/$@ |
| 382 |
|
|
| 383 |
|
$(LibDir)/%_MPI.so : $(ParallelObjectFiles) |
| 395 |
– |
$(Print) $@ |
| 396 |
– |
$(Print) $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
| 384 |
|
$(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@ |
| 385 |
|
|
| 386 |
|
%_MPI.so : $(ParallelObjectFiles) |
| 389 |
|
# .class -> .jar |
| 390 |
|
$(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles) |
| 391 |
|
$(Print) $@ |
| 405 |
– |
$(Print) $(JavaArchiver) -cf $@ $(JavaClassFilesRel) $(OtherTargetFiles) |
| 392 |
|
@cd $(TargetDir); $(JavaArchiver) -cf $@ \ |
| 393 |
|
$(JavaClassFilesRel) $(OtherTargetFiles) |
| 394 |
|
|
| 420 |
|
|
| 421 |
|
# Executable |
| 422 |
|
$(Executable) : $(ObjectFiles) |
| 437 |
– |
$(Print) $@ |
| 438 |
– |
$(Print) $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@ |
| 423 |
|
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@ |
| 424 |
|
|
| 425 |
|
$(ParallelExecutable) : $(ParallelObjectFiles) |
| 442 |
– |
$(Print) $@ |
| 443 |
– |
$(Print) $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@ |
| 426 |
|
$(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@ |
| 427 |
|
|
| 428 |
|
# Anything else is just copied from source to target |
| 448 |
|
$(StaticLibrary) \ |
| 449 |
|
$(JarFile) \ |
| 450 |
|
$(Executable) |
| 451 |
+ |
|
| 452 |
|
|
| 470 |
– |
|
| 453 |
|
# make clean |
| 454 |
|
clean : $(PackageListLoop) |
| 455 |
|
$(Print) Done clean. |
| 456 |
|
|
| 457 |
|
_cleanall : |
| 458 |
< |
$(Delete) $(PackageTargetDir)/* \ |
| 458 |
> |
$(Delete) $(ObjectFiles) $(ParallelObjectFiles) |
| 459 |
> |
|
| 460 |
> |
# make distclean |
| 461 |
> |
distclean : $(PackageListLoop) |
| 462 |
> |
$(Print) Done clean. |
| 463 |
> |
|
| 464 |
> |
_distcleanall : |
| 465 |
> |
$(Delete) $(ObjectFiles) \ |
| 466 |
> |
$(ParallelObjectFiles) \ |
| 467 |
|
$(JarFile) \ |
| 468 |
|
$(SharedLibrary) \ |
| 469 |
|
$(StaticLibrary) \ |
| 470 |
+ |
$(ParallelSharedLibrary) \ |
| 471 |
+ |
$(ParallelStaticLibrary) \ |
| 472 |
|
$(Executable) \ |
| 473 |
+ |
$(ParallelExecutable) \ |
| 474 |
|
$(DependencyFile) |
| 475 |
|
|
| 476 |
|
|
| 488 |
|
touch Make.ctemp |
| 489 |
|
|
| 490 |
|
ifneq "$(words $(CppFiles))" "0" |
| 498 |
– |
$(Print) Make dependencies for $(CppFiles) |
| 499 |
– |
$(Print) $(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
| 491 |
|
$(CppCompiler) $(IncludePath) -MM $(CppFiles) > Make.cpptemp |
| 492 |
|
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
| 493 |
|
cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
| 494 |
|
endif |
| 495 |
|
|
| 496 |
|
ifneq "$(words $(CFiles))" "0" |
| 506 |
– |
$(Print) Make dependencies for $(CFiles) |
| 507 |
– |
$(Print) $(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
| 497 |
|
$(CCompiler) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp |
| 498 |
|
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile) |
| 499 |
|
cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile) |
| 501 |
|
endif |
| 502 |
|
|
| 503 |
|
ifneq "$(words $(F90Files))" "0" |
| 515 |
– |
$(Print) Make dependencies for $(F90Files) |
| 504 |
|
$(DEV_ROOT)/scripts/sfmakedepend -I $(DEV_ROOT)/src -d '$$(DEV_ROOT)/obj' -f ./Make.ftemp -h *.F90 |
| 505 |
|
cat Make.ftemp >> $(DependencyFile) |
| 506 |
|
endif |