25859
+ − 1
#
27565
+ − 2
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
25859
+ − 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
+ − 31
################################################################################
+ − 32
# Unpack the binary distributions of the crypto classes if they exist.
+ − 33
SEC_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip
+ − 34
SEC_FILES_WIN_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip
+ − 35
JGSS_WIN32_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
+ − 36
JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
+ − 37
+ − 38
define unzip-sec-file
+ − 39
$(ECHO) Unzipping $(<F)
27565
+ − 40
$(MKDIR) -p $(@D) $(JDK_OUTPUTDIR)
25859
+ − 41
$(RM) $@
+ − 42
($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
+ − 43
$(MV) $@.tmp $@
+ − 44
endef
+ − 45
27565
+ − 46
define unzip-native-sec-file
+ − 47
$(ECHO) Unzipping $(<F)
+ − 48
$(MKDIR) -p $(@D)
+ − 49
$(RM) $@
+ − 50
($(CD) $(SUPPORT_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
+ − 51
$(MV) $@.tmp $@
+ − 52
endef
25859
+ − 53
27565
+ − 54
$(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
25859
+ − 55
$(call unzip-sec-file)
+ − 56
27565
+ − 57
# Trying to unzip both of the sec files at the same time may cause a race
+ − 58
# when creating directories common to both files.
+ − 59
$(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP) \
+ − 60
| $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
25859
+ − 61
$(call unzip-sec-file)
+ − 62
27565
+ − 63
$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
+ − 64
$(call unzip-native-sec-file)
+ − 65
+ − 66
$(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
+ − 67
$(call unzip-native-sec-file)
+ − 68
25859
+ − 69
ifneq ($(wildcard $(SEC_FILES_ZIP)), )
27565
+ − 70
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-bin.unzipped
25859
+ − 71
ifeq ($(OPENJDK_TARGET_OS), windows)
27565
+ − 72
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.sec-windows-bin.unzipped
25859
+ − 73
ifeq ($(OPENJDK_TARGET_CPU), x86)
27565
+ − 74
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-i586-bin.unzipped
25859
+ − 75
endif
+ − 76
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
27565
+ − 77
IMPORT_TARGET_FILES += $(SUPPORT_OUTPUTDIR)/_the.jgss-windows-x64-bin.unzipped
25859
+ − 78
endif
+ − 79
endif
+ − 80
endif
+ − 81
+ − 82
################################################################################
+ − 83
+ − 84
sec: $(IMPORT_TARGET_FILES)
+ − 85
+ − 86
all: sec
+ − 87
+ − 88
.PHONY: sec all