Ensure JNI header file is generated for a clean build. (#18)

This commit is contained in:
Chris Rankin 2017-08-11 16:03:21 +01:00 committed by Michal Kit
parent b6fd5ede58
commit 2cfadd8b95

View File

@ -1,5 +1,5 @@
.PHONY: all
all: standalone/build/standalone_sgx_verify jni/build/libuntrusted_corda_sgx.so
all: standalone_sgx_verify libuntrusted_corda_sgx.so
standalone/build:
mkdir -p standalone/build
@ -7,14 +7,14 @@ standalone/build:
standalone/build/Makefile: | standalone/build
cd standalone/build/ && cmake ..
.PHONY: standalone/build/standalone_sgx_verify
standalone/build/standalone_sgx_verify: standalone/build/Makefile ../../verify-enclave/build/libs/corda-enclavelet.jar
.PHONY: standalone_sgx_verify
standalone_sgx_verify: standalone/build/Makefile ../../verify-enclave/build/libs/corda-enclavelet.jar
$(MAKE) -C $(<D) VERBOSE=1
jni/build:
mkdir -p jni/build
jni/build/Makefile: | jni/build
jni/build/Makefile: ../../verify-enclave/build/native/include/jni_sgx_api.h | jni/build
cd jni/build/ && cmake ..
../../verify-enclave/build/libs/corda-enclavelet.jar: $(shell find ../../*/src -name "*.kt")
@ -23,8 +23,8 @@ jni/build/Makefile: | jni/build
../../verify-enclave/build/native/include/jni_sgx_api.h: ../../verify-enclave/src/main/kotlin/com/r3/enclaves/txverify/NativeSgxApi.kt
cd ../.. && ./gradlew verify-enclave:generateNativeSgxHeaders
.PHONY: jni/build/libuntrusted_corda_sgx.so
jni/build/libuntrusted_corda_sgx.so: jni/build/Makefile ../../verify-enclave/build/native/include/jni_sgx_api.h ../../verify-enclave/build/libs/corda-enclavelet.jar
.PHONY: libuntrusted_corda_sgx.so
libuntrusted_corda_sgx.so: jni/build/Makefile ../../verify-enclave/build/native/include/jni_sgx_api.h ../../verify-enclave/build/libs/corda-enclavelet.jar
$(MAKE) -C $(<D) VERBOSE=1
.PHONY: clean