author | serb |
Mon, 05 Dec 2011 17:11:57 +0400 | |
changeset 11103 | e156ce2c4a96 |
parent 11093 | e753252dc8a9 |
child 12047 | 320a714614e9 |
permissions | -rw-r--r-- |
2 | 1 |
# |
9002 | 2 |
# Copyright (c) 2000, 2011, 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 |
|
46 |
ifeq ($(PLATFORM), solaris) |
|
47 |
ifneq ($(ARCH), amd64) |
|
48 |
FILES_reorder += reorder-$(ARCH) |
|
49 |
endif |
|
50 |
endif |
|
51 |
||
52 |
# |
|
53 |
# Rules |
|
54 |
# |
|
55 |
||
56 |
# Class files should be built & clobbered in make/sun/awt |
|
57 |
# If removing this line, also reinclude sun_awt.jmk |
|
58 |
DONT_CLOBBER_CLASSES = true |
|
59 |
||
60 |
||
61 |
ifndef HEADLESS |
|
62 |
ifeq ($(VARIANT), OPT) |
|
63 |
FILES_m = ../awt/mapfile-mawt-vers |
|
64 |
endif |
|
65 |
endif |
|
66 |
||
67 |
# Since this library will be living in a subdirectory below the other libraries |
|
68 |
# we need to add an extra runpath so that libraries in the upper directory |
|
69 |
# are found at runtime. |
|
70 |
LD_RUNPATH_EXTRAS = .. |
|
71 |
||
72 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
73 |
include $(BUILDDIR)/common/Library.gmk |
|
74 |
||
75 |
$(LIB_LOCATION): |
|
76 |
$(MKDIR) -p $@ |
|
77 |
||
78 |
clean:: |
|
79 |
||
80 |
# |
|
81 |
# Add to the ambient vpath to pick up files in subdirectories |
|
82 |
# |
|
83 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/alphacomposite |
|
84 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image |
|
85 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/gif |
|
86 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/cvutils |
|
87 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/shell |
|
88 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/medialib |
|
89 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl |
|
90 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl |
|
91 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 |
|
92 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/debug |
|
93 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../font |
|
94 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d |
|
95 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops |
|
96 |
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe |
|
97 |
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image |
|
98 |
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child |
|
99 |
||
100 |
# |
|
101 |
# Libraries to link in. |
|
102 |
# |
|
103 |
||
104 |
||
2791
c84bf0caab7f
6829575: 100028: Debug information is incomplete or missing
aph
parents:
1175
diff
changeset
|
105 |
ifeq ($(DEBUG_BINARIES), true) |
c84bf0caab7f
6829575: 100028: Debug information is incomplete or missing
aph
parents:
1175
diff
changeset
|
106 |
CFLAGS += -g |
c84bf0caab7f
6829575: 100028: Debug information is incomplete or missing
aph
parents:
1175
diff
changeset
|
107 |
endif |
2 | 108 |
ifeq ($(HEADLESS),true) |
109 |
CFLAGS += -DHEADLESS=$(HEADLESS) |
|
110 |
CPPFLAGS += -DHEADLESS=$(HEADLESS) |
|
111 |
OTHER_LDLIBS = |
|
112 |
else |
|
113 |
LIBXTST = -lXtst |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
114 |
ifeq ($(PLATFORM), linux) |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
115 |
ifeq ($(ARCH_DATA_MODEL), 64) |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
116 |
# XXX what about the rest of them? |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
117 |
LIBXT = -lXt |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
118 |
else |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
119 |
# Allows for builds on Debian GNU Linux, X11 is in a different place |
9002 | 120 |
LIBXT = $(firstword $(wildcard $(OPENWIN_LIB)/libXt.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
121 |
$(wildcard /usr/lib/libXt.a)) |
9002 | 122 |
LIBSM = $(firstword $(wildcard $(OPENWIN_LIB)/libSM.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
123 |
$(wildcard /usr/lib/libSM.a)) |
9002 | 124 |
LIBICE = $(firstword $(wildcard $(OPENWIN_LIB)/libICE.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
125 |
$(wildcard /usr/lib/libICE.a)) |
9002 | 126 |
LIBXTST = $(firstword $(wildcard $(OPENWIN_LIB)/libXtst.a) \ |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
127 |
$(wildcard /usr/lib/libXtst.a)) |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
128 |
endif |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
129 |
endif |
2 | 130 |
|
131 |
# Use -lXmu for EditRes support |
|
132 |
LIBXMU_DBG = -lXmu |
|
133 |
LIBXMU_OPT = |
|
134 |
LIBXMU = $(LIBXMU_$(VARIANT)) |
|
135 |
||
136 |
ifeq ($(PLATFORM), solaris) |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
137 |
OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi |
2 | 138 |
endif |
139 |
||
140 |
ifeq ($(PLATFORM), linux) |
|
141 |
OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
142 |
# XXX what is this define below? Isn't it motif-related? |
2 | 143 |
OTHER_CFLAGS += -DXMSTRINGDEFINES=1 |
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
144 |
OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi |
2 | 145 |
endif |
146 |
||
147 |
endif |
|
148 |
# !HEADLESS |
|
149 |
||
150 |
OTHER_LDLIBS += $(JVMLIB) $(LIBCXX) \ |
|
151 |
-lawt $(LIBM) -ldl |
|
152 |
||
153 |
# |
|
154 |
# Sun CC with -Xa misdefines __STDC__ to 0 (zero). |
|
155 |
# The following will force checking of X11 prototypes. |
|
156 |
# |
|
157 |
ifneq ($(CC_VERSION),gcc) |
|
158 |
CPPFLAGS += -DFUNCPROTO=15 |
|
159 |
endif |
|
160 |
||
161 |
# |
|
162 |
# Other extra flags needed for compiling. |
|
163 |
# |
|
164 |
CPPFLAGS += -I$(CUPS_HEADERS_PATH) |
|
165 |
||
166 |
ifndef HEADLESS |
|
1175
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
167 |
CPPFLAGS += -I$(OPENWIN_HOME)/include |
026b52c440fe
6706121: makefile: unnecessary Motif classes compilation in JDK7
yan
parents:
2
diff
changeset
|
168 |
LDFLAGS += -L$(OPENWIN_LIB) |
2 | 169 |
|
170 |
endif # !HEADLESS |
|
171 |
||
172 |
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ |
|
173 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../font \ |
|
174 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \ |
|
175 |
-I$(SHARE_SRC)/native/$(PKGDIR)/image \ |
|
176 |
-I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \ |
|
177 |
-I$(SHARE_SRC)/native/$(PKGDIR)/shell \ |
|
178 |
-I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \ |
|
179 |
-I$(SHARE_SRC)/native/$(PKGDIR)/medialib \ |
|
180 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib \ |
|
181 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d \ |
|
182 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d \ |
|
183 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops \ |
|
184 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe \ |
|
185 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl \ |
|
186 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl \ |
|
187 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 \ |
|
188 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \ |
|
189 |
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \ |
|
190 |
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \ |
|
191 |
-I$(PLATFORM_SRC)/native/$(PKGDIR) \ |
|
192 |
$(EVENT_MODEL) |
|
193 |
||
194 |
ifeq ($(PLATFORM), linux) |
|
9002 | 195 |
# Checking for the X11/extensions headers at the additional location |
196 |
CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \ |
|
197 |
$(wildcard /usr/include/X11/extensions)) |
|
2 | 198 |
endif |
199 |
||
200 |
ifeq ($(PLATFORM), solaris) |
|
201 |
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions |
|
202 |
endif |
|
203 |
||
204 |
||
205 |
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ |
|
206 |
$(AWT_RUNPATH) |
|
207 |
||
208 |
CLASSES.export += java.io.InputStream \ |
|
209 |
java.lang.ThreadGroup |
|
210 |