Makefile revision 160
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# This code is free software; you can redistribute it and/or modify it
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# under the terms of the GNU General Public License version 2 only, as
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# published by the Free Software Foundation. Sun designates this
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# particular file as subject to the "Classpath" exception as provided
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# by Sun in the LICENSE file that accompanied this code.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# This code is distributed in the hope that it will be useful, but WITHOUT
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# version 2 for more details (a copy is included in the LICENSE file that
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# accompanied this code).
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# You should have received a copy of the GNU General Public License version
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# 2 along with this work; if not, write to the Free Software Foundation,
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# CA 95054 USA or visit www.sun.com if you need additional information or
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# have any questions.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Makefile for building sunpkcs11.jar and native libraries.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# This file was derived from make/com/sun/crypto/provider/Makefile.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# respectively.)
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# jar files do not require signing, but those for JDK do. If an unsigned
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# jar file is installed into JDK, things will break when the crypto
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# routines are called.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# This Makefile does the "real" build of the JCE files. For OpenJDK,
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# the jar files built here are installed directly into the OpenJDK.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# For JDK, the binaries use pre-built/pre-signed binary files stored in
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# the closed workspace that are not shipped in the OpenJDK workspaces.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# We still build the JDK files here to verify the files compile, and in
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# preparation for possible signing. Developers working on JCE in JDK
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# must sign the JCE files before testing. The JCE signing key is kept
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# separate from the JDK workspace to prevent its disclosure.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# be built, signed, and then the resulting jar files MUST BE CHECKED
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# INTO THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# reflected in the shipped binaries. The "release" target should be
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# used to generate the required files.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# There are a number of targets to help both JDK/OpenJDK developers.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Main Targets (JDK/OPENJDK):
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# all/clobber/clean The usual, plus the native libraries.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# If OpenJDK, installs sunpkcs11.jar.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# If JDK, installs prebuilt
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# If OpenJDK, does not sign.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# If JDK, tries to sign.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Other lesser-used Targets (JDK/OPENJDK):
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# build-jar Builds sunpkcs11.jar
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# install-jar Alias for "jar" above.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# Other targets (JDK only):
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# sign Alias for sign-jar
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# sign-jar Builds/signs sunpkcs11.jar (no install)
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# release Builds all targets in preparation
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik# for workspace integration.
BUILDDIR = ../../..
# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
# build area. (e.g. a release engineering build.)
FILES_export = \
vpath %.c \
OTHER_INCLUDES += \
# Build the unsigned sunpkcs11.jar file.
# The sunpkcs11.jar needs to be in the extension class directory,
# Build sunpkcs11.jar.
$(JAR_JFLAGS)
# Install sunpkcs11.jar, depending on which type is requested.