Makefile revision 4596
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# This code is free software; you can redistribute it and/or modify it
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater# under the terms of the GNU General Public License version 2 only, as
7b67cfadd077feb0ec3e6c78385ba0d845a9789bMark Andrews# published by the Free Software Foundation. Oracle designates this
75b70a68aefaa17ac4e768d5ed85d2f50d471490Automatic Updater# particular file as subject to the "Classpath" exception as provided
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# by Oracle in the LICENSE file that accompanied this code.
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater#
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# This code is distributed in the hope that it will be useful, but WITHOUT
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater# version 2 for more details (a copy is included in the LICENSE file that
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# accompanied this code).
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater# You should have received a copy of the GNU General Public License version
56874aef380a64a2c183b7c282c3e7a361d67fa1Automatic Updater# 2 along with this work; if not, write to the Free Software Foundation,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# or visit www.oracle.com if you need additional information or have any
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# questions.
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater#
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# Makefile for building sunec.jar and sunec native library.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# This file was derived from make/com/sun/crypto/provider/Makefile.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# respectively.)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# jar files do not require signing, but those for JDK do. If an unsigned
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# jar file is installed into JDK, things will break when the crypto
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# routines are called.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# This Makefile does the "real" build of the JCE files. For OpenJDK,
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# the jar files built here are installed directly into the OpenJDK.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# For JDK, the binaries use pre-built/pre-signed binary files stored in
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater# the closed workspace that are not shipped in the OpenJDK workspaces.
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater# We still build the JDK files here to verify the files compile, and in
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# preparation for possible signing. Developers working on JCE in JDK
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# must sign the JCE files before testing. The JCE signing key is kept
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# separate from the JDK workspace to prevent its disclosure.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# be built, signed, and then the resulting jar files MUST BE CHECKED
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# INTO THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater# BE FORGOTTEN*, otherwise a bug fixed in the source code will not be
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# reflected in the shipped binaries. The "release" target should be
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# used to generate the required files.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# There are a number of targets to help both JDK/OpenJDK developers.
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews#
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# Main Targets (JDK/OPENJDK):
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# all/clobber/clean The usual, plus the native libraries.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# If OpenJDK, installs sunec.jar.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# If JDK, installs prebuilt
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# sunec.jar.
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# jar Builds/installs sunec.jar
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# If OpenJDK, does not sign.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# If JDK, tries to sign.
db5b7e2cdf150c46e8242d3e2e3ad3f5c7300258Automatic Updater#
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater# Other lesser-used Targets (JDK/OPENJDK):
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
ca904804e43f663f08eb1ac9d6d617930b9a3cd3Automatic Updater# build-jar Builds sunec.jar
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# (does not sign/install)
db5b7e2cdf150c46e8242d3e2e3ad3f5c7300258Automatic Updater#
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrews# install-jar Alias for "jar" above.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Other targets (JDK only):
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# sign Alias for sign-jar
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# sign-jar Builds/signs sunec.jar (no install)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# release Builds all targets in preparation
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# for workspace integration.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# install-prebuilt Installs the pre-built jar files
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# This makefile was written to support parallel target execution.
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater#
bb93c8542756719b53096b9939e4041d0966026fAutomatic Updater
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic UpdaterBUILDDIR = ../../..
55e03fc54708d97917bf26639b987f759bdc1f44Automatic UpdaterPACKAGE = sun.security.ec
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic UpdaterPRODUCT = sun
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
52367885450d8f61d4f2d63292beb15ba8f39ac7Automatic Updater# The following is for when we need to do postprocessing
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# (signing) against a read-only build. If the OUTPUTDIR
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# isn't writable, the build currently crashes out.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
52367885450d8f61d4f2d63292beb15ba8f39ac7Automatic Updaterifndef OPENJDK
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater ifdef ALT_JCE_BUILD_DIR
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # =====================================================
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # Where to place the output, in case we're building from a read-only
885f47576842cf3c569315b9a48bd9f0ca03f203Automatic Updater # build area. (e.g. a release engineering build.)
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews IGNORE_WRITABLE_OUTPUTDIR_TEST=true
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater else
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updater JCE_BUILD_DIR=${TEMPDIR}
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews endif
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updaterendif
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updaterinclude $(BUILDDIR)/common/Defs.gmk
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater#
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater# Location for the newly built classfiles.
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsCLASSDESTDIR = $(TEMPDIR)/classes
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews# Java files
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark AndrewsAUTO_FILES_JAVA_DIRS = $(PKGDIR)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater# Exclude the sources that get built by ../other/Makefile
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater#
e8c7dc2a5ce48f11c07a67c9923eeb8f419ff19fEvan HuntAUTO_JAVA_PRUNE = \
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater ECKeyFactory.java \
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updater ECParameters.java \
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater ECPrivateKeyImpl.java \
2bb3422dc683c013db7042f5736240de6b86f182Automatic Updater ECPublicKeyImpl.java \
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater NamedCurve.java
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater
3098364bcdd7a719fbafa5fc8d2cc9e90e5a5989Automatic Updater#
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater# Some licensees do not get the native ECC sources, but we still need to
d145b64cacc8d9cda51f9924ec70cd4661c3e2cfAutomatic Updater# be able to build "all" for them. Check here to see if the sources are
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# available. If not, then skip them.
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic UpdaterNATIVE_ECC_AVAILABLE := $(shell \
0df8ead472f207020f8da22a185fe4b945248ab8Automatic Updater if [ -d $(SHARE_SRC)/native/$(PKGDIR)/impl ] ; then \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(ECHO) true; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater else \
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater $(ECHO) false; \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater fi)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updaterifeq ($(NATIVE_ECC_AVAILABLE), true)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater LIBRARY = sunec
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # Java files that define native methods
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater FILES_export = \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(PKGDIR)/ECDHKeyAgreement.java \
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater $(PKGDIR)/ECDSASignature.java \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(PKGDIR)/ECKeyPairGenerator.java
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater JAVAHFLAGS = -bootclasspath "$(CLASSDESTDIR)$(CLASSPATH_SEPARATOR)$(CLASSBINDIR)"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # C and C++ files
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater #
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater include FILES_c.gmk
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater FILES_cpp = ECC_JNI.cpp
7262eb86f2b465822206122921e2f357218f0cfdAutomatic Updater
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews CPLUSPLUSLIBRARY=true
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater FILES_m = mapfile-vers
bbb069be941f649228760edcc241122933c066d2Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
4cda4fd158d6ded5586bacea8c388445d99611eaAutomatic Updater # Find native code
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews #
b0d566a2ce0f5a67f537ee7f8233f82f2584cc61Automatic Updater vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/impl
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater #
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # Find include files
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews #
5ae0e2c8b72fa44237edeb37d1945b1c3535ca39Automatic Updater OTHER_INCLUDES += -I$(SHARE_SRC)/native/$(PKGDIR)/impl
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
f7c88d61cc1ad2435b0b7cfaedfc9d5248c0be25Automatic Updater #
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # Compiler flags
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
bc0a53583d92309bebcf93c408e2f3247ebd3d3cAutomatic Updater OTHER_CFLAGS += -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater # Libraries to link
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater #
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater ifeq ($(PLATFORM), windows)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OTHER_LDLIBS += $(JVMLIB)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater else
7eda3642eea03f1181e41540c7c8791a57759383Automatic Updater OTHER_LDLIBS = -ldl $(JVMLIB) $(LIBCXX)
96713299d08c0735c18ebe8772dd2cc1ecd4356aAutomatic Updater endif
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater include $(BUILDDIR)/common/Mapfile-vers.gmk
7eda3642eea03f1181e41540c7c8791a57759383Automatic Updater
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updater include $(BUILDDIR)/common/Library.gmk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
00be0f9f61d4c6bf197d000bfa1a6b7e70ea0866Automatic Updaterelse # NATIVE_ECC_AVAILABLE
361bec4bdec45042897fb479b7071cd05bbd56b9Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater include $(BUILDDIR)/common/Classes.gmk
71bd43eebd9d6e42dbcae62b730f5b6508d5acd8Automatic Updater
0ce87e5749aabb8eef1e0a37e4bd6e6ffa1d7196Automatic Updaterendif # NATIVE_ECC_AVAILABLE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
3857cb6fcabeb79d85de4b3e3e4ab99912b701f8Mark Andrews# We use a variety of subdirectories in the $(TEMPDIR) depending on what
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater# part of the build we're doing. Both OPENJDK/JDK builds are initially
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater# done in the unsigned area. When files are signed in JDK,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# they will be placed in the appropriate area.
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonUNSIGNED_DIR = $(TEMPDIR)/unsigned
e2caa7536302de34de6cc04025abcd53dc3a499aAutomatic Updater
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninclude $(BUILDDIR)/javax/crypto/Defs-jce.gmk
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Rules
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsifdef OPENJDK
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsall: build-jar install-jar
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewselse
4b2cb1422c7c600fbc13b1cb06a8b4693bc11af8Mark Andrewsall: build-jar install-prebuilt
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(build-warning)
e076d0c88be69de7c190ab924d095e69d2e11f7aAndreas Gustafssonendif
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# =====================================================
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Build the unsigned sunec.jar file.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonJAR_DESTFILE = $(EXTDIR)/sunec.jar
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# Since the -C option to jar is used below, each directory entry must be
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# preceded with the appropriate directory to "cd" into.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonJAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
b4cebdb6ccde66a8f3e397a1b90b0cf788519d69Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updaterbuild-jar: $(UNSIGNED_DIR)/sunec.jar
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# Build sunec.jar.
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater#
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater$(UNSIGNED_DIR)/sunec.jar: build
bc0a4c01beede169df81a3ee5b614ed9e82339dbAutomatic Updater $(prep-target)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater $(BOOT_JAR_JFLAGS)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @$(java-vm-cleanup)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonifndef OPENJDK
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# =====================================================
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Sign the provider jar file. Not needed for OpenJDK.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonSIGNED_DIR = $(JCE_BUILD_DIR)/signed
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonsign: sign-jar
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonsign-jar: $(SIGNED_DIR)/sunec.jar
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonifndef ALT_JCE_BUILD_DIR
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington$(SIGNED_DIR)/sunec.jar: $(UNSIGNED_DIR)/sunec.jar
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonelse
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# We have to remove the build dependency, otherwise, we'll try to rebuild it
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# which we can't do on a read-only filesystem.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington$(SIGNED_DIR)/sunec.jar:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington @if [ ! -r $(UNSIGNED_DIR)/sunec.jar ] ; then \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunec.jar"; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington exit 1; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington fi
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonendif
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(call sign-file, $(UNSIGNED_DIR)/sunec.jar)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# =====================================================
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Create the Release Engineering files. Signed builds, etc.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonrelease: $(SIGNED_DIR)/sunec.jar
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) $(JCE_BUILD_DIR)/release/sunec.jar
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(MKDIR) -p $(JCE_BUILD_DIR)/release
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(CP) $(SIGNED_DIR)/sunec.jar $(JCE_BUILD_DIR)/release
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(release-warning)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonendif # OPENJDK
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# =====================================================
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Install routines.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Install sunec.jar, depending on which type is requested.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
a26b22914b7bf25f065afb8cdef983766dcd672bAutomatic Updaterinstall-jar jar: $(JAR_DESTFILE)
7af91d15b2ce1ce32f7320f6d5cc3b83621c241aAutomatic Updaterifndef OPENJDK
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater $(release-warning)
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updaterendif
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updaterifdef OPENJDK
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunec.jar
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updaterelse
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater$(JAR_DESTFILE): $(SIGNED_DIR)/sunec.jar
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updaterendif
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater $(install-file)
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updaterifndef OPENJDK
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updaterinstall-prebuilt:
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater @$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater $(RM) $(JAR_DESTFILE)
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater $(CP) $(PREBUILT_DIR)/ec/sunec.jar $(JAR_DESTFILE)
0d3490f93bb980fde704055e74c1b508987a5fe4Mark Andrewsendif
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# =====================================================
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Support routines.
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews#
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonclobber clean::
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews $(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews.PHONY: build-jar jar install-jar
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updaterifndef OPENJDK
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington.PHONY: sign sign-jar release install-prebuilt
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updaterendif
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater