Merge pull request #13 from StefanBratanov/makefile_improvements
Parameterize clang executable and the blst build script
This commit is contained in:
commit
12df969a26
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue