Merge pull request #43 from jtraglia/unix-arm-builds

Add ARM support for Java bindings
This commit is contained in:
Ramana Kumar 2022-12-20 11:05:02 +00:00 committed by GitHub
commit b8d90a5080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -15,10 +15,15 @@ ifeq ($(OS),Windows_NT)
else else
CLANG_EXECUTABLE=clang CLANG_EXECUTABLE=clang
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
CLANG_FLAGS=-fPIC -shared CLANG_FLAGS=-fPIC -shared
JNI_INCLUDE_FOLDER=linux JNI_INCLUDE_FOLDER=linux
OS_ARCH=amd64 ifeq ($(UNAME_M),x86_64)
OS_ARCH=amd64
else
OS_ARCH=$(UNAME_M)
endif
LIBRARY_RESOURCE=libckzg4844jni.so LIBRARY_RESOURCE=libckzg4844jni.so
endif endif
ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Darwin)
@ -27,7 +32,11 @@ else
endif endif
CLANG_FLAGS=-dynamiclib CLANG_FLAGS=-dynamiclib
JNI_INCLUDE_FOLDER=darwin JNI_INCLUDE_FOLDER=darwin
OS_ARCH=x86_64 ifeq ($(UNAME_M),arm64)
OS_ARCH=aarch64
else
OS_ARCH=$(UNAME_M)
endif
LIBRARY_RESOURCE=libckzg4844jni.dylib LIBRARY_RESOURCE=libckzg4844jni.dylib
endif endif
GRADLE_COMMAND=./gradlew GRADLE_COMMAND=./gradlew