author | jchen |
Thu, 23 May 2013 12:16:17 -0700 | |
changeset 17673 | 33e311ad099a |
parent 14342 | 8435a30053c1 |
permissions | -rw-r--r-- |
2 | 1 |
# |
14342
8435a30053c1
7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents:
12292
diff
changeset
|
2 |
# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# to create directory: |
|
28 |
# |
|
29 |
INIT += $(LIB_LOCATION) |
|
30 |
||
31 |
# |
|
32 |
# Files |
|
33 |
# |
|
34 |
# mawt.gmk is just used in building X/Motif native code, so |
|
35 |
# this list of java files is no longer included. |
|
36 |
#include FILES_java_unix.gmk |
|
37 |
include $(BUILDDIR)/sun/awt/FILES_c_unix.gmk |
|
38 |
||
39 |
include $(BUILDDIR)/sun/awt/FILES_export_unix.gmk |
|
40 |
||
41 |
# Check which C files should be built. Headless uses only |
|
42 |
# non-motif files. Also, a version-specific motif file is |
|
43 |
# compiled based on the motif version. |
|
11093
e753252dc8a9
6996291: command line selection of MToolkit by -Dawt.toolkit=sun.awt.motif.MToolkit fails from jdk7 b21 on
serb
parents:
9002
diff
changeset
|
44 |
FILES_c = $(FILES_NO_MOTIF_c) |
2 | 45 |
|
17673
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
46 |
ifeq ($(PLATFORM), macosx) |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
47 |
FILES_objc = $(FILES_NO_MOTIF_objc) |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
48 |
endif # PLATFORM |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
49 |
|
2 | 50 |
ifeq ($(PLATFORM), solaris) |
51 |
ifneq ($(ARCH), amd64) |
|
52 |
FILES_reorder += reorder-$(ARCH) |
|
53 |
endif |
|
54 |
endif |
|
55 |
||
56 |
# |
|
57 |
# Rules |
|
58 |
# |
|
59 |
||
60 |
# Class files should be built & clobbered in make/sun/awt |
|
61 |
# If removing this line, also reinclude sun_awt.jmk |
|
62 |
DONT_CLOBBER_CLASSES = true |
|
63 |
||
64 |
||
65 |
ifndef HEADLESS |
|
66 |
ifeq ($(VARIANT), OPT) |
|
67 |
FILES_m = ../awt/mapfile-mawt-vers |
|
68 |
endif |
|
69 |
endif |
|
70 |
||
71 |
# Since this library will be living in a subdirectory below the other libraries |
|
72 |
# we need to add an extra runpath so that libraries in the upper directory |
|
73 |
# are found at runtime. |
|
74 |
LD_RUNPATH_EXTRAS = .. |
|
75 |
||
76 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
77 |
include $(BUILDDIR)/common/Library.gmk |
|
78 |
||
79 |
$(LIB_LOCATION): |
|
80 |
$(MKDIR) -p $@ |
|
81 |
||
82 |
clean:: |
|
83 |
||
84 |
# |
|
85 |
# Add to the ambient vpath to pick up files in subdirectories |
|
86 |
# |
|
87 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/alphacomposite |
|
88 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image |
|
89 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/gif |
|
90 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/cvutils |
|
91 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/shell |
|
92 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/medialib |
|
93 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl |
|
94 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl |
|
95 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 |
|
96 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/debug |
|
97 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../font |
|
98 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d |
|
99 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops |
|
100 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe |
|
101 |
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image |
|
102 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child |
|
103 |
||
17673
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
104 |
ifeq ($(PLATFORM), macosx) |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
105 |
vpath %.m $(call NativeSrcDirList,,native/sun/font) |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
106 |
endif # PLATFORM |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
107 |
|
2 | 108 |
# |
109 |
# Libraries to link in. |
|
110 |
# |
|
111 |
||
112 |
||
2791
c84bf0caab7f
6829575: 100028: Debug information is incomplete or missing
aph
parents:
1175
diff
changeset
|
113 |
ifeq ($(DEBUG_BINARIES), true) |
c84bf0caab7f
6829575: 100028: Debug information is incomplete or missing
aph
parents:
1175
diff
changeset
|
114 |
CFLAGS += -g |
c84bf0caab7f
6829575: 100028: Debug information is incomplete or missing
aph
parents:
1175
diff
changeset
|
115 |
endif |
2 | 116 |
ifeq ($(HEADLESS),true) |
117 |
CFLAGS += -DHEADLESS=$(HEADLESS) |
|
118 |
CPPFLAGS += -DHEADLESS=$(HEADLESS) |
|
119 |
OTHER_LDLIBS = |
|
120 |
else |
|
121 |
LIBXTST = -lXtst |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
122 |
ifeq ($(PLATFORM), linux) |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
123 |
ifeq ($(ARCH_DATA_MODEL), 64) |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
124 |
# XXX what about the rest of them? |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
125 |
LIBXT = -lXt |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
126 |
else |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
127 |
# Allows for builds on Debian GNU Linux, X11 is in a different place |
9002 | 128 |
LIBXT = $(firstword $(wildcard $(OPENWIN_LIB)/libXt.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
129 |
$(wildcard /usr/lib/libXt.a)) |
9002 | 130 |
LIBSM = $(firstword $(wildcard $(OPENWIN_LIB)/libSM.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
131 |
$(wildcard /usr/lib/libSM.a)) |
9002 | 132 |
LIBICE = $(firstword $(wildcard $(OPENWIN_LIB)/libICE.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
133 |
$(wildcard /usr/lib/libICE.a)) |
9002 | 134 |
LIBXTST = $(firstword $(wildcard $(OPENWIN_LIB)/libXtst.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
135 |
$(wildcard /usr/lib/libXtst.a)) |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
136 |
endif |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
137 |
endif |
2 | 138 |
|
139 |
# Use -lXmu for EditRes support |
|
140 |
LIBXMU_DBG = -lXmu |
|
141 |
LIBXMU_OPT = |
|
142 |
LIBXMU = $(LIBXMU_$(VARIANT)) |
|
143 |
||
144 |
ifeq ($(PLATFORM), solaris) |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
145 |
OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi |
2 | 146 |
endif |
147 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
148 |
ifneq (,$(findstring $(PLATFORM), linux macosx)) |
2 | 149 |
OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
150 |
# XXX what is this define below? Isn't it motif-related? |
2 | 151 |
OTHER_CFLAGS += -DXMSTRINGDEFINES=1 |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
152 |
OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi |
2 | 153 |
endif |
154 |
||
155 |
endif |
|
156 |
# !HEADLESS |
|
157 |
||
158 |
OTHER_LDLIBS += $(JVMLIB) $(LIBCXX) \ |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
159 |
-lawt $(LIBM) $(LIBDL) |
2 | 160 |
|
161 |
# |
|
162 |
# Sun CC with -Xa misdefines __STDC__ to 0 (zero). |
|
163 |
# The following will force checking of X11 prototypes. |
|
164 |
# |
|
165 |
ifneq ($(CC_VERSION),gcc) |
|
166 |
CPPFLAGS += -DFUNCPROTO=15 |
|
167 |
endif |
|
168 |
||
169 |
# |
|
170 |
# Other extra flags needed for compiling. |
|
171 |
# |
|
172 |
CPPFLAGS += -I$(CUPS_HEADERS_PATH) |
|
173 |
||
174 |
ifndef HEADLESS |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
175 |
CPPFLAGS += -I$(OPENWIN_HOME)/include |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
176 |
LDFLAGS += -L$(OPENWIN_LIB) |
2 | 177 |
|
178 |
endif # !HEADLESS |
|
179 |
||
180 |
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ |
|
181 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../font \ |
|
182 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \ |
|
183 |
-I$(SHARE_SRC)/native/$(PKGDIR)/image \ |
|
184 |
-I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \ |
|
185 |
-I$(SHARE_SRC)/native/$(PKGDIR)/shell \ |
|
186 |
-I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \ |
|
187 |
-I$(SHARE_SRC)/native/$(PKGDIR)/medialib \ |
|
188 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib \ |
|
189 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d \ |
|
190 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d \ |
|
191 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops \ |
|
192 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe \ |
|
193 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl \ |
|
194 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl \ |
|
195 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 \ |
|
196 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \ |
|
197 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \ |
|
198 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \ |
|
199 |
-I$(PLATFORM_SRC)/native/$(PKGDIR) \ |
|
200 |
$(EVENT_MODEL) |
|
201 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
202 |
ifeq ($(PLATFORM), macosx) |
17673
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
203 |
CPPFLAGS += -I$(CUPS_HEADERS_PATH) \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
204 |
$(call NativeSrcDirList,-I,native/sun/awt) \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
205 |
$(call NativeSrcDirList,-I,native/sun/font) |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
206 |
|
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
207 |
ifndef HEADLESS |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
208 |
CPPFLAGS += -I$(MOTIF_DIR)/include \ |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
209 |
-I$(OPENWIN_HOME)/include |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
210 |
LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) |
17673
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
211 |
else |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
212 |
LDFLAGS += -framework Accelerate \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
213 |
-framework ApplicationServices \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
214 |
-framework Cocoa \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
215 |
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
216 |
-framework JavaNativeFoundation \ |
33e311ad099a
8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
jchen
parents:
14342
diff
changeset
|
217 |
-framework JavaRuntimeSupport |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
218 |
endif # !HEADLESS |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
219 |
endif # PLATFORM |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
220 |
|
2 | 221 |
ifeq ($(PLATFORM), linux) |
9002 | 222 |
# Checking for the X11/extensions headers at the additional location |
223 |
CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \ |
|
224 |
$(wildcard /usr/include/X11/extensions)) |
|
2 | 225 |
endif |
226 |
||
12292 | 227 |
ifeq ($(PLATFORM), macosx) |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
228 |
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
229 |
-I$(OPENWIN_HOME)/include |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
230 |
endif |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
231 |
|
2 | 232 |
ifeq ($(PLATFORM), solaris) |
233 |
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions |
|
234 |
endif |
|
235 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
236 |
ifeq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
237 |
CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11093
diff
changeset
|
238 |
endif |
2 | 239 |
|
240 |
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ |
|
241 |
$(AWT_RUNPATH) |
|
242 |
||
243 |
CLASSES.export += java.io.InputStream \ |
|
244 |
java.lang.ThreadGroup |
|
245 |