1 # |
|
2 # Copyright (c) 2013, 2016, 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 JarArchive.gmk |
|
31 |
|
32 |
|
33 ################################################################################ |
|
34 |
|
35 US_EXPORT_POLICY_JAR_DST := \ |
|
36 $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/US_export_policy.jar |
|
37 |
|
38 US_EXPORT_POLICY_JAR_LIMITED := \ |
|
39 $(SUPPORT_OUTPUTDIR)/jce/policy/limited/US_export_policy.jar |
|
40 US_EXPORT_POLICY_JAR_UNLIMITED := \ |
|
41 $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy.jar |
|
42 |
|
43 # |
|
44 # TODO fix so that SetupJarArchive does not write files into SRCS |
|
45 # then we don't need this extra copying |
|
46 # |
|
47 # NOTE: We currently do not place restrictions on our limited export |
|
48 # policy. This was not a typo. This means we are shipping the same file |
|
49 # for both limited and unlimited US_export_policy.jar. Only the local |
|
50 # policy file currently has restrictions. |
|
51 # |
|
52 US_EXPORT_POLICY_JAR_SRC_DIR := \ |
|
53 $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited |
|
54 US_EXPORT_POLICY_JAR_TMP := \ |
|
55 $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy_jar.tmp |
|
56 |
|
57 $(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/% |
|
58 $(install-file) |
|
59 |
|
60 US_EXPORT_POLICY_JAR_DEPS := \ |
|
61 $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy |
|
62 |
|
63 $(eval $(call SetupJarArchive, BUILD_US_EXPORT_POLICY_JAR, \ |
|
64 DEPENDENCIES := $(US_EXPORT_POLICY_JAR_DEPS), \ |
|
65 SRCS := $(US_EXPORT_POLICY_JAR_TMP), \ |
|
66 SUFFIXES := .policy, \ |
|
67 JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED), \ |
|
68 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ |
|
69 SKIP_METAINF := true, \ |
|
70 )) |
|
71 |
|
72 $(US_EXPORT_POLICY_JAR_LIMITED): \ |
|
73 $(US_EXPORT_POLICY_JAR_UNLIMITED) |
|
74 $(call LogInfo, Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)) |
|
75 $(install-file) |
|
76 |
|
77 TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED) $(US_EXPORT_POLICY_JAR_UNLIMITED) |
|
78 |
|
79 ifeq ($(UNLIMITED_CRYPTO), true) |
|
80 $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED) |
|
81 $(install-file) |
|
82 else |
|
83 $(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED) |
|
84 $(install-file) |
|
85 endif |
|
86 |
|
87 POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST) |
|
88 |
|
89 ################################################################################ |
|
90 |
|
91 LOCAL_POLICY_JAR_DST := \ |
|
92 $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/local_policy.jar |
|
93 |
|
94 LOCAL_POLICY_JAR_LIMITED := \ |
|
95 $(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy.jar |
|
96 LOCAL_POLICY_JAR_UNLIMITED := \ |
|
97 $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy.jar |
|
98 |
|
99 # |
|
100 # TODO fix so that SetupJarArchive does not write files into SRCS |
|
101 # then we don't need this extra copying |
|
102 # |
|
103 LOCAL_POLICY_JAR_LIMITED_TMP := \ |
|
104 $(SUPPORT_OUTPUTDIR)/jce/policy/limited/local_policy_jar.tmp |
|
105 LOCAL_POLICY_JAR_UNLIMITED_TMP := \ |
|
106 $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/local_policy_jar.tmp |
|
107 |
|
108 $(LOCAL_POLICY_JAR_LIMITED_TMP)/%: \ |
|
109 $(JDK_TOPDIR)/make/data/cryptopolicy/limited/% |
|
110 $(install-file) |
|
111 |
|
112 $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: \ |
|
113 $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/% |
|
114 $(install-file) |
|
115 |
|
116 $(eval $(call SetupJarArchive, BUILD_LOCAL_POLICY_JAR_LIMITED, \ |
|
117 DEPENDENCIES := $(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \ |
|
118 $(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \ |
|
119 SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \ |
|
120 SUFFIXES := .policy, \ |
|
121 JAR := $(LOCAL_POLICY_JAR_LIMITED), \ |
|
122 EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \ |
|
123 SKIP_METAINF := true, \ |
|
124 )) |
|
125 |
|
126 $(eval $(call SetupJarArchive, BUILD_LOCAL_POLICY_JAR_UNLIMITED, \ |
|
127 DEPENDENCIES := $(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \ |
|
128 SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \ |
|
129 SUFFIXES := .policy, \ |
|
130 JAR := $(LOCAL_POLICY_JAR_UNLIMITED), \ |
|
131 EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \ |
|
132 SKIP_METAINF := true, \ |
|
133 )) |
|
134 |
|
135 TARGETS += $(LOCAL_POLICY_JAR_LIMITED) $(LOCAL_POLICY_JAR_UNLIMITED) |
|
136 |
|
137 ifeq ($(UNLIMITED_CRYPTO), true) |
|
138 $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED) |
|
139 $(install-file) |
|
140 else |
|
141 $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED) |
|
142 $(install-file) |
|
143 endif |
|
144 |
|
145 POLICY_JARS += $(LOCAL_POLICY_JAR_DST) |
|
146 TARGETS += $(POLICY_JARS) |
|
147 |
|
148 ################################################################################ |
|
149 |
|
150 $(eval $(call IncludeCustomExtension, jdk, gendata/GendataPolicyJars.gmk)) |
|