#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building ucrypto.jar and its native libraries.
#
#
#
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle
# JDK builds respectively.)
#
# This Makefile does the "real" build of the Ucrypto provider files.
# Since the sources are unavailable for OpenJDK, this Makefile is only
# useful for JDK.
#
#
# Main Targets (JDK on Solaris):
#
# all The usual, ucrypto.jar plus the native libraries.
#
# clobber/clean Cleans up the temp directory, ucrypto.jar, the
# native libraries, and the config file from the
# build area
#
# jar Builds, signs and installs ucrypto.jar
# (Can only be done on machines with access to
# the signing keystore)
#
# Other lesser-used Targets (JDK on Solaris):
#
# build-jar Builds ucrypto.jar (no sign/install)
#
# sign Builds/signs ucrypto.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
# (Can only be done on machines with access to
# the signing keystore)
#
# install-prebuilt Installs the pre-built jar files
#
# NOTE: None of the above target will update the prebuilt provider binary
# under the closed workspace. To update it, you must explicitly copy the
#
# This makefile was written to support parallel target execution.
#
BUILDDIR = ../../../..
all:
else
#
# The following is for when we need to do postprocessing
# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
# =====================================================
# Where to place the output, in case we're building from a read-only
# build area. (e.g. a release engineering build.)
else
JAVAC_MAX_WARNINGS=false
JAVAC_WARNINGS_FATAL=true
#
# C and Java Files
#
#
# Subdirectories of these are automatically included.
#
#
# Java files that define native methods
#
FILES_export = \
#
# Find native code
#
vpath %.c \
#
# Find include files
#
OTHER_INCLUDES += \
#
# Rules
#
#
# Libraries to link
#
# Default config file
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Build is initially done in the unsigned
# area and when files are signed, they will be placed in the appropriate area.
#
#
# Rules
#
$(UCRYPTO_CFG_BUILD): $(UCRYPTO_CFG_SRC)
# =====================================================
# Build the unsigned ucrypto.jar file.
#
#
# The ucrypto.jar needs to be in the extension class directory,
# therefore none of its classes can appear in $(CLASSBINDIR).
# Currently no one is using any of the internals, so these files
# should not have been built.
#
#
# Since the -C option to jar is used below, each directory entry must be
# preceded with the appropriate directory to "cd" into.
#
#
# Build ucrypto.jar.
#
#
# Sign ucrypto.jar
#
else
#
# We have to remove the build dependency, otherwise, we'll try to rebuild it
# which we can't do on a read-only filesystem.
#
@if [ ! -r $(UNSIGNED_DIR)/ucrypto.jar ] ; then \
exit 1; \
fi
# =====================================================
# Create the Release Engineering files. Signed builds, etc.
#
# =====================================================
# Install routines.
#
#
# Install ucrypto.jar, depending on which type is requested.
#
jar: $(JAR_DESTFILE)
@$(ECHO) "\n>>>Installing prebuilt OracleUcrypto provider..."
$(RM) $(JAR_DESTFILE)
# =====================================================
# Support routines.
#
$(RM) -r $(UCRYPTO_CFG_BUILD)
endif #ifneq ($(PLATFORM), solaris)
endif #ifndef OPENJDK