annotate make/lib/SecurityLibraries.gmk @ 9190:6210b60a16ea

Merge
author kvn
date Thu, 05 Dec 2013 15:10:36 -0800
parents makefiles/lib/SecurityLibraries.gmk@d152c5b01ea8 makefiles/lib/SecurityLibraries.gmk@4be14673b9bf
children ec7671728ca5
rev   line source
ohair@5221 1 #
dxu@6785 2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
ohair@5221 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@5221 4 #
ohair@5221 5 # This code is free software; you can redistribute it and/or modify it
ohair@5221 6 # under the terms of the GNU General Public License version 2 only, as
ohair@5221 7 # published by the Free Software Foundation. Oracle designates this
ohair@5221 8 # particular file as subject to the "Classpath" exception as provided
ohair@5221 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@5221 10 #
ohair@5221 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@5221 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@5221 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@5221 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@5221 15 # accompanied this code).
ohair@5221 16 #
ohair@5221 17 # You should have received a copy of the GNU General Public License version
ohair@5221 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@5221 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@5221 20 #
ohair@5221 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@5221 22 # or visit www.oracle.com if you need additional information or have any
ohair@5221 23 # questions.
ohair@5221 24 #
ohair@5221 25
ihse@8330 26 LIBJAAS_MAPFILE :=
ihse@8330 27 ifneq ($(OPENJDK_TARGET_OS), solaris)
ihse@8330 28 LIBJAAS_EXCLUDE_FILES := Solaris.c
ihse@8330 29 else
ihse@8330 30 # only on solaris...wonder why
ihse@8845 31 LIBJAAS_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjaas/mapfile-vers
ihse@8330 32 endif
ihse@8330 33
ihse@8330 34 LIBJAAS_NAME := jaas_unix
ihse@8330 35 ifeq ($(OPENJDK_TARGET_OS), windows)
ihse@8330 36 LIBJAAS_NAME := jaas_nt
ihse@8330 37 endif
ihse@8330 38
ihse@8330 39 $(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
ihse@8330 40 LIBRARY := $(LIBJAAS_NAME), \
ihse@8330 41 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 42 SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/security/auth/module, \
ihse@8330 43 LANG := C, \
ihse@8330 44 OPTIMIZATION := LOW, \
ihse@8330 45 CFLAGS := $(CFLAGS_JDKLIB), \
ihse@8330 46 MAPFILE := $(LIBJAAS_MAPFILE), \
ihse@8330 47 LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
ihse@8330 48 $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 49 LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
ihse@8330 50 LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
ihse@8330 51 LDFLAGS_SUFFIX_solaris := -lc, \
ihse@8330 52 EXCLUDE_FILES := $(LIBJAAS_EXCLUDE_FILES), \
ihse@8330 53 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
ihse@8330 54 RC_FLAGS := $(RC_FLAGS) \
ihse@8330 55 -D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
ihse@8330 56 -D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
ihse@8330 57 -D "JDK_FTYPE=0x2L", \
ihse@8330 58 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
ihse@8330 59 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 60
ihse@8330 61 $(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
ihse@8330 62
ihse@8330 63 BUILD_LIBRARIES += $(BUILD_LIBJAAS)
ihse@8330 64
ihse@8330 65 ##########################################################################################
ihse@8330 66
ihse@8330 67 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
ihse@8330 68 LIBRARY := j2pcsc, \
ihse@8330 69 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 70 SRC := $(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
ihse@8330 71 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio, \
ihse@8330 72 LANG := C, \
ihse@8330 73 CFLAGS_posix := -D__sun_jdk, \
ihse@8330 74 OPTIMIZATION := LOW, \
ihse@8330 75 CFLAGS := $(CFLAGS_JDKLIB) \
ihse@8330 76 -I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
ihse@8330 77 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio \
ihse@8330 78 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE, \
ihse@8845 79 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \
ihse@8330 80 LDFLAGS := $(LDFLAGS_JDKLIB) \
ihse@8330 81 $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 82 LDFLAGS_SUFFIX_posix := $(LIBDL), \
ihse@8330 83 LDFLAGS_SUFFIX_windows := winscard.lib, \
ihse@8330 84 LDFLAGS_SUFFIX_solaris := -lc, \
ihse@8330 85 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
ihse@8330 86 RC_FLAGS := $(RC_FLAGS) \
ihse@8330 87 -D "JDK_FNAME=j2pcsc.dll" \
ihse@8330 88 -D "JDK_INTERNAL_NAME=j2pcsc" \
ihse@8330 89 -D "JDK_FTYPE=0x2L", \
ihse@8330 90 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
ihse@8330 91 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 92
ihse@8330 93 BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
ihse@8330 94
ihse@8330 95 ##########################################################################################
ihse@8330 96
ihse@8330 97 ifneq ($(OPENJDK_TARGET_OS), windows)
ihse@8330 98 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
ihse@8330 99 LIBRARY := j2gss, \
ihse@8330 100 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 101 SRC := $(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
ihse@8330 102 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
ihse@8330 103 LANG := C, \
ihse@8330 104 OPTIMIZATION := LOW, \
ihse@8330 105 CFLAGS := $(CFLAGS_JDKLIB) \
ihse@8330 106 -I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
ihse@8330 107 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
ihse@8845 108 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
ihse@8330 109 LDFLAGS := $(LDFLAGS_JDKLIB) \
ihse@8330 110 $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 111 LDFLAGS_SUFFIX := $(LIBDL), \
ihse@8330 112 LDFLAGS_SUFFIX_solaris := -lc, \
ihse@8330 113 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
ihse@8330 114 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 115
ihse@8330 116 BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
ihse@8330 117 endif
ihse@8330 118
ihse@8330 119 ##########################################################################################
ihse@8330 120
ihse@8330 121 ifneq ($(BUILD_CRYPTO), no)
ihse@8330 122 BUILD_LIBKRB5_NAME :=
ihse@8330 123 ifeq ($(OPENJDK_TARGET_OS), windows)
ihse@8330 124 BUILD_LIBKRB5_NAME := w2k_lsa_auth
ihse@8330 125 BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
ihse@8330 126 BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
ihse@8330 127 gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ihse@8330 128 ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
ihse@8330 129 else ifeq ($(OPENJDK_TARGET_OS), macosx)
ihse@8330 130 BUILD_LIBKRB5_NAME := osxkrb5
ihse@8330 131 BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5
ihse@8330 132 BUILD_LIBKRB5_LIBS := -framework Kerberos
ihse@8330 133 endif
ihse@8330 134
ihse@8330 135 ifneq ($(BUILD_LIBKRB5_NAME), )
ihse@8330 136 $(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
ihse@8330 137 LIBRARY := $(BUILD_LIBKRB5_NAME), \
ihse@8330 138 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 139 SRC := $(BUILD_LIBKRB5_SRC), \
ihse@8330 140 LANG := C, \
ihse@8330 141 OPTIMIZATION := LOW, \
ihse@8330 142 CFLAGS := $(CFLAGS_JDKLIB) \
ihse@8330 143 -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
ihse@8330 144 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5, \
ihse@8330 145 LDFLAGS := $(LDFLAGS_JDKLIB) \
ihse@8330 146 $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 147 LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
ihse@8330 148 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
ihse@8330 149 RC_FLAGS := $(RC_FLAGS) \
ihse@8330 150 -D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
ihse@8330 151 -D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
ihse@8330 152 -D "JDK_FTYPE=0x2L", \
ihse@8330 153 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
ihse@8330 154 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 155
ihse@8330 156 BUILD_LIBRARIES += $(BUILD_LIBKRB5)
ihse@8330 157 endif
ihse@8330 158 endif
ihse@8330 159
ihse@8330 160 ##########################################################################################
ihse@8330 161
ihse@8330 162 ifeq ($(OPENJDK_TARGET_OS), windows)
ihse@8330 163
ihse@8330 164 $(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
ihse@8330 165 LIBRARY := sunmscapi, \
ihse@8330 166 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 167 SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
ihse@8330 168 LANG := C++, \
ihse@8330 169 OPTIMIZATION := LOW, \
ihse@8330 170 CFLAGS := $(CFLAGS_JDKLIB) \
ihse@8330 171 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
ihse@8330 172 LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
ihse@8330 173 $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 174 LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
ihse@8330 175 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
ihse@8330 176 RC_FLAGS := $(RC_FLAGS) \
ihse@8330 177 -D "JDK_FNAME=sunmscapi.dll" \
ihse@8330 178 -D "JDK_INTERNAL_NAME=sunmscapi" \
ihse@8330 179 -D "JDK_FTYPE=0x2L", \
ihse@8330 180 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
ihse@8330 181 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 182
ihse@8330 183 BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
ihse@8330 184 endif
ihse@8330 185
ihse@8330 186 ##########################################################################################
ihse@8330 187
ihse@8330 188 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
ihse@8330 189 LIBRARY := j2pkcs11, \
ihse@8330 190 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 191 SRC := $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
ihse@8330 192 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
ihse@8330 193 $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
ihse@8330 194 $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
ihse@8330 195 LANG := C, \
ihse@8330 196 OPTIMIZATION := LOW, \
ihse@8330 197 CFLAGS := $(CFLAGS_JDKLIB) \
ihse@8330 198 -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
ihse@8330 199 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
ihse@8330 200 -I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
ihse@8330 201 -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
ihse@8845 202 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
ihse@8330 203 LDFLAGS := $(LDFLAGS_JDKLIB) \
ihse@8330 204 $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 205 LDFLAGS_SUFFIX_posix := $(LIBDL), \
ihse@8330 206 LDFLAGS_SUFFIX_solaris := -lc, \
ihse@8330 207 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
ihse@8330 208 RC_FLAGS := $(RC_FLAGS) \
ihse@8330 209 -D "JDK_FNAME=j2pkcs11.dll" \
ihse@8330 210 -D "JDK_INTERNAL_NAME=j2pkcs11" \
ihse@8330 211 -D "JDK_FTYPE=0x2L", \
ihse@8330 212 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
ihse@8330 213 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 214
ihse@8330 215 BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
ihse@8330 216
ihse@8330 217 ##########################################################################################
ihse@8330 218
ihse@8330 219 ifeq ($(ENABLE_INTREE_EC), yes)
ihse@8330 220
ihse@8330 221 BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
ihse@8330 222 -I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
ihse@8330 223
ihse@8330 224 #
ihse@8330 225 # On sol-sparc...all libraries are compiled with -xregs=no%appl
ihse@8330 226 # (set in CFLAGS_REQUIRED_sparc)
ihse@8330 227 #
ihse@8330 228 # except!!! libsunec.so
ihse@8330 229 #
ihse@8330 230 ECC_JNI_SOLSPARC_FILTER :=
ihse@8330 231 ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
ihse@8330 232 ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
ihse@8330 233 endif
ihse@8330 234
ihse@8330 235 $(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
ihse@8330 236 LIBRARY := sunec, \
ihse@8330 237 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 238 SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \
ihse@8330 239 $(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
ihse@8330 240 LANG := C++, \
ihse@8330 241 OPTIMIZATION := LOW, \
ihse@8330 242 CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
ihse@8330 243 $(BUILD_LIBSUNEC_FLAGS) \
ihse@8330 244 -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
ihse@8330 245 CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
ihse@8330 246 $(BUILD_LIBSUNEC_FLAGS), \
ihse@8845 247 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
ihse@8330 248 LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
ihse@8330 249 LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
ihse@8330 250 LDFLAGS_SUFFIX := $(LIBCXX), \
ihse@8330 251 LDFLAGS_SUFFIX_linux := -lc, \
ihse@8330 252 LDFLAGS_SUFFIX_solaris := -lc, \
ihse@8330 253 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
ihse@8330 254 RC_FLAGS := $(RC_FLAGS) \
ihse@8330 255 -D "JDK_FNAME=sunec.dll" \
ihse@8330 256 -D "JDK_INTERNAL_NAME=sunec" \
ihse@8330 257 -D "JDK_FTYPE=0x2L", \
ihse@8330 258 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
ihse@8330 259 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 260
ihse@8330 261 BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
ihse@8330 262 endif
ihse@8330 263
ihse@8330 264 ##########################################################################################
ihse@8330 265
ihse@8330 266 ifeq ($(OPENJDK_TARGET_OS), solaris)
ihse@8330 267 ifndef OPENJDK
ihse@8330 268
ihse@8330 269 $(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
ihse@8330 270 LIBRARY := j2ucrypto, \
ihse@8330 271 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
ihse@8330 272 SRC := $(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
ihse@8330 273 LANG := C, \
ihse@8330 274 OPTIMIZATION := LOW, \
ihse@8330 275 CFLAGS := $(CFLAGS_JDKLIB) \
ihse@8330 276 -I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
ihse@8845 277 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
ihse@8330 278 LDFLAGS := $(LDFLAGS_JDKLIB), \
ihse@8330 279 LDFLAGS_SUFFIX := $(LIBDL), \
ihse@8330 280 LDFLAGS_SUFFIX_solaris := -lc, \
ihse@8330 281 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
ihse@8330 282 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
ihse@8330 283
ihse@8330 284 $(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
ihse@8330 285
ihse@8330 286 BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
ihse@8330 287
ihse@8330 288 endif
ihse@8330 289 endif