Skip to content

Commit

Permalink
Makefile: Make eclair and lightningd builds parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimon authored and cdecker committed Aug 30, 2019
1 parent 3cbda0f commit 3a6c4db
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ ifneq ($(PYTEST_PAR),)
PYTEST_OPTS += -n=$(PYTEST_PAR)
endif

NPROC = 4
OS=$(shell uname -s)

ifeq ($(OS),Linux)
NPROC=$(shell grep -c ^processor /proc/cpuinfo)
endif

PWD = $(shell pwd)
GO111MODULE = on

Expand Down Expand Up @@ -38,12 +45,12 @@ update: update-eclair update-clightning update-lnd update-ptarmigan

bin/eclair.jar: src/eclair
(cd src/eclair; git rev-parse HEAD) > src/eclair/version
(cd src/eclair/; mvn package -Dmaven.test.skip=true || true)
(cd src/eclair/; mvn -T ${NPROC} package -Dmaven.test.skip=true || true)
cp src/eclair/eclair-node/target/eclair-node-*-$(shell git --git-dir=src/eclair/.git rev-parse HEAD | cut -b 1-7).jar bin/eclair.jar

bin/lightningd: src/lightning
(cd src/lightning; git rev-parse HEAD) > src/lightning/version
cd src/lightning; ./configure --enable-developer --disable-valgrind && make CC=clang
cd src/lightning; ./configure --enable-developer --disable-valgrind && make CC=clang -j${NPROC}
cp src/lightning/lightningd/lightningd src/lightning/lightningd/lightning_* bin

bin/ptarmd: src/ptarmigan
Expand Down

0 comments on commit 3a6c4db

Please sign in to comment.