Skip to content

Commit 6e58144

Browse files
committed
Fix parallel builds with GNU make
In order for `make -j` to work correctly, the BLACS library should be built before the other libraries. This can be achieved with an explicit dependency. Also, the child make processes must be launched with `$(MAKE)` so that the `-j` option is propagated correctly.
1 parent 452d4db commit 6e58144

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

BLACS/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
all : lib tester
22

33
clean:
4-
( cd TESTING ; make clean )
5-
( cd SRC ; make clean )
4+
( cd TESTING ; $(MAKE) clean )
5+
( cd SRC ; $(MAKE) clean )
66

77
tester :
8-
( cd TESTING ; make )
8+
( cd TESTING ; $(MAKE) )
99

1010
lib :
11-
( cd SRC ; make )
11+
( cd SRC ; $(MAKE) )

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ PRECISIONS = single double complex complex16
4949

5050
all: lib exe example
5151

52-
lib: blacslib toolslib pblaslib redistlib scalapacklib
52+
SCALAPACKLIBS=toolslib pblaslib redistlib scalapacklib
53+
54+
$(SCALAPACKLIBS): blacslib
55+
lib: $(SCALAPACKLIBS)
5356

5457
exe: blacsexe pblasexe redistexe scalapackexe
5558

0 commit comments

Comments
 (0)