changeset 49677:be5eab692a2f

8199640: Split up BUILD_LIBKRB5 into the two, unrelated compilations it consists of Reviewed-by: erikj
author ihse
date Thu, 15 Mar 2018 02:08:29 +0100
parents 6c3054543ede
children 95e00d2708fb
files make/lib/Lib-java.security.jgss.gmk
diffstat 1 files changed, 28 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/Lib-java.security.jgss.gmk	Thu Mar 15 01:32:03 2018 +0100
+++ b/make/lib/Lib-java.security.jgss.gmk	Thu Mar 15 02:08:29 2018 +0100
@@ -51,40 +51,47 @@
 ################################################################################
 
 ifneq ($(BUILD_CRYPTO), false)
-  BUILD_LIBKRB5_NAME :=
+
   ifeq ($(OPENJDK_TARGET_OS), windows)
-    BUILD_LIBKRB5_NAME := w2k_lsa_auth
-    BUILD_LIBKRB5_SRC := $(TOPDIR)/src/java.security.jgss/$(OPENJDK_TARGET_OS_TYPE)/native/libw2k_lsa_auth
-    BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
-        gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
-        ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
-  else ifeq ($(OPENJDK_TARGET_OS), macosx)
-    BUILD_LIBKRB5_NAME := osxkrb5
-    BUILD_LIBKRB5_SRC := $(TOPDIR)/src/java.security.jgss/macosx/native/libosxkrb5
-    BUILD_LIBKRB5_LIBS := \
-        -framework JavaNativeFoundation \
-        -framework Cocoa \
-        -framework SystemConfiguration \
-        -framework Kerberos
+    BUILD_LIBW2K_LSA_AUTH_SRC := $(call FindSrcDirsForLib, $(MODULE), w2k_lsa_auth)
+
+    $(eval $(call SetupJdkLibrary, BUILD_LIBW2K_LSA_AUTH, \
+        NAME := w2k_lsa_auth, \
+        SRC := $(BUILD_LIBW2K_LSA_AUTH_SRC), \
+        OPTIMIZATION := LOW, \
+        CFLAGS := $(CFLAGS_JDKLIB) \
+            $(addprefix -I, $(BUILD_LIBW2K_LSA_AUTH_SRC)) \
+            -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
+        LDFLAGS := $(LDFLAGS_JDKLIB) \
+            $(call SET_SHARED_LIBRARY_ORIGIN), \
+        LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
+            gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
+            ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib, \
+    ))
+
+    TARGETS += $(BUILD_LIBW2K_LSA_AUTH)
   endif
 
-  ifneq ($(BUILD_LIBKRB5_NAME), )
+  ifeq ($(OPENJDK_TARGET_OS), macosx)
+    BUILD_LIBOSXKRB5_SRC := $(call FindSrcDirsForLib, $(MODULE), osxkrb5)
+
     # libosxkrb5 needs to call deprecated krb5 APIs so that java
     # can use the native credentials cache.
-    $(eval $(call SetupJdkLibrary, BUILD_LIBKRB5, \
-        NAME := $(BUILD_LIBKRB5_NAME), \
-        SRC := $(BUILD_LIBKRB5_SRC), \
+    $(eval $(call SetupJdkLibrary, BUILD_LIBOSXKRB5, \
+        NAME := osxkrb5, \
+        SRC := $(BUILD_LIBOSXKRB5_SRC), \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) \
-            $(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
+            $(addprefix -I, $(BUILD_LIBOSXKRB5_SRC)) \
             -I$(SUPPORT_OUTPUTDIR)/headers/java.security.jgss, \
         DISABLED_WARNINGS_clang := deprecated-declarations, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \
-        LIBS := $(BUILD_LIBKRB5_LIBS), \
+        LIBS := -framework JavaNativeFoundation -framework Cocoa \
+            -framework SystemConfiguration -framework Kerberos, \
     ))
 
-    TARGETS += $(BUILD_LIBKRB5)
+    TARGETS += $(BUILD_LIBOSXKRB5)
   endif
 endif