diff --git a/bindings/java/Makefile b/bindings/java/Makefile index c92a253..99afc6b 100644 --- a/bindings/java/Makefile +++ b/bindings/java/Makefile @@ -8,23 +8,27 @@ ifeq ($(OS),Windows_NT) LIBRARY_RESOURCE=ckzg4844jni.dll else CLANG_EXECUTABLE=clang - GRADLE_COMMAND=./gradlew + GRADLE_COMMAND=./gradlew UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) CLANG_FLAGS=-fPIC -shared - JNI_INCLUDE_FOLDER=linux - LIBRARY_RESOURCE=libckzg4844jni.so + JNI_INCLUDE_FOLDER=linux + LIBRARY_RESOURCE=libckzg4844jni.so endif ifeq ($(UNAME_S),Darwin) ifeq ($(JAVA_HOME),) JAVA_HOME := $(shell /usr/libexec/java_home) endif CLANG_FLAGS=-dynamiclib - JNI_INCLUDE_FOLDER=darwin - LIBRARY_RESOURCE=libckzg4844jni.dylib + JNI_INCLUDE_FOLDER=darwin + LIBRARY_RESOURCE=libckzg4844jni.dylib endif endif +ifeq ($(JAVA_HOME),) +$(error JAVA_HOME is not set and autodetection failed) +endif + all: build test build: