jdk/make/javax/crypto/Makefile
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
child 300 d4f77ff718fd
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile for building jce.jar and the various cryptographic strength
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# policy jar files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
# respectively.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# JCE builds are very different between OpenJDK and JDK.  The OpenJDK JCE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# jar files do not require signing, but those for JDK do.  If an unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# jar file is installed into JDK, things will break when the crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
# routines are called.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
# This Makefile does the "real" build of the JCE files.  There are some
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# javac options currently specific to JCE, so we recompile now to make
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# sure any implicit compilations didn't use any incorrect flags.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
# For OpenJDK, the jar files built here are installed directly into the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
# OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
# For JDK, the binaries use pre-built/pre-signed/pre-obfuscated binary
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# files stored in the closed workspace that are not shipped in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# OpenJDK workspaces.  We still build the JDK files here to verify the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
# files compile, and in preparation for possible signing and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
# obfuscation.  Developers working on JCE in JDK must sign the JCE files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
# before testing: obfuscation is optional during development.  The JCE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
# signing key is kept separate from the JDK workspace to prevent its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
# disclosure.  The obfuscation tool has not been licensed for general
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
# usage.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
# SPECIAL NOTE TO JCE/JDK developers:  The source files must eventually
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
# be built, obfuscated, signed, and the resulting jar files *MUST BE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# CHECKED INTO THE CLOSED PART OF THE WORKSPACE*.  This separate step
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
# *MUST NOT BE FORGOTTEN*, otherwise a bug fixed in the source code will
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
# not be reflected in the shipped binaries.  The "release" target should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
# be used to generate the required files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
# There are a number of targets to help both JDK/OpenJDK developers.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
# Main Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#     all/clobber/clean		The usual.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#				    If OpenJDK, installs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#					jce.jar/limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#				    If JDK, installs prebuilt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#					jce.jar/limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#     jar			Builds/installs jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#				    If OpenJDK, does not sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#				    If JDK, tries to sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
# Other lesser-used Targets (JDK/OPENJDK):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#     build-jar			Builds jce.jar (does not sign/install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#     build-policy		Builds policy files (does not sign/install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#     install-jar		Alias for "jar" above
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#     install-limited		Builds/installs limited policy files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
#				    If OpenJDK, does not sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
#				    If JDK, tries to sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
#     install-unlimited		Builds/nstalls unlimited policy files
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
#				    If OpenJDK, does not sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
#				    If JDK, tries to sign
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
# Other targets (JDK only):
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
#     sign			Alias for sign-jar and sign-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
#	  sign-jar		Builds/signs jce.jar file (no install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
#	  sign-policy		Builds/signs policy files (no install)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
#     obfus			Builds/obfuscates/signs/installs jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#     release			Builds all targets in preparation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#				for workspace integration.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
#     install-prebuilt		Installs the pre-built jar files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
# This makefile was written to support parallel target execution.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
PACKAGE = javax.crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
include Defs-jce.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
# Location for the newly built classfiles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
CLASSDESTDIR = $(TEMPDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
# Subdirectories of these are automatically included.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
AUTO_FILES_JAVA_DIRS = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    javax/crypto \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    sun/security/internal/interfaces \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    sun/security/internal/spec
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
include $(BUILDDIR)/common/Classes.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
# Rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
# Some licensees do not get the security sources, but we still need to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
# be able to build "all" for them.  Check here to see if the sources were
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
# available.  If not, then we don't need to continue this rule.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
all: build-jar install-jar build-policy install-limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
else  # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
ifeq ($(strip $(FILES_java)),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
all:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
	$(no-source-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
else  # FILES_java/policy files available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
all: build-jar build-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
	$(build-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
endif # $(FILES_java)/policy files available
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
# part of the build we're doing.  Both OPENJDK/JDK builds are initially
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
# done in the unsigned area.  When files are signed or obfuscated in JDK,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
# they will be placed in the appropriate areas.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
UNSIGNED_DIR = $(TEMPDIR)/unsigned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
# Build the unsigned jce.jar file.  Signing/obfuscation comes later.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
JAR_DESTFILE = $(LIBDIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
# JCE building is somewhat involved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
# OpenJDK:  Since we do not ship prebuilt JCE files, previous compiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
# in the build may have needed JCE class signatures.  There were then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
# implicitly built by javac (likely using the boot javac).  While using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
# those class files was fine for signatures, we need to rebuild using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
# the right compiler.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
# JDK:  Even through the jce.jar was previously installed, since the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
# source files are accessible in the source directories, they will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
# always be "newer" than the prebuilt files inside the jar, and thus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
# make will always rebuild them.  (We could "hide" the JCE source in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
# separate directory, but that would make the build logic for JDK and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
# OpenJDK more complicated.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
# Thus in either situation, we shouldn't use these files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
# To make sure the classes were built with the right compiler options,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
# delete the existing files in $(CLASSBINDIR), rebuild the right way in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
# directory under $(TEMPDIR), then copy the files back to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
# $(CLASSBINDIR).   Building in $(TEMPDIR) allows us to use our make
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
# infrastructure without modification:  .classes.list, macros, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
# The list of directories that will be remade from scratch, using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
# right compilers/options.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
DELETE_DIRS = $(patsubst %, $(CLASSBINDIR)/%, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
# Since the -C option to jar is used below, each directory entry must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
# preceded with the appropriate directory to "cd" into.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
build-jar: $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
# Build jce.jar, then replace the previously built JCE files in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
# classes directory with these.  This ensures we have consistently built
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
# files throughout the workspaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
$(UNSIGNED_DIR)/jce.jar: prebuild build $(JCE_MANIFEST_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
	    $(JAR_JFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
	$(CP) -r $(CLASSDESTDIR)/* $(CLASSBINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
build: prebuild
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
prebuild:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
	$(RM) -r $(DELETE_DIRS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
# Build the unsigned policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
# Given the current state of world export/import policies,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
# these settings work for Sun's situation.  This note is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
# legal guidance, you must still resolve any export/import issues
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
# applicable for your situation.  Contact your export/import
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
# counsel for more information.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
POLICY_DESTDIR			= $(LIBDIR)/security
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
UNSIGNED_POLICY_BUILDDIR	= $(UNSIGNED_DIR)/policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
build-policy: unlimited limited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
# Build the unsigned unlimited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
unlimited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
	    policy/unlimited/default_US_export.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
	    policy/unlimited/UNLIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
	    -C policy/unlimited default_US_export.policy		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
	    $(JAR_JFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
	    policy/unlimited/default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
	    policy/unlimited/UNLIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
	$(BOOT_JAR_CMD) cmf policy/unlimited/UNLIMITED $@		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
	    -C policy/unlimited default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
	    $(JAR_JFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
# Build the unsigned limited policy files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
# NOTE:  We currently do not place restrictions on our limited export
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
# policy.  This was not a typo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
limited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
	    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
	    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
	    policy/limited/default_local.policy				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
	    policy/limited/exempt_local.policy				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
	    policy/limited/LIMITED
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
	$(BOOT_JAR_CMD) cmf policy/limited/LIMITED $@			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
	    -C policy/limited default_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
	    -C policy/limited exempt_local.policy			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
	    $(JAR_JFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
UNSIGNED_POLICY_FILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
    $(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
    $(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
    $(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
# Sign the various jar files.  Not needed for OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
SIGNED_DIR		= $(TEMPDIR)/signed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
SIGNED_POLICY_BUILDDIR	= $(SIGNED_DIR)/policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
SIGNED_POLICY_FILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
    $(patsubst $(UNSIGNED_POLICY_BUILDDIR)/%,$(SIGNED_POLICY_BUILDDIR)/%, \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
	$(UNSIGNED_POLICY_FILES))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
sign: sign-jar sign-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
sign-jar: $(SIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
sign-policy: $(SIGNED_POLICY_FILES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
$(SIGNED_DIR)/jce.jar: $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
	$(sign-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
$(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar:	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
	$(sign-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
$(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
$(UNSIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
	$(sign-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
$(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
$(UNSIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
	$(sign-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
$(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar:		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
$(UNSIGNED_POLICY_BUILDDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
	$(sign-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
# Obfuscate/sign/install the JDK build.  Not needed for OpenJDK.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
OBFUS_DIR = $(TEMPDIR)/obfus
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
CLOSED_DIR = $(BUILDDIR)/closed/javax/crypto
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
obfus: $(OBFUS_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
$(OBFUS_DIR)/jce.jar: build-jar $(JCE_MANIFEST_FILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
	$(presign)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
	$(preobfus)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
	@$(ECHO) ">>>Obfuscating JCE framework..."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
	$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
	$(CD) $(OBFUS_DIR); \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
	$(OBFUSCATOR) -fv \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
	    $(CURRENT_DIRECTORY)/$(CLOSED_DIR)/obfus/framework.dox
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
	@$(CD) $(OBFUS_DIR); $(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
	@# The sun.security.internal classes are currently not obfuscated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
	@# due to an obfus problem. Manually copy them to the build directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
	@# so that they are included in the jce.jar file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
	$(CP) -r $(CLASSDESTDIR)/sun $(OBFUS_DIR)/build
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
	$(RM) $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
	$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
	    -C $(OBFUS_DIR)/build javax			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
	    -C $(OBFUS_DIR)/build sun			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
	    $(JAR_JFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
	$(sign-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
	$(MKDIR) -p $(dir $(JAR_DESTFILE))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
	$(RM) $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
	$(CP) $@ $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
	@$(java-vm-cleanup)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
# The current obfuscator has a limitation in that it currently only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
# supports up to v49 class file format.  Force v49 classfiles in our
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
# builds for now.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
TARGET_CLASS_VERSION = 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
# Create the Release Engineering files.  Obfuscated builds,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
# unlimited policy file distribution, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
release: $(OBFUS_DIR)/jce.jar sign-policy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
	$(RM) -r \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
	    $(RELEASE_DIR)/UnlimitedJCEPolicy \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
	    $(RELEASE_DIR)/jce.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
	    $(RELEASE_DIR)/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
	    $(RELEASE_DIR)/local_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
	    $(RELEASE_DIR)/UnlimitedJCEPolicy.zip
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
	$(MKDIR) -p $(RELEASE_DIR)/UnlimitedJCEPolicy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
	$(CP) $(OBFUS_DIR)/jce.jar $(RELEASE_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
	$(CP) -r \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
	    $(SIGNED_POLICY_BUILDDIR)/limited/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
	    $(SIGNED_POLICY_BUILDDIR)/limited/local_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
	    $(RELEASE_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
	$(CP) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
	    $(SIGNED_POLICY_BUILDDIR)/unlimited/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
	    $(SIGNED_POLICY_BUILDDIR)/unlimited/local_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
	    $(RELEASE_DIR)/UnlimitedJCEPolicy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
	$(CP) $(CLOSED_DIR)/doc/COPYRIGHT.html \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
	    $(CLOSED_DIR)/doc/README.txt $(RELEASE_DIR)/UnlimitedJCEPolicy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
	cd $(RELEASE_DIR) ; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
	$(ZIPEXE) -qr UnlimitedJCEPolicy.zip UnlimitedJCEPolicy
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
endif # OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
# Install routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
# Install jce.jar, depending on which type is requested.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
install-jar jar: $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
$(JAR_DESTFILE): $(UNSIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
$(JAR_DESTFILE): $(SIGNED_DIR)/jce.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
	$(install-file)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
# Install the appropriate policy file, depending on the type of build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
INSTALL_POLICYDIR = $(UNSIGNED_POLICY_BUILDDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
INSTALL_POLICYDIR = $(SIGNED_POLICY_BUILDDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
install-limited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
	    $(INSTALL_POLICYDIR)/limited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
	    $(INSTALL_POLICYDIR)/limited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
	$(MKDIR) -p $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
	$(RM) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
	    $(POLICY_DESTDIR)/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
	$(CP) $^ $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
install-unlimited: \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
	    $(INSTALL_POLICYDIR)/unlimited/US_export_policy.jar	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
	    $(INSTALL_POLICYDIR)/unlimited/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
	$(MKDIR) -p $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
	$(RM) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
	    $(POLICY_DESTDIR)/US_export_policy.jar		\
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
	$(CP) $^ $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
	$(release-warning)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
install-prebuilt:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
	@$(ECHO) "\n>>>Installing prebuilt JCE framework..."
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
	$(RM) $(JAR_DESTFILE) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
	    $(POLICY_DESTDIR)/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
	    $(POLICY_DESTDIR)/local_policy.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
	$(CP) $(PREBUILT_DIR)/jce/jce.jar $(JAR_DESTFILE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
	$(CP) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
	    $(PREBUILT_DIR)/jce/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
	    $(PREBUILT_DIR)/jce/local_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
	    $(POLICY_DESTDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
# =====================================================
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
# Support routines.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
clobber clean::
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
	$(RM) -r $(JAR_DESTFILE) $(POLICY_DESTDIR)/US_export_policy.jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
	    $(POLICY_DESTDIR)/local_policy.jar $(DELETE_DIRS) $(TEMPDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
.PHONY: build-jar jar build-policy unlimited limited install-jar \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
	install-limited install-unlimited
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
ifndef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
.PHONY: sign sign-jar sign-policy obfus release install-prebuilt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
endif