From b9777a6f676b8ee465df8fe35fbcd71d3811add4 Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Mon, 28 Nov 2022 18:38:24 +0000 Subject: [PATCH] Parameterize clang executable and the blst build script --- bindings/java/README.md | 2 +- src/Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bindings/java/README.md b/bindings/java/README.md index 371eb76..5a8558a 100644 --- a/bindings/java/README.md +++ b/bindings/java/README.md @@ -2,7 +2,7 @@ ## Prerequisites -* Follow the instructions in the [README.md](../../README.md) to install blst and build the C-KZG library. +* Follow the instructions in the [README.md](../../README.md) to build blst and the C-KZG library. * `JAVA_HOME` environment variable is set to a JDK with an `include` folder containing a `jni.h` file. ## Build diff --git a/src/Makefile b/src/Makefile index 01b8824..058da21 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,17 +6,20 @@ else CFLAGS += -O2 -fPIC endif +CLANG_EXECUTABLE=clang +BLST_BUILD_SCRIPT=./build.sh + all: c_kzg_4844.o lib c_kzg_4844.o: c_kzg_4844.c Makefile - clang -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c $< + ${CLANG_EXECUTABLE} -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c $< # Will fail with "patch does not apply" if it has already been patched. # Safe to ignore. blst: cd ../blst; \ git apply < ../blst_sha.patch; \ - ./build.sh && \ + ${BLST_BUILD_SCRIPT} && \ cp libblst.a ../lib && \ cp bindings/*.h ../inc