25859
|
1 |
#
|
|
2 |
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
#
|
|
5 |
# This code is free software; you can redistribute it and/or modify it
|
|
6 |
# under the terms of the GNU General Public License version 2 only, as
|
|
7 |
# published by the Free Software Foundation. Oracle designates this
|
|
8 |
# particular file as subject to the "Classpath" exception as provided
|
|
9 |
# by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
#
|
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
# accompanied this code).
|
|
16 |
#
|
|
17 |
# You should have received a copy of the GNU General Public License version
|
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
#
|
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
# or visit www.oracle.com if you need additional information or have any
|
|
23 |
# questions.
|
|
24 |
#
|
|
25 |
|
|
26 |
default: all
|
|
27 |
|
|
28 |
include $(SPEC)
|
|
29 |
include MakeBase.gmk
|
|
30 |
include JavaCompilation.gmk
|
|
31 |
|
|
32 |
|
|
33 |
################################################################################
|
|
34 |
|
|
35 |
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
|
|
36 |
|
|
37 |
ifneq ($(BUILD_CRYPTO), no)
|
|
38 |
|
|
39 |
US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
|
|
40 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
|
|
41 |
US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
|
|
42 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
|
|
43 |
|
|
44 |
#
|
|
45 |
# TODO fix so that SetupArchive does not write files into SRCS
|
|
46 |
# then we don't need this extra copying
|
|
47 |
#
|
|
48 |
# NOTE: We currently do not place restrictions on our limited export
|
|
49 |
# policy. This was not a typo. This means we are shipping the same file
|
|
50 |
# for both limimted and unlimited US_export_policy.jar.
|
|
51 |
#
|
|
52 |
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
|
|
53 |
US_EXPORT_POLICY_JAR_TMP := \
|
|
54 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
|
|
55 |
|
|
56 |
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
|
|
57 |
$(install-file)
|
|
58 |
|
|
59 |
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
|
|
60 |
|
|
61 |
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
|
|
62 |
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
|
|
63 |
SUFFIXES := .policy, \
|
|
64 |
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
|
|
65 |
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
|
|
66 |
SKIP_METAINF := true))
|
|
67 |
|
|
68 |
$(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
|
|
69 |
$(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
|
|
70 |
$(install-file)
|
|
71 |
|
|
72 |
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
|
|
73 |
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
|
|
74 |
endif
|
|
75 |
|
|
76 |
ifndef OPENJDK
|
|
77 |
ifeq ($(UNLIMITED_CRYPTO), true)
|
|
78 |
$(error No prebuilt unlimited crypto jars available)
|
|
79 |
endif
|
|
80 |
$(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
|
|
81 |
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
|
|
82 |
$(install-file)
|
|
83 |
else
|
|
84 |
ifeq ($(UNLIMITED_CRYPTO), true)
|
|
85 |
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
|
|
86 |
$(install-file)
|
|
87 |
else
|
|
88 |
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
|
|
89 |
$(install-file)
|
|
90 |
endif
|
|
91 |
endif
|
|
92 |
|
|
93 |
POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
|
|
94 |
|
|
95 |
################################################################################
|
|
96 |
|
|
97 |
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
|
|
98 |
|
|
99 |
ifneq ($(BUILD_CRYPTO), no)
|
|
100 |
|
|
101 |
LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
|
|
102 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
|
|
103 |
LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
|
|
104 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
|
|
105 |
|
|
106 |
#
|
|
107 |
# TODO fix so that SetupArchive does not write files into SRCS
|
|
108 |
# then we don't need this extra copying
|
|
109 |
#
|
|
110 |
LOCAL_POLICY_JAR_LIMITED_TMP := \
|
|
111 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
|
|
112 |
LOCAL_POLICY_JAR_UNLIMITED_TMP := \
|
|
113 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
|
|
114 |
|
|
115 |
$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
|
|
116 |
$(install-file)
|
|
117 |
|
|
118 |
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
|
|
119 |
$(install-file)
|
|
120 |
|
|
121 |
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
|
|
122 |
$(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
|
|
123 |
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
|
|
124 |
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
|
|
125 |
SUFFIXES := .policy, \
|
|
126 |
JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
|
|
127 |
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
|
|
128 |
SKIP_METAINF := true))
|
|
129 |
|
|
130 |
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
|
|
131 |
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
|
|
132 |
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
|
|
133 |
SUFFIXES := .policy, \
|
|
134 |
JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
|
|
135 |
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
|
|
136 |
SKIP_METAINF := true))
|
|
137 |
|
|
138 |
TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
|
|
139 |
|
|
140 |
ifndef OPENJDK
|
|
141 |
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
|
|
142 |
$(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
|
|
143 |
$(install-file)
|
|
144 |
|
|
145 |
TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
|
|
146 |
endif
|
|
147 |
endif
|
|
148 |
|
|
149 |
ifndef OPENJDK
|
|
150 |
$(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
|
|
151 |
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
|
|
152 |
$(install-file)
|
|
153 |
else
|
|
154 |
ifeq ($(UNLIMITED_CRYPTO), true)
|
|
155 |
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
|
|
156 |
$(install-file)
|
|
157 |
else
|
|
158 |
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
|
|
159 |
$(install-file)
|
|
160 |
endif
|
|
161 |
endif
|
|
162 |
|
|
163 |
POLICY_JARS += $(LOCAL_POLICY_JAR_DST)
|
|
164 |
TARGETS += $(POLICY_JARS)
|
|
165 |
|
|
166 |
################################################################################
|
|
167 |
|
|
168 |
all: $(TARGETS)
|
|
169 |
|