Skip to content

Commit

Permalink
Update multi platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
taoliult committed Oct 27, 2023
1 parent 0d3f3c2 commit 3691027
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions closed/custom/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,50 @@ endif # HEALTHCENTER_JAR

ifeq (true,$(BUILD_JGSKIT))

# Identify the desired JGSKIT target platform.
JGSKIT_TARGET :=
JGSKIT_MAKE := jgskit.mak
JGSKIT_MAKE_PATH := $(OPENJCEPLUS_TOPDIR)/src/main/native/
JCE_CLASSPATH := $(OPENJCEPLUS_TOPDIR)/src/main/java:$(TOPDIR)/src/java.base/share/classes
JCE_CLASSPATH_WIN64 := "$(call MixedPath,$(OPENJCEPLUS_TOPDIR)/src/main/java)\;$(call MixedPath,$(TOPDIR)/src/java.base/share/classes)"

ifeq ($(OPENJDK_TARGET_OS), aix)
JGSKIT_TARGET := ppc-aix64
else ifeq ($(OPENJDK_TARGET_OS), linux)
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
JGSKIT_TARGET := x86-linux64
else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
JGSKIT_TARGET := ppcle-linux64
endif
else ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
JGSKIT_TARGET := win64
JGSKIT_MAKE := jgskit.win64.mak
JCE_CLASSPATH := $(JCE_CLASSPATH_WIN64)
GSKIT_HOME := $(call MixedPath,$(GSKIT_HOME))
BOOT_JDK := $(call MixedPath,$(BOOT_JDK))
endif
endif # OPENJDK_TARGET_OS

ifeq (,$(JGSKIT_TARGET))
$(error Unsupported platform $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU))
endif # JGSKIT_TARGET

.PHONY : clean-openjceplus openjceplus-libs

clean : clean-openjceplus

clean-openjceplus :
@$(ECHO) Cleaning OpenJCEPlus native
@$(RM) -f $(addprefix $(OPENJCEPLUS_TOPDIR)/src/main/native/, com_ibm_crypto_plus_provider_icc_NativeInterface.h com_ibm_crypto_plus_provider_icc_FastJNIBuffer.h libjgskit.x)
$(MAKE) -C $(OPENJCEPLUS_TOPDIR)/src/main/native/ -f jgskit.mak cleanAll
@$(RM) -f $(addprefix $(JGSKIT_MAKE_PATH), com_ibm_crypto_plus_provider_icc_NativeInterface.h com_ibm_crypto_plus_provider_icc_FastJNIBuffer.h libjgskit.x)
$(MAKE) -C $(JGSKIT_MAKE_PATH) -f $(JGSKIT_MAKE) cleanAll

openjceplus-copy : openjceplus-libs

openjceplus-libs :
@$(ECHO) Compiling OpenJCEPlus native
export PLATFORM=x86-linux64 JAVA_HOME=$(BOOT_JDK) GSKIT_HOME=$(GSKIT_HOME) JCE_CLASSPATH=$(OPENJCEPLUS_TOPDIR)/src/main/java/:$(TOPDIR)/src/java.base/share/classes/ \
&& $(MAKE) -j1 -C $(OPENJCEPLUS_TOPDIR)/src/main/native/ -f jgskit.mak all
export PLATFORM=$(JGSKIT_TARGET) JAVA_HOME=$(BOOT_JDK) GSKIT_HOME=$(GSKIT_HOME) JCE_CLASSPATH=$(JCE_CLASSPATH) \
&& $(MAKE) -j1 -C $(JGSKIT_MAKE_PATH) -f $(JGSKIT_MAKE) all
@$(ECHO) OpenJCEplus compile complete

endif # BUILD_JGSKIT

0 comments on commit 3691027

Please sign in to comment.