blob: 0ac509cc7be3fd44811e3f0e18ec4c948989df35 [file] [log] [blame]
Fredrik Ohstrome32ab982012-04-10 08:22:03 -07001#
David Holmese0cc6372013-04-29 07:40:04 -04002# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
Fredrik Ohstrome32ab982012-04-10 08:22:03 -07003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26INCLUDEDIR = $(JDK_OUTPUTDIR)/include
Erik Joelssonf558e392012-06-07 20:40:50 -070027
Erik Joelsson4e7263a2012-07-03 16:10:44 -070028OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070029
Erik Joelsson4e7263a2012-07-03 16:10:44 -070030ifeq ($(OPENJDK_TARGET_OS), windows)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020031 OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
Erik Joelsson4e7263a2012-07-03 16:10:44 -070032else ifeq ($(OPENJDK_TARGET_OS), macosx)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020033 OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
Erik Joelssonf558e392012-06-07 20:40:50 -070034endif
35
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070036#
37# Copy exported header files to outputdir.
38#
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020039H_TARGET_FILES = $(INCLUDEDIR)/jdwpTransport.h \
40 $(INCLUDEDIR)/jni.h \
41 $(INCLUDEDIR)/jvmti.h \
42 $(INCLUDEDIR)/jvmticmlr.h \
43 $(INCLUDEDIR)/classfile_constants.h \
44 $(INCLUDEDIR)/jawt.h \
45 $(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
46 $(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070047
48$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
Erik Joelsson989cb5b2013-04-05 09:39:10 +020049 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070050
David Dehaven93e44ca2013-10-24 20:46:23 -040051$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export/%.h
Erik Joelsson989cb5b2013-04-05 09:39:10 +020052 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070053
54COPY_FILES = $(H_TARGET_FILES)
55
56##########################################################################################
57
Ragini Prasad435bcab2013-01-18 11:33:31 -080058ifndef OPENJDK
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020059 ifeq ($(OPENJDK_TARGET_OS), windows)
Ragini Prasad435bcab2013-01-18 11:33:31 -080060 COPY_FILES += $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCallbacks.h \
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020061 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
62 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
63 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
64 $(JDK_OUTPUTDIR)/lib/accessibility.properties
Ragini Prasad435bcab2013-01-18 11:33:31 -080065
66 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/%: \
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020067 $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/%
68 $(install-file)
Ragini Prasad435bcab2013-01-18 11:33:31 -080069
70 $(JDK_OUTPUTDIR)/lib/accessibility.properties: \
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020071 $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/accessibility.properties
72 $(install-file)
Ragini Prasad435bcab2013-01-18 11:33:31 -080073
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +020074 endif
Ragini Prasad435bcab2013-01-18 11:33:31 -080075endif
76
77##########################################################################################
78
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070079LIBDIR = $(JDK_OUTPUTDIR)/lib
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070080
81MGMT_LIBDIR = $(LIBDIR)/management
82MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
83MGMT_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*)
84MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
85
86$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +020087 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070088 $(CHMOD) 644 $@
89
Erik Joelsson4e7263a2012-07-03 16:10:44 -070090# this file has different permissions...don't know why...
91$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
Erik Joelsson989cb5b2013-04-05 09:39:10 +020092 $(call install-file)
Erik Joelsson4e7263a2012-07-03 16:10:44 -070093 $(CHMOD) 644 $@
94
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070095$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
Erik Joelsson989cb5b2013-04-05 09:39:10 +020096 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -070097 $(CHMOD) 444 $@
98
99COPY_FILES += $(MGMT_TARGET_FILES)
100
101##########################################################################################
102
103LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib
104
105$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200106 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700107
108COPY_FILES += $(LIBDIR)/logging.properties
109
110##########################################################################################
111#
112# Copy property files from sun/print to LIBDIR
113#
114PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print
115PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*)
116PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
117
Erik Joelssonf558e392012-06-07 20:40:50 -0700118$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200119 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700120
121COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
122
123##########################################################################################
124#
125# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
126#
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700127ifneq ($(OPENJDK_TARGET_OS), macosx)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200128 OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700129else
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200130 OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700131endif
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700132
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700133$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200134 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700135
136COPY_FILES += $(LIBDIR)/flavormap.properties
137
138CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
Kelly O'Hairc363db82012-09-18 11:29:24 -0700139CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700140
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700141$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200142 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700143
144COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
145
146CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700147ifeq ($(OPENJDK_TARGET_OS), windows)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200148 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700149else # OPENJDK_TARGET_OS
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200150 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700151endif # OPENJDK_TARGET_OS
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200152CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700153
Erik Joelssonf558e392012-06-07 20:40:50 -0700154$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200155 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700156
157COPY_FILES += $(CURSORS_TARGET_FILES)
158
159##########################################################################################
160
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200161CONTENT_TYPES_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700162
163$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200164 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700165
166COPY_FILES += $(LIBDIR)/content-types.properties
167
168##########################################################################################
169
Erik Joelssonf558e392012-06-07 20:40:50 -0700170CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib
171
172$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200173 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700174
175COPY_FILES += $(LIBDIR)/calendars.properties
176
Stephen Colebourne58af1572013-04-12 07:57:35 -0700177$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
178 $(MKDIR) -p $(@D)
179 $(RM) $@
180 $(CP) $< $@
181
182COPY_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
183
Erik Joelssonf558e392012-06-07 20:40:50 -0700184##########################################################################################
185
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200186ifeq ($(OPENJDK_TARGET_OS), windows)
Erik Joelssonf558e392012-06-07 20:40:50 -0700187
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200188 TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
Erik Joelssonf558e392012-06-07 20:40:50 -0700189
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200190 $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200191 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700192
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200193 COPY_FILES += $(LIBDIR)/tzmappings
Erik Joelssonf558e392012-06-07 20:40:50 -0700194
195endif
196
197##########################################################################################
198
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700199ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
200
201ifdef OPENJDK
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200202 ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
Staffan Larsenbe7ed4c2013-06-10 11:33:50 +0200203else
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200204 ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700205endif
206
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200207ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
208ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700209
210$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200211 $(call install-file)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700212 $(CHMOD) 444 $@
213
214COPY_FILES += $(ICCPROFILE_TARGET_FILES)
215
216##########################################################################################
217
Magnus Ihse Bursiee4ff6012013-10-23 13:06:37 +0200218ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
219 # We need to bundle the freetype library, so it will be available at runtime as well as link time.
220 #
221 # NB: Default freetype build system uses -h linker option and
222 # result .so contains hardcoded library name that is later
223 # used for adding dependencies to other objects
224 # (e.g. libfontmanager.so).
225 #
226 # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
227 # without overcomplicating logic here.
228 # To workaround this we hardcode .6 suffix for now.
229 #
230 # Note that .so.6 library will not be found by System.loadLibrary()
231 # but fortunately we need to load FreeType library explicitly
232 # on windows only
233 #
234 #TODO: rework this to avoid hardcoding library name in the makefile
235 #
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200236 ifeq ($(OPENJDK_TARGET_OS), windows)
Magnus Ihse Bursiee4ff6012013-10-23 13:06:37 +0200237 FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200238 else
Magnus Ihse Bursiee4ff6012013-10-23 13:06:37 +0200239 FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200240 endif
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700241
Magnus Ihse Bursiee4ff6012013-10-23 13:06:37 +0200242 $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
243 $(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200244 ifeq ($(OPENJDK_BUILD_OS), windows)
245 $(CHMOD) +rx $@
246 endif
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700247
Magnus Ihse Bursiee4ff6012013-10-23 13:06:37 +0200248 COPY_FILES += $(FREETYPE_TARGET_LIB)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700249endif
250
251##########################################################################################
252
Kelly O'Hair38c629a2012-10-26 14:23:29 -0700253# Copy msvcrXX.dll on windows
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700254
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200255ifeq ($(OPENJDK_TARGET_OS), windows)
256 MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
257 # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
258 $(MSVCR_TARGET): $(MSVCR_DLL)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200259 $(call install-file)
Erik Joelssona1d76532013-01-29 16:35:24 +0100260 $(CHMOD) a+rx $@
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700261
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200262 COPY_FILES += $(MSVCR_TARGET)
Fredrik Ohstrome32ab982012-04-10 08:22:03 -0700263endif
264
265##########################################################################################
Erik Joelssonf558e392012-06-07 20:40:50 -0700266
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200267HPROF_SRC = $(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
Erik Joelssonf558e392012-06-07 20:40:50 -0700268
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200269$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200270 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700271
272COPY_FILES += $(LIBDIR)/jvm.hprof.txt
273
274##########################################################################################
275
276#
277# How to install jvm.cfg.
278#
279ifeq ($(JVM_VARIANT_ZERO), true)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200280 JVMCFG_ARCH := zero
Erik Joelssonf558e392012-06-07 20:40:50 -0700281else
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200282 JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
Erik Joelssonf558e392012-06-07 20:40:50 -0700283endif
284
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200285ifeq ($(OPENJDK_TARGET_OS), macosx)
Erik Joelssonf558e392012-06-07 20:40:50 -0700286 JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
Erik Joelssonf558e392012-06-07 20:40:50 -0700287else
Kelly O'Hairc363db82012-09-18 11:29:24 -0700288 JVMCFG_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
Erik Joelssonf558e392012-06-07 20:40:50 -0700289endif
Kelly O'Hairc363db82012-09-18 11:29:24 -0700290JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
Erik Joelssonf558e392012-06-07 20:40:50 -0700291JVMCFG := $(JVMCFG_DIR)/jvm.cfg
292
Omair Majid4a2acff2013-08-22 16:00:13 -0400293# To do: should this also support -zeroshark?
Erik Joelssonf558e392012-06-07 20:40:50 -0700294
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200295ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
Omair Majid4a2acff2013-08-22 16:00:13 -0400296 COPY_JVM_CFG_FILE := true
297else
David Holmese0cc6372013-04-29 07:40:04 -0400298 # On 32-bit machines we have three potential VMs: client, server and minimal.
299 # Historically we usually have both client and server and so that is what the
300 # committed jvm.cfg expects (including platform specific ergonomics switches
301 # to decide whether to use client or server by default). So when we have anything
302 # other than client and server we need to define a new jvm.cfg file.
303 # The main problem is deciding whether to use aliases for the VMs that are not
304 # present and the current position is that we add aliases for client and server, but
305 # not for minimal.
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200306 CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
David Holmese0cc6372013-04-29 07:40:04 -0400307 ifeq ($(CLIENT_AND_SERVER), true)
Omair Majid4a2acff2013-08-22 16:00:13 -0400308 COPY_JVM_CFG_FILE := true
309 else
310 # For zero, the default jvm.cfg file is sufficient
311 ifeq ($(JVM_VARIANT_ZERO), true)
312 COPY_JVM_CFG_FILE := true
313 endif
314 endif
315endif
316
317ifeq ($(COPY_JVM_CFG_FILE), true)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200318 $(JVMCFG): $(JVMCFG_SRC)
David Holmese0cc6372013-04-29 07:40:04 -0400319 $(call install-file)
Omair Majid4a2acff2013-08-22 16:00:13 -0400320else
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200321 $(JVMCFG):
David Holmese0cc6372013-04-29 07:40:04 -0400322 $(MKDIR) -p $(@D)
323 $(RM) $(@)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200324 # Now check for other permutations
325 ifeq ($(JVM_VARIANT_SERVER), true)
326 $(PRINTF) "-server KNOWN\n">>$(@)
327 $(PRINTF) "-client ALIASED_TO -server\n">>$(@)
328 ifeq ($(JVM_VARIANT_MINIMAL1), true)
David Holmese0cc6372013-04-29 07:40:04 -0400329 $(PRINTF) "-minimal KNOWN\n">>$(@)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200330 endif
331 else
332 ifeq ($(JVM_VARIANT_CLIENT), true)
David Holmese0cc6372013-04-29 07:40:04 -0400333 $(PRINTF) "-client KNOWN\n">>$(@)
334 $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
335 ifeq ($(JVM_VARIANT_MINIMAL1), true)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200336 $(PRINTF) "-minimal KNOWN\n">>$(@)
David Holmese0cc6372013-04-29 07:40:04 -0400337 endif
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200338 else
David Holmese0cc6372013-04-29 07:40:04 -0400339 ifeq ($(JVM_VARIANT_MINIMAL1), true)
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200340 $(PRINTF) "-minimal KNOWN\n">>$(@)
341 $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
342 $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
David Holmese0cc6372013-04-29 07:40:04 -0400343 endif
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200344 endif
Erik Joelssonf558e392012-06-07 20:40:50 -0700345 endif
Erik Joelssonf558e392012-06-07 20:40:50 -0700346endif
347
348COPY_FILES += $(JVMCFG)
349
350##########################################################################################
351
Alan Batemanf5797a22012-12-05 12:20:00 +0000352PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
Erik Joelssonf558e392012-06-07 20:40:50 -0700353PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
354
Sean Mullan2f923e82013-10-11 08:43:07 -0400355ifndef OPENJDK
356
357RESTRICTED_PKGS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/restricted.pkgs
358RESTRICTED_PKGS := $(shell $(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " ")
359
360$(PROPS_DST): $(PROPS_SRC)
361 $(MKDIR) -p $(@D)
362 $(TOOL_ADDTORESTRICTEDPKGS) $^ $@.tmp $(RESTRICTED_PKGS)
363 $(MV) $@.tmp $@
364
365else
366
Erik Joelssonf558e392012-06-07 20:40:50 -0700367$(PROPS_DST): $(PROPS_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200368 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700369
Sean Mullan2f923e82013-10-11 08:43:07 -0400370endif
371
Erik Joelssonf558e392012-06-07 20:40:50 -0700372COPY_FILES += $(PROPS_DST)
373
374##########################################################################################
375
376POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
377POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
378
379$(POLICY_DST): $(POLICY_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200380 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700381
382COPY_FILES += $(POLICY_DST)
383
384##########################################################################################
385
386CACERTS_SRC := $(CACERTS_FILE)
387CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
388
389$(CACERTS_DST): $(CACERTS_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200390 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700391
392COPY_FILES += $(CACERTS_DST)
393
394##########################################################################################
395
Weijun Wangac8db732013-09-18 21:37:45 +0800396BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/src/share/lib/security/blacklisted.certs
397BLACKLISTED_CERTS_DST := $(JDK_OUTPUTDIR)/lib/security/blacklisted.certs
398
Erik Joelssonf558e392012-06-07 20:40:50 -0700399ifndef OPENJDK
400
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200401 BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
402 BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
Erik Joelssonf558e392012-06-07 20:40:50 -0700403
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200404 BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
Weijun Wangac8db732013-09-18 21:37:45 +0800405
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200406 TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
407 TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
Erik Joelssonf558e392012-06-07 20:40:50 -0700408
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200409 $(BLACKLIST_DST): $(BLACKLIST_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200410 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700411
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200412 COPY_FILES += $(BLACKLIST_DST)
Erik Joelssonf558e392012-06-07 20:40:50 -0700413
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200414 $(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200415 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700416
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200417 COPY_FILES += $(TRUSTEDLIBS_DST)
Erik Joelssonf558e392012-06-07 20:40:50 -0700418
419endif
420
Weijun Wangac8db732013-09-18 21:37:45 +0800421$(BLACKLISTED_CERTS_DST): $(BLACKLISTED_CERTS_SRC)
422 $(MKDIR) -p $(@D)
423 $(CAT) $^ | $(SED) '/^$$/d' | $(SORT) | $(UNIQ) > $@.tmp
424 $(GREP) -i Algorithm $@.tmp > $@
425 if [ `$(SED) -n -e "$$=" $@` != 1 ]; then \
426 $(ECHO) "Different algorithms defined in $^"; \
427 $(RM) $@ $@.tmp; \
428 false; \
429 fi
430 $(GREP) -iv Algorithm $@.tmp >> $@
431 $(RM) $@.tmp
432
433COPY_FILES += $(BLACKLISTED_CERTS_DST)
434
Erik Joelssonf558e392012-06-07 20:40:50 -0700435##########################################################################################
436
437ifndef OPENJDK
438
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200439 SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
440 SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
441 SHARED_FONTS_FILES := \
442 LucidaTypewriterRegular.ttf \
443 LucidaTypewriterBold.ttf \
444 LucidaBrightRegular.ttf \
445 LucidaBrightDemiBold.ttf \
446 LucidaBrightItalic.ttf \
447 LucidaBrightDemiItalic.ttf \
448 LucidaSansRegular.ttf \
449 LucidaSansDemiBold.ttf \
Erik Joelssonf558e392012-06-07 20:40:50 -0700450
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200451 SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
452 SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))
Erik Joelssonf558e392012-06-07 20:40:50 -0700453
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200454 $(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200455 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700456
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200457 $(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200458 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700459
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200460 COPY_FILES += $(SHARED_FONTS_DST)
Kelly O'Hairc363db82012-09-18 11:29:24 -0700461
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200462 ifneq ($(OPENJDK_TARGET_OS), windows)
Kelly O'Hairc363db82012-09-18 11:29:24 -0700463 COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200464 endif
Erik Joelssonf558e392012-06-07 20:40:50 -0700465
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200466 ifeq ($(OPENJDK_TARGET_OS), linux)
Erik Joelssonf558e392012-06-07 20:40:50 -0700467
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200468 # The oblique fonts are only needed/wanted on Linux.
Erik Joelssonf558e392012-06-07 20:40:50 -0700469
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200470 OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
471 OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
472 OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
473 LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
Erik Joelssonf558e392012-06-07 20:40:50 -0700474
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200475 OBL_FONTS_SRC := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_SRC_DIR)/$(F))
476 OBL_FONTS_DST := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_DST_DIR)/$(F))
Erik Joelssonf558e392012-06-07 20:40:50 -0700477
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200478 $(OBL_FONTS_DST_DIR)/%.ttf: $(OBL_FONTS_SRC_DIR)/%.ttf
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200479 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700480
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200481 $(OBL_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200482 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700483
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200484 COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
Erik Joelssonf558e392012-06-07 20:40:50 -0700485
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200486 endif # linux
Erik Joelssonf558e392012-06-07 20:40:50 -0700487endif # OPENJDK
488
489##########################################################################################
490
491ifndef OPENJDK
492
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200493 #
494 # Solaris X11 Direct Graphics Access library
495 #
Erik Joelssonf558e392012-06-07 20:40:50 -0700496
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200497 _DGALIBS_sparc = \
498 libxinerama.so \
499 libjdgaSUNWcg6.so \
500 libjdgaSUNWffb.so \
501 libjdgaSUNWm64.so \
502 libjdgaSUNWafb.so
Erik Joelssonf558e392012-06-07 20:40:50 -0700503
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200504 _DGALIBS_sparcv9 = \
505 libxinerama.so \
506 libjdgaSUNWcg6.so \
507 libjdgaSUNWffb.so \
508 libjdgaSUNWm64.so \
509 libjdgaSUNWafb.so
Erik Joelssonf558e392012-06-07 20:40:50 -0700510
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200511 _DGALIBS_i586 = # no i586 library yet
Erik Joelssonf558e392012-06-07 20:40:50 -0700512
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200513 _DGALIBS_amd64 = # no amd64 library yet
Erik Joelssonf558e392012-06-07 20:40:50 -0700514
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200515 DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
Erik Joelssonf558e392012-06-07 20:40:50 -0700516
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200517 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200518 $(call install-file)
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700519 $(CHMOD) 755 $@
Erik Joelssonf558e392012-06-07 20:40:50 -0700520
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200521 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200522 $(call install-file)
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700523 $(CHMOD) 755 $@
Erik Joelssonf558e392012-06-07 20:40:50 -0700524
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200525 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
Erik Joelssonf558e392012-06-07 20:40:50 -0700526 $(MKDIR) -p $(@D)
527 $(RM) $@
Kelly O'Hair38c629a2012-10-26 14:23:29 -0700528 $(LN) -s $(<F) $@
Erik Joelssonf558e392012-06-07 20:40:50 -0700529
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200530 COPY_FILES += $(DGALIBS)
Erik Joelssonf558e392012-06-07 20:40:50 -0700531
532endif
533
534##########################################################################################
535
Erik Joelsson4e7263a2012-07-03 16:10:44 -0700536ifeq ($(OPENJDK_TARGET_OS), solaris)
Erik Joelssonf558e392012-06-07 20:40:50 -0700537
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200538 SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
539 SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
Erik Joelssonf558e392012-06-07 20:40:50 -0700540
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200541 $(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200542 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700543
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200544 COPY_FILES += $(SUNPKCS11_CFG_DST)
Erik Joelssonf558e392012-06-07 20:40:50 -0700545
546endif
547
548##########################################################################################
549
550ifndef OPENJDK
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200551 ifeq ($(OPENJDK_TARGET_OS), solaris)
Erik Joelssonf558e392012-06-07 20:40:50 -0700552
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200553 UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
554 UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
Erik Joelssonf558e392012-06-07 20:40:50 -0700555
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200556 $(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200557 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700558
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200559 COPY_FILES += $(UCRYPTO_CFG_DST)
Erik Joelssonf558e392012-06-07 20:40:50 -0700560
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200561 endif
Erik Joelssonf558e392012-06-07 20:40:50 -0700562endif
563
564##########################################################################################
565
Magnus Ihse Bursiec0c56182013-10-10 15:06:21 +0200566$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/share/lib/sound.properties
Erik Joelsson989cb5b2013-04-05 09:39:10 +0200567 $(call install-file)
Erik Joelssonf558e392012-06-07 20:40:50 -0700568
569COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
570
571##########################################################################################
Staffan Larsenbe7ed4c2013-06-10 11:33:50 +0200572
Erik Joelssonce1f93f2013-06-25 09:25:16 +0200573-include $(CUSTOM_MAKE_DIR)/CopyFiles.gmk