|
1 # |
|
2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
|
3 # 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 |
|
26 INCLUDEDIR = $(JDK_OUTPUTDIR)/include |
|
27 # TODO: Platform dir needs to be "win32" on windows /erikj |
|
28 PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM) |
|
29 |
|
30 # |
|
31 # Copy exported header files to outputdir. |
|
32 # |
|
33 H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h \ |
|
34 $(INCLUDEDIR)/jni.h \ |
|
35 $(INCLUDEDIR)/jvmti.h \ |
|
36 $(INCLUDEDIR)/jvmticmlr.h \ |
|
37 $(INCLUDEDIR)/classfile_constants.h \ |
|
38 $(INCLUDEDIR)/jawt.h \ |
|
39 $(PLATFORM_INCLUDE)/jni_md.h \ |
|
40 $(PLATFORM_INCLUDE)/jawt_md.h |
|
41 |
|
42 $(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h |
|
43 $(MKDIR) -p $(@D) |
|
44 rm -f $@ |
|
45 $(CP) $< $@ |
|
46 |
|
47 $(PLATFORM_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export/%.h |
|
48 $(MKDIR) -p $(@D) |
|
49 rm -f $@ |
|
50 $(CP) $< $@ |
|
51 |
|
52 COPY_FILES = $(H_TARGET_FILES) |
|
53 |
|
54 ########################################################################################## |
|
55 |
|
56 LIBDIR = $(JDK_OUTPUTDIR)/lib |
|
57 SERVICETAG_LIBDIR = $(LIBDIR)/servicetag |
|
58 |
|
59 $(SERVICETAG_LIBDIR)/jdk_header.png: $(JDK_TOPDIR)/src/share/classes/com/sun/servicetag/resources/jdk_header.png |
|
60 $(MKDIR) -p $(@D) |
|
61 rm -f $@ |
|
62 $(CP) $< $@ |
|
63 $(CHMOD) 444 $@ |
|
64 |
|
65 COPY_FILES += $(SERVICETAG_LIBDIR)/jdk_header.png |
|
66 |
|
67 ########################################################################################## |
|
68 |
|
69 MGMT_LIBDIR = $(LIBDIR)/management |
|
70 MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management |
|
71 MGMT_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*) |
|
72 MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES)) |
|
73 |
|
74 $(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties |
|
75 $(MKDIR) -p $(@D) |
|
76 rm -f $@ |
|
77 $(CP) $< $@ |
|
78 $(CHMOD) 644 $@ |
|
79 |
|
80 $(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/% |
|
81 $(MKDIR) -p $(@D) |
|
82 rm -f $@ |
|
83 $(CP) $< $@ |
|
84 $(CHMOD) 444 $@ |
|
85 |
|
86 COPY_FILES += $(MGMT_TARGET_FILES) |
|
87 |
|
88 ########################################################################################## |
|
89 |
|
90 LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib |
|
91 |
|
92 $(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties |
|
93 $(MKDIR) -p $(@D) |
|
94 rm -f $@ |
|
95 $(CP) $< $@ |
|
96 |
|
97 COPY_FILES += $(LIBDIR)/logging.properties |
|
98 |
|
99 ########################################################################################## |
|
100 # |
|
101 # Copy property files from sun/print to LIBDIR |
|
102 # |
|
103 PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print |
|
104 PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*) |
|
105 PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS)) |
|
106 |
|
107 $(PSFONTPROPFILE_TARGET_FILES): $(PSFONTPROPFILE_SRCS) |
|
108 $(MKDIR) -p $(@D) |
|
109 rm -f $@ |
|
110 $(CP) $< $@ |
|
111 |
|
112 COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES) |
|
113 |
|
114 ########################################################################################## |
|
115 # |
|
116 # Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR |
|
117 # |
|
118 PLATFORM_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib |
|
119 |
|
120 $(LIBDIR)/flavormap.properties: $(PLATFORM_LIB_SRC)/flavormap.properties |
|
121 $(MKDIR) -p $(@D) |
|
122 rm -f $@ |
|
123 $(CP) $< $@ |
|
124 |
|
125 COPY_FILES += $(LIBDIR)/flavormap.properties |
|
126 |
|
127 CURSORS_DEST_DIR = $(LIBDIR)/images/cursors |
|
128 CURSORS_PLATFORM_LIB_SRC = $(PLATFORM_LIB_SRC)/images/cursors |
|
129 |
|
130 $(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_PLATFORM_LIB_SRC)/cursors.properties |
|
131 $(MKDIR) -p $(@D) |
|
132 rm -f $@ |
|
133 $(CP) $< $@ |
|
134 |
|
135 COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties |
|
136 |
|
137 CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors |
|
138 ifeq ($(PLATFORM), windows) |
|
139 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif) |
|
140 else # PLATFORM |
|
141 CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif) |
|
142 endif # PLATFORM |
|
143 CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES)) |
|
144 |
|
145 $(CURSORS_TARGET_FILES): $(CURSORS_SRC_FILES) |
|
146 $(MKDIR) -p $(@D) |
|
147 rm -f $@ |
|
148 $(CP) $< $@ |
|
149 |
|
150 COPY_FILES += $(CURSORS_TARGET_FILES) |
|
151 |
|
152 ########################################################################################## |
|
153 |
|
154 CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib |
|
155 |
|
156 $(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties |
|
157 $(MKDIR) -p $(@D) |
|
158 rm -f $@ |
|
159 $(CP) $< $@ |
|
160 |
|
161 COPY_FILES += $(LIBDIR)/content-types.properties |
|
162 |
|
163 ########################################################################################## |
|
164 |
|
165 ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm |
|
166 |
|
167 ifdef OPENJDK |
|
168 ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms |
|
169 else |
|
170 ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms |
|
171 endif |
|
172 |
|
173 ICCPROFILE_SRCS:=$(wildcard $(ICCPROFILE_SRC_DIR)/*.pf) |
|
174 ICCPROFILE_TARGET_FILES:=$(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS)) |
|
175 |
|
176 $(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf |
|
177 $(MKDIR) -p $(@D) |
|
178 rm -f $@ |
|
179 $(CP) $< $@ |
|
180 $(CHMOD) 444 $@ |
|
181 |
|
182 COPY_FILES += $(ICCPROFILE_TARGET_FILES) |
|
183 |
|
184 ########################################################################################## |
|
185 |
|
186 #make sure freetype dll will be available at runtime as well as link time |
|
187 # |
|
188 #NB: Default freetype build system uses -h linker option and |
|
189 # result .so contains hardcoded library name that is later |
|
190 # used for adding dependencies to other objects |
|
191 # (e.g. libfontmanager.so). |
|
192 # |
|
193 # It is not obvious how to extract that hardcoded name (libfreetype.so.6) |
|
194 # without overcomplicating logic here. |
|
195 # To workaround this we hardcode .6 suffix for now. |
|
196 # |
|
197 # Note that .so.6 library will not be found by System.loadLibrary() |
|
198 # but fortunately we need to load FreeType library explicitly |
|
199 # on windows only |
|
200 # |
|
201 #TODO: rework this to avoid hardcoding library name in the makefile |
|
202 # |
|
203 ifdef OPENJDK |
|
204 ifeq ($(PLATFORM), windows) |
|
205 FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype) |
|
206 else |
|
207 ifeq ($(USING_SYSTEM_FT_LIB), false) |
|
208 FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/$(call SHARED_LIBRARY,freetype).6 |
|
209 endif |
|
210 endif |
|
211 |
|
212 $(FREETYPE_LIB): |
|
213 $(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@ |
|
214 |
|
215 COPY_FILES += $(FREETYPE_LIB) |
|
216 endif |
|
217 |
|
218 ########################################################################################## |
|
219 |
|
220 # Copy msvcr100.dll on windows |
|
221 |
|
222 ifeq ($(PLATFORM),windows) |
|
223 MSVCRNN_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCRNN_DLL)) |
|
224 $(MSVCRNN_TARGET): $(MSVCRNN_DLL) |
|
225 $(MKDIR) -p $(@D) |
|
226 rm -f $@ |
|
227 $(CP) $< $@ |
|
228 |
|
229 COPY_FILES += $(MSVCRNN_TARGET) |
|
230 endif |
|
231 |
|
232 ########################################################################################## |