Merge pull request #13 from StefanBratanov/makefile_improvements

Parameterize clang executable and the blst build script
This commit is contained in:
Ramana Kumar 2022-11-28 20:04:54 +00:00 committed by GitHub
commit 12df969a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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