blob: debf8f2c952fd94e9c2edf7f3bde37adfa61e8ce [file] [log] [blame]
ohair92de5662012-04-10 08:22:03 -07001#
coffeys1fcdb422016-11-09 21:09:10 +00002# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
ohair92de5662012-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
erikje78df742012-06-07 20:40:50 -070027
erikjaf85fc42012-07-03 16:10:44 -070028OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
ohair92de5662012-04-10 08:22:03 -070029
erikjaf85fc42012-07-03 16:10:44 -070030ifeq ($(OPENJDK_TARGET_OS), windows)
ihsea29e6222013-10-10 15:06:21 +020031 OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
erikjaf85fc42012-07-03 16:10:44 -070032else ifeq ($(OPENJDK_TARGET_OS), macosx)
ihsea29e6222013-10-10 15:06:21 +020033 OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
erikje78df742012-06-07 20:40:50 -070034endif
35
ohair92de5662012-04-10 08:22:03 -070036#
37# Copy exported header files to outputdir.
38#
ihsea29e6222013-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
ohair92de5662012-04-10 08:22:03 -070047
48$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
erikj10d96fb2013-04-05 09:39:10 +020049 $(call install-file)
ohair92de5662012-04-10 08:22:03 -070050
dholmes753cdfd2013-10-24 20:46:23 -040051$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export/%.h
erikj10d96fb2013-04-05 09:39:10 +020052 $(call install-file)
ohair92de5662012-04-10 08:22:03 -070053
54COPY_FILES = $(H_TARGET_FILES)
55
56##########################################################################################
57
ihsea29e6222013-10-10 15:06:21 +020058 ifeq ($(OPENJDK_TARGET_OS), windows)
raginip450da982013-01-18 11:33:31 -080059 COPY_FILES += $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCallbacks.h \
ihsea29e6222013-10-10 15:06:21 +020060 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
61 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
62 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
63 $(JDK_OUTPUTDIR)/lib/accessibility.properties
raginip450da982013-01-18 11:33:31 -080064
65 $(OPENJDK_TARGET_OS_INCLUDE)/bridge/%: \
ptbrunetdc4e52b2015-03-31 18:39:00 +040066 $(JDK_TOPDIR)/src/windows/native/sun/bridge/%
ihsea29e6222013-10-10 15:06:21 +020067 $(install-file)
raginip450da982013-01-18 11:33:31 -080068
69 $(JDK_OUTPUTDIR)/lib/accessibility.properties: \
ptbrunetdc4e52b2015-03-31 18:39:00 +040070 $(JDK_TOPDIR)/src/windows/native/sun/bridge/accessibility.properties
ihsea29e6222013-10-10 15:06:21 +020071 $(install-file)
raginip450da982013-01-18 11:33:31 -080072endif
73
74##########################################################################################
75
ohair92de5662012-04-10 08:22:03 -070076LIBDIR = $(JDK_OUTPUTDIR)/lib
ohair92de5662012-04-10 08:22:03 -070077
78MGMT_LIBDIR = $(LIBDIR)/management
79MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
80MGMT_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*)
81MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
82
83$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
erikj10d96fb2013-04-05 09:39:10 +020084 $(call install-file)
ohair92de5662012-04-10 08:22:03 -070085 $(CHMOD) 644 $@
86
erikjaf85fc42012-07-03 16:10:44 -070087# this file has different permissions...don't know why...
88$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
erikj10d96fb2013-04-05 09:39:10 +020089 $(call install-file)
erikjaf85fc42012-07-03 16:10:44 -070090 $(CHMOD) 644 $@
91
ohair92de5662012-04-10 08:22:03 -070092$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
erikj10d96fb2013-04-05 09:39:10 +020093 $(call install-file)
ohair92de5662012-04-10 08:22:03 -070094 $(CHMOD) 444 $@
95
96COPY_FILES += $(MGMT_TARGET_FILES)
97
98##########################################################################################
99
100LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib
101
102$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
erikj10d96fb2013-04-05 09:39:10 +0200103 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700104
105COPY_FILES += $(LIBDIR)/logging.properties
106
107##########################################################################################
108#
109# Copy property files from sun/print to LIBDIR
110#
111PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print
112PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*)
113PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
114
erikje78df742012-06-07 20:40:50 -0700115$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
erikj10d96fb2013-04-05 09:39:10 +0200116 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700117
118COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
119
120##########################################################################################
121#
122# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
123#
erikjaf85fc42012-07-03 16:10:44 -0700124ifneq ($(OPENJDK_TARGET_OS), macosx)
ihsea29e6222013-10-10 15:06:21 +0200125 OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
erikjaf85fc42012-07-03 16:10:44 -0700126else
ihsea29e6222013-10-10 15:06:21 +0200127 OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
erikjaf85fc42012-07-03 16:10:44 -0700128endif
ohair92de5662012-04-10 08:22:03 -0700129
erikjaf85fc42012-07-03 16:10:44 -0700130$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
erikj10d96fb2013-04-05 09:39:10 +0200131 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700132
133COPY_FILES += $(LIBDIR)/flavormap.properties
134
135CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
ohair46fcac92012-09-18 11:29:24 -0700136CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
ohair92de5662012-04-10 08:22:03 -0700137
erikjaf85fc42012-07-03 16:10:44 -0700138$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
erikj10d96fb2013-04-05 09:39:10 +0200139 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700140
141COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
142
143CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
erikjaf85fc42012-07-03 16:10:44 -0700144ifeq ($(OPENJDK_TARGET_OS), windows)
ihsea29e6222013-10-10 15:06:21 +0200145 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
erikjaf85fc42012-07-03 16:10:44 -0700146else # OPENJDK_TARGET_OS
ihsea29e6222013-10-10 15:06:21 +0200147 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
erikjaf85fc42012-07-03 16:10:44 -0700148endif # OPENJDK_TARGET_OS
ihsea29e6222013-10-10 15:06:21 +0200149CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
ohair92de5662012-04-10 08:22:03 -0700150
erikje78df742012-06-07 20:40:50 -0700151$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
erikj10d96fb2013-04-05 09:39:10 +0200152 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700153
154COPY_FILES += $(CURSORS_TARGET_FILES)
155
156##########################################################################################
157
ihsea29e6222013-10-10 15:06:21 +0200158CONTENT_TYPES_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
ohair92de5662012-04-10 08:22:03 -0700159
160$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
erikj10d96fb2013-04-05 09:39:10 +0200161 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700162
163COPY_FILES += $(LIBDIR)/content-types.properties
164
165##########################################################################################
166
erikje78df742012-06-07 20:40:50 -0700167CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib
168
169$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
erikj10d96fb2013-04-05 09:39:10 +0200170 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700171
172COPY_FILES += $(LIBDIR)/calendars.properties
173
shermance3566b2013-04-12 07:57:35 -0700174$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
175 $(MKDIR) -p $(@D)
176 $(RM) $@
177 $(CP) $< $@
178
179COPY_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
180
erikje78df742012-06-07 20:40:50 -0700181##########################################################################################
182
luchsh153da622014-04-16 17:32:39 +0800183ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
erikje78df742012-06-07 20:40:50 -0700184
luchsh153da622014-04-16 17:32:39 +0800185 TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/lib
erikje78df742012-06-07 20:40:50 -0700186
ihsea29e6222013-10-10 15:06:21 +0200187 $(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
erikj10d96fb2013-04-05 09:39:10 +0200188 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700189
ihsea29e6222013-10-10 15:06:21 +0200190 COPY_FILES += $(LIBDIR)/tzmappings
erikje78df742012-06-07 20:40:50 -0700191
192endif
193
194##########################################################################################
195
ohair92de5662012-04-10 08:22:03 -0700196ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
197
198ifdef OPENJDK
ihsea29e6222013-10-10 15:06:21 +0200199 ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
sla43e7de52013-06-10 11:33:50 +0200200else
ihsea29e6222013-10-10 15:06:21 +0200201 ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
ohair92de5662012-04-10 08:22:03 -0700202endif
203
ihsea29e6222013-10-10 15:06:21 +0200204ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
205ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
ohair92de5662012-04-10 08:22:03 -0700206
207$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
erikj10d96fb2013-04-05 09:39:10 +0200208 $(call install-file)
ohair92de5662012-04-10 08:22:03 -0700209 $(CHMOD) 444 $@
210
211COPY_FILES += $(ICCPROFILE_TARGET_FILES)
212
213##########################################################################################
214
ihse38cf00a2013-10-23 13:06:37 +0200215ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
216 # We need to bundle the freetype library, so it will be available at runtime as well as link time.
217 #
218 # NB: Default freetype build system uses -h linker option and
219 # result .so contains hardcoded library name that is later
220 # used for adding dependencies to other objects
221 # (e.g. libfontmanager.so).
222 #
223 # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
224 # without overcomplicating logic here.
225 # To workaround this we hardcode .6 suffix for now.
226 #
227 # Note that .so.6 library will not be found by System.loadLibrary()
228 # but fortunately we need to load FreeType library explicitly
229 # on windows only
230 #
231 #TODO: rework this to avoid hardcoding library name in the makefile
232 #
ihsea29e6222013-10-10 15:06:21 +0200233 ifeq ($(OPENJDK_TARGET_OS), windows)
ihse38cf00a2013-10-23 13:06:37 +0200234 FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
ihsea29e6222013-10-10 15:06:21 +0200235 else
ihse38cf00a2013-10-23 13:06:37 +0200236 FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
ihsea29e6222013-10-10 15:06:21 +0200237 endif
ohair92de5662012-04-10 08:22:03 -0700238
ihse38cf00a2013-10-23 13:06:37 +0200239 $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
240 $(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
ihsea29e6222013-10-10 15:06:21 +0200241 ifeq ($(OPENJDK_BUILD_OS), windows)
242 $(CHMOD) +rx $@
243 endif
ohair92de5662012-04-10 08:22:03 -0700244
ihse38cf00a2013-10-23 13:06:37 +0200245 COPY_FILES += $(FREETYPE_TARGET_LIB)
ohair92de5662012-04-10 08:22:03 -0700246endif
247
248##########################################################################################
249
ohairb71409c2012-10-26 14:23:29 -0700250# Copy msvcrXX.dll on windows
ohair92de5662012-04-10 08:22:03 -0700251
ihsea29e6222013-10-10 15:06:21 +0200252ifeq ($(OPENJDK_TARGET_OS), windows)
253 MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
254 # Chmod to avoid permission issues if bundles are unpacked on unix platforms.
255 $(MSVCR_TARGET): $(MSVCR_DLL)
erikj10d96fb2013-04-05 09:39:10 +0200256 $(call install-file)
erikj5ee2c472013-01-29 16:35:24 +0100257 $(CHMOD) a+rx $@
ohair92de5662012-04-10 08:22:03 -0700258
ihsea29e6222013-10-10 15:06:21 +0200259 COPY_FILES += $(MSVCR_TARGET)
ohair92de5662012-04-10 08:22:03 -0700260endif
261
262##########################################################################################
erikje78df742012-06-07 20:40:50 -0700263
ihsea29e6222013-10-10 15:06:21 +0200264HPROF_SRC = $(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
erikje78df742012-06-07 20:40:50 -0700265
ihsea29e6222013-10-10 15:06:21 +0200266$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200267 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700268
269COPY_FILES += $(LIBDIR)/jvm.hprof.txt
270
271##########################################################################################
272
273#
274# How to install jvm.cfg.
275#
276ifeq ($(JVM_VARIANT_ZERO), true)
ihsea29e6222013-10-10 15:06:21 +0200277 JVMCFG_ARCH := zero
erikje78df742012-06-07 20:40:50 -0700278else
ihsea29e6222013-10-10 15:06:21 +0200279 JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
erikje78df742012-06-07 20:40:50 -0700280endif
281
ihsea29e6222013-10-10 15:06:21 +0200282ifeq ($(OPENJDK_TARGET_OS), macosx)
erikje78df742012-06-07 20:40:50 -0700283 JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
erikje78df742012-06-07 20:40:50 -0700284else
dholmes0ecf2702015-03-26 23:25:00 -0400285 JVMCFG_BASE := $(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
286 ALT_JVMCFG_SRC := $(JDK_TOPDIR)/src/closed/$(JVMCFG_BASE)
287 # Use the ALT file if it exists
288 JVMCFG_SRC := $(if $(wildcard $(ALT_JVMCFG_SRC)),$(ALT_JVMCFG_SRC),$(JDK_TOPDIR)/src/$(JVMCFG_BASE))
erikje78df742012-06-07 20:40:50 -0700289endif
ohair46fcac92012-09-18 11:29:24 -0700290JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
erikje78df742012-06-07 20:40:50 -0700291JVMCFG := $(JVMCFG_DIR)/jvm.cfg
292
omajidbf91adc2013-08-22 16:00:13 -0400293# To do: should this also support -zeroshark?
erikje78df742012-06-07 20:40:50 -0700294
ihsea29e6222013-10-10 15:06:21 +0200295ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
omajidbf91adc2013-08-22 16:00:13 -0400296 COPY_JVM_CFG_FILE := true
297else
dholmes8a4cacb2013-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.
ihsea29e6222013-10-10 15:06:21 +0200306 CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
dholmes8a4cacb2013-04-29 07:40:04 -0400307 ifeq ($(CLIENT_AND_SERVER), true)
omajidbf91adc2013-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)
ihsea29e6222013-10-10 15:06:21 +0200318 $(JVMCFG): $(JVMCFG_SRC)
dholmes8a4cacb2013-04-29 07:40:04 -0400319 $(call install-file)
omajidbf91adc2013-08-22 16:00:13 -0400320else
ihsea29e6222013-10-10 15:06:21 +0200321 $(JVMCFG):
dholmes8a4cacb2013-04-29 07:40:04 -0400322 $(MKDIR) -p $(@D)
323 $(RM) $(@)
ihsea29e6222013-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)
dholmes8a4cacb2013-04-29 07:40:04 -0400329 $(PRINTF) "-minimal KNOWN\n">>$(@)
ihsea29e6222013-10-10 15:06:21 +0200330 endif
331 else
332 ifeq ($(JVM_VARIANT_CLIENT), true)
dholmes8a4cacb2013-04-29 07:40:04 -0400333 $(PRINTF) "-client KNOWN\n">>$(@)
334 $(PRINTF) "-server ALIASED_TO -client\n">>$(@)
335 ifeq ($(JVM_VARIANT_MINIMAL1), true)
ihsea29e6222013-10-10 15:06:21 +0200336 $(PRINTF) "-minimal KNOWN\n">>$(@)
dholmes8a4cacb2013-04-29 07:40:04 -0400337 endif
ihsea29e6222013-10-10 15:06:21 +0200338 else
dholmes8a4cacb2013-04-29 07:40:04 -0400339 ifeq ($(JVM_VARIANT_MINIMAL1), true)
ihsea29e6222013-10-10 15:06:21 +0200340 $(PRINTF) "-minimal KNOWN\n">>$(@)
341 $(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
342 $(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
dholmes8a4cacb2013-04-29 07:40:04 -0400343 endif
ihsea29e6222013-10-10 15:06:21 +0200344 endif
erikje78df742012-06-07 20:40:50 -0700345 endif
erikje78df742012-06-07 20:40:50 -0700346endif
347
348COPY_FILES += $(JVMCFG)
349
350##########################################################################################
351
alanbeb1a86a2012-12-05 12:20:00 +0000352PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
erikje78df742012-06-07 20:40:50 -0700353PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
354
mullan506b2d32013-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
coffeys1fcdb422016-11-09 21:09:10 +0000360endif
361
mullan506b2d32013-10-11 08:43:07 -0400362$(PROPS_DST): $(PROPS_SRC)
363 $(MKDIR) -p $(@D)
coffeys1fcdb422016-11-09 21:09:10 +0000364 ifndef OPENJDK
365 $(TOOL_ADDTORESTRICTEDPKGS) $^ $@.tmp $(RESTRICTED_PKGS)
366 else
367 $(CP) $^ $@.tmp
368 endif
369 ifeq ($(UNLIMITED_CRYPTO), true)
370 $(TOOL_CRYPTOLEVEL) $@.tmp $@.tmp2 unlimited
371 $(MV) $@.tmp2 $@.tmp
372 endif
mullan506b2d32013-10-11 08:43:07 -0400373 $(MV) $@.tmp $@
374
erikje78df742012-06-07 20:40:50 -0700375COPY_FILES += $(PROPS_DST)
376
377##########################################################################################
378
379POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
380POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
381
382$(POLICY_DST): $(POLICY_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200383 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700384
385COPY_FILES += $(POLICY_DST)
386
387##########################################################################################
388
389CACERTS_SRC := $(CACERTS_FILE)
390CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
391
392$(CACERTS_DST): $(CACERTS_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200393 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700394
395COPY_FILES += $(CACERTS_DST)
396
397##########################################################################################
398
weijun0c88e432013-09-18 21:37:45 +0800399BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/src/share/lib/security/blacklisted.certs
400BLACKLISTED_CERTS_DST := $(JDK_OUTPUTDIR)/lib/security/blacklisted.certs
401
erikje78df742012-06-07 20:40:50 -0700402ifndef OPENJDK
403
ihsea29e6222013-10-10 15:06:21 +0200404 BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
405 BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
erikje78df742012-06-07 20:40:50 -0700406
ihsea29e6222013-10-10 15:06:21 +0200407 BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/src/closed/share/lib/security/blacklisted.certs)
weijun0c88e432013-09-18 21:37:45 +0800408
ihsea29e6222013-10-10 15:06:21 +0200409 TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
410 TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
erikje78df742012-06-07 20:40:50 -0700411
ihsea29e6222013-10-10 15:06:21 +0200412 $(BLACKLIST_DST): $(BLACKLIST_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200413 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700414
ihsea29e6222013-10-10 15:06:21 +0200415 COPY_FILES += $(BLACKLIST_DST)
erikje78df742012-06-07 20:40:50 -0700416
ihsea29e6222013-10-10 15:06:21 +0200417 $(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200418 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700419
ihsea29e6222013-10-10 15:06:21 +0200420 COPY_FILES += $(TRUSTEDLIBS_DST)
erikje78df742012-06-07 20:40:50 -0700421
422endif
423
weijun0c88e432013-09-18 21:37:45 +0800424$(BLACKLISTED_CERTS_DST): $(BLACKLISTED_CERTS_SRC)
425 $(MKDIR) -p $(@D)
426 $(CAT) $^ | $(SED) '/^$$/d' | $(SORT) | $(UNIQ) > $@.tmp
427 $(GREP) -i Algorithm $@.tmp > $@
428 if [ `$(SED) -n -e "$$=" $@` != 1 ]; then \
429 $(ECHO) "Different algorithms defined in $^"; \
430 $(RM) $@ $@.tmp; \
431 false; \
432 fi
433 $(GREP) -iv Algorithm $@.tmp >> $@
434 $(RM) $@.tmp
435
436COPY_FILES += $(BLACKLISTED_CERTS_DST)
437
erikje78df742012-06-07 20:40:50 -0700438##########################################################################################
439
440ifndef OPENJDK
441
ihsea29e6222013-10-10 15:06:21 +0200442 SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
443 SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
444 SHARED_FONTS_FILES := \
445 LucidaTypewriterRegular.ttf \
446 LucidaTypewriterBold.ttf \
447 LucidaBrightRegular.ttf \
448 LucidaBrightDemiBold.ttf \
449 LucidaBrightItalic.ttf \
450 LucidaBrightDemiItalic.ttf \
451 LucidaSansRegular.ttf \
452 LucidaSansDemiBold.ttf \
erikje78df742012-06-07 20:40:50 -0700453
ihsea29e6222013-10-10 15:06:21 +0200454 SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
455 SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))
erikje78df742012-06-07 20:40:50 -0700456
ihsea29e6222013-10-10 15:06:21 +0200457 $(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
erikj10d96fb2013-04-05 09:39:10 +0200458 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700459
ihsea29e6222013-10-10 15:06:21 +0200460 $(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
erikj10d96fb2013-04-05 09:39:10 +0200461 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700462
ihsea29e6222013-10-10 15:06:21 +0200463 COPY_FILES += $(SHARED_FONTS_DST)
ohair46fcac92012-09-18 11:29:24 -0700464
ihsea29e6222013-10-10 15:06:21 +0200465 ifneq ($(OPENJDK_TARGET_OS), windows)
ohair46fcac92012-09-18 11:29:24 -0700466 COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
ihsea29e6222013-10-10 15:06:21 +0200467 endif
erikje78df742012-06-07 20:40:50 -0700468
ihsea29e6222013-10-10 15:06:21 +0200469 ifeq ($(OPENJDK_TARGET_OS), linux)
erikje78df742012-06-07 20:40:50 -0700470
ihsea29e6222013-10-10 15:06:21 +0200471 # The oblique fonts are only needed/wanted on Linux.
erikje78df742012-06-07 20:40:50 -0700472
ihsea29e6222013-10-10 15:06:21 +0200473 OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
474 OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
475 OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
476 LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
erikje78df742012-06-07 20:40:50 -0700477
ihsea29e6222013-10-10 15:06:21 +0200478 OBL_FONTS_SRC := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_SRC_DIR)/$(F))
479 OBL_FONTS_DST := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_DST_DIR)/$(F))
erikje78df742012-06-07 20:40:50 -0700480
ihsea29e6222013-10-10 15:06:21 +0200481 $(OBL_FONTS_DST_DIR)/%.ttf: $(OBL_FONTS_SRC_DIR)/%.ttf
erikj10d96fb2013-04-05 09:39:10 +0200482 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700483
ihsea29e6222013-10-10 15:06:21 +0200484 $(OBL_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
erikj10d96fb2013-04-05 09:39:10 +0200485 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700486
ihsea29e6222013-10-10 15:06:21 +0200487 COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
erikje78df742012-06-07 20:40:50 -0700488
ihsea29e6222013-10-10 15:06:21 +0200489 endif # linux
Alexey Ushakov18f52ca2016-10-05 15:29:21 +0300490else #OPENJDK
491 SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/fonts
492 SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
493
494 SHARED_FONTS_FILES := \
495 DroidSans-Bold.ttf \
496 DroidSerif-Regular.ttf \
497 DroidSans.ttf \
498 DroidSerif-Bold.ttf \
499 DroidSansMono.ttf \
Alexey Ushakov664b5412016-11-09 00:55:56 +0300500 DroidSansMonoDotted.ttf \
501 DroidSansMonoSlashed.ttf \
Alexey Ushakov18f52ca2016-10-05 15:29:21 +0300502 DroidSerif-BoldItalic.ttf \
Alexey Ushakov664b5412016-11-09 00:55:56 +0300503 DroidSerif-Italic.ttf
Alexey Ushakov18f52ca2016-10-05 15:29:21 +0300504
505
506 SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
507 SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))
508
509 $(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
510 $(call install-file)
511
512 $(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/share/lib/fonts/fonts.dir
513 $(call install-file)
514
515 $(SHARED_FONTS_DST_DIR)/LICENSE.txt: $(JDK_TOPDIR)/src/share/lib/fonts/LICENSE.txt
516 $(call install-file)
517
518 COPY_FILES += $(SHARED_FONTS_DST)
519
520 ifneq ($(OPENJDK_TARGET_OS), windows)
521 COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
522 endif
523
524 COPY_FILES += $(SHARED_FONTS_DST_DIR)/LICENSE.txt
525
erikje78df742012-06-07 20:40:50 -0700526endif # OPENJDK
527
528##########################################################################################
529
530ifndef OPENJDK
531
ihsea29e6222013-10-10 15:06:21 +0200532 #
533 # Solaris X11 Direct Graphics Access library
534 #
erikje78df742012-06-07 20:40:50 -0700535
ihsea29e6222013-10-10 15:06:21 +0200536 _DGALIBS_sparc = \
537 libxinerama.so \
538 libjdgaSUNWcg6.so \
539 libjdgaSUNWffb.so \
540 libjdgaSUNWm64.so \
541 libjdgaSUNWafb.so
erikje78df742012-06-07 20:40:50 -0700542
ihsea29e6222013-10-10 15:06:21 +0200543 _DGALIBS_sparcv9 = \
544 libxinerama.so \
545 libjdgaSUNWcg6.so \
546 libjdgaSUNWffb.so \
547 libjdgaSUNWm64.so \
548 libjdgaSUNWafb.so
erikje78df742012-06-07 20:40:50 -0700549
ihsea29e6222013-10-10 15:06:21 +0200550 _DGALIBS_i586 = # no i586 library yet
erikje78df742012-06-07 20:40:50 -0700551
ihsea29e6222013-10-10 15:06:21 +0200552 _DGALIBS_amd64 = # no amd64 library yet
erikje78df742012-06-07 20:40:50 -0700553
ihsea29e6222013-10-10 15:06:21 +0200554 DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
erikje78df742012-06-07 20:40:50 -0700555
ihsea29e6222013-10-10 15:06:21 +0200556 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
erikj10d96fb2013-04-05 09:39:10 +0200557 $(call install-file)
erikjaf85fc42012-07-03 16:10:44 -0700558 $(CHMOD) 755 $@
erikje78df742012-06-07 20:40:50 -0700559
ihsea29e6222013-10-10 15:06:21 +0200560 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
erikj10d96fb2013-04-05 09:39:10 +0200561 $(call install-file)
erikjaf85fc42012-07-03 16:10:44 -0700562 $(CHMOD) 755 $@
erikje78df742012-06-07 20:40:50 -0700563
ihsea29e6222013-10-10 15:06:21 +0200564 $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
erikje78df742012-06-07 20:40:50 -0700565 $(MKDIR) -p $(@D)
566 $(RM) $@
ohairb71409c2012-10-26 14:23:29 -0700567 $(LN) -s $(<F) $@
erikje78df742012-06-07 20:40:50 -0700568
ihsea29e6222013-10-10 15:06:21 +0200569 COPY_FILES += $(DGALIBS)
erikje78df742012-06-07 20:40:50 -0700570
571endif
572
573##########################################################################################
574
erikjaf85fc42012-07-03 16:10:44 -0700575ifeq ($(OPENJDK_TARGET_OS), solaris)
erikje78df742012-06-07 20:40:50 -0700576
ihsea29e6222013-10-10 15:06:21 +0200577 SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
578 SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
erikje78df742012-06-07 20:40:50 -0700579
ihsea29e6222013-10-10 15:06:21 +0200580 $(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200581 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700582
ihsea29e6222013-10-10 15:06:21 +0200583 COPY_FILES += $(SUNPKCS11_CFG_DST)
erikje78df742012-06-07 20:40:50 -0700584
585endif
586
587##########################################################################################
588
589ifndef OPENJDK
ihsea29e6222013-10-10 15:06:21 +0200590 ifeq ($(OPENJDK_TARGET_OS), solaris)
erikje78df742012-06-07 20:40:50 -0700591
ihsea29e6222013-10-10 15:06:21 +0200592 UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
593 UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
erikje78df742012-06-07 20:40:50 -0700594
ihsea29e6222013-10-10 15:06:21 +0200595 $(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
erikj10d96fb2013-04-05 09:39:10 +0200596 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700597
ihsea29e6222013-10-10 15:06:21 +0200598 COPY_FILES += $(UCRYPTO_CFG_DST)
erikje78df742012-06-07 20:40:50 -0700599
ihsea29e6222013-10-10 15:06:21 +0200600 endif
erikje78df742012-06-07 20:40:50 -0700601endif
602
603##########################################################################################
604
ihsea29e6222013-10-10 15:06:21 +0200605$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/share/lib/sound.properties
erikj10d96fb2013-04-05 09:39:10 +0200606 $(call install-file)
erikje78df742012-06-07 20:40:50 -0700607
608COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
609
610##########################################################################################
sla43e7de52013-06-10 11:33:50 +0200611
erikj0fb03222013-06-25 09:25:16 +0200612-include $(CUSTOM_MAKE_DIR)/CopyFiles.gmk