annotate make/javax/crypto/Defs-jce.gmk @ 0:37a05a11f281

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children b70fc43afb8c
rev   line source
duke@0 1 #
duke@0 2 # Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation. Sun designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
duke@0 9 # by Sun in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
duke@0 21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 22 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 23 # have any questions.
duke@0 24 #
duke@0 25
duke@0 26 include $(BUILDDIR)/common/Release.gmk
duke@0 27
duke@0 28 #
duke@0 29 # Include these extra attributes for now, should probably take out.
duke@0 30 #
duke@0 31 JCE_MANIFEST_FILE = $(TEMPDIR)/manifest.mf
duke@0 32 $(JCE_MANIFEST_FILE): $(MAINMANIFEST)
duke@0 33 $(prep-target)
duke@0 34 ( $(SED) "s/@@RELEASE@@/$(RELEASE)/" $(MAINMANIFEST); \
duke@0 35 $(ECHO) "Extension-Name: javax.crypto"; \
duke@0 36 $(ECHO) "Implementation-Vendor-Id: com.sun"; ) > $@
duke@0 37
duke@0 38 README-MAKEFILE_WARNING = \
duke@0 39 "\nPlease read make/javax/crypto/Makefile for further build instructions."
duke@0 40
duke@0 41 define no-source-warning
duke@0 42 @$(ECHO) "\n***JCE sources are not available, skipping build.***" \
duke@0 43 $(README-MAKEFILE_WARNING)
duke@0 44 endef
duke@0 45
duke@0 46 ifndef OPENJDK
duke@0 47
duke@0 48 PREBUILT_DIR = $(BUILDDIR)/closed/tools/crypto
duke@0 49
duke@0 50 define build-warning
duke@0 51 @$(ECHO) "\n***JCE in JDK builds require special tools/procedures.***" \
duke@0 52 $(README-MAKEFILE_WARNING)
duke@0 53 endef
duke@0 54
duke@0 55 #
duke@0 56 # Location for JCE codesigning key.
duke@0 57 #
duke@0 58 SIGNING_KEY_DIR = /security/ws/JCE-signing/src
duke@0 59 SIGNING_KEYSTORE = $(SIGNING_KEY_DIR)/KeyStore.jks
duke@0 60 SIGNING_PASSPHRASE = $(SIGNING_KEY_DIR)/passphrase.txt
duke@0 61 SIGNING_ALIAS = jce_rsa
duke@0 62
duke@0 63 #
duke@0 64 # Defines for signing/obfuscating the various jar files.
duke@0 65 #
duke@0 66
duke@0 67 define presign
duke@0 68 @if [ ! -f $(SIGNING_KEYSTORE) -o ! -f $(SIGNING_PASSPHRASE) ]; then \
duke@0 69 $(ECHO) "\n$(SIGNING_KEYSTORE): Signing mechanism *NOT* available..." \
duke@0 70 $(README-MAKEFILE_WARNING); \
duke@0 71 exit 2; \
duke@0 72 fi
duke@0 73 endef
duke@0 74
duke@0 75 define sign-target
duke@0 76 $(BOOT_JARSIGNER_CMD) -keystore $(SIGNING_KEYSTORE) \
duke@0 77 $@ $(SIGNING_ALIAS) < $(SIGNING_PASSPHRASE)
duke@0 78 @$(ECHO) "\nJar codesigning finished."
duke@0 79 endef
duke@0 80
duke@0 81 RELEASE_DIR = $(OUTPUTDIR)/jce-release
duke@0 82
duke@0 83 define release-warning
duke@0 84 @$(ECHO) \
duke@0 85 "\n***The jar files built by the \"release\" target must***" \
duke@0 86 "\n***still be checked into the closed workspace! ***" \
duke@0 87 $(README-MAKEFILE_WARNING)
duke@0 88 endef
duke@0 89
duke@0 90 #
duke@0 91 # Convenience macro for steps needed to sign a jar file.
duke@0 92 #
duke@0 93 define sign-file
duke@0 94 $(presign)
duke@0 95 $(install-file)
duke@0 96 $(sign-target)
duke@0 97 @$(java-vm-cleanup)
duke@0 98 endef
duke@0 99
duke@0 100 #
duke@0 101 # Location for the Obfuscation product. JDK currently has
duke@0 102 # the requirement that we obfuscate our JCE jars.
duke@0 103 #
duke@0 104 OBFUSCATOR = /security/tools/bin/obfus
duke@0 105 OBFUS_DIR = $(TEMPDIR)/obfus
duke@0 106
duke@0 107 define preobfus
duke@0 108 @if [ ! -f $(OBFUSCATOR) ]; then \
duke@0 109 $(ECHO) "\n$(OBFUSCATOR): Obfuscator *NOT* available..." \
duke@0 110 $(README-MAKEFILE_WARNING); \
duke@0 111 exit 2; \
duke@0 112 fi
duke@0 113 endef
duke@0 114
duke@0 115 endif # !OPENJDK