1 | #
|
---|
2 | # Copyright (c) 2000, 2007, 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 | #
|
---|
27 | # to create directory:
|
---|
28 | #
|
---|
29 | INIT += $(LIB_LOCATION)
|
---|
30 |
|
---|
31 | ifndef HEADLESS
|
---|
32 | ifeq ($(PLATFORM), linux)
|
---|
33 | ifeq ($(STATIC_MOTIF),false)
|
---|
34 | INIT += $(LIB_LOCATION)/libXm.so
|
---|
35 | endif
|
---|
36 | endif
|
---|
37 | endif
|
---|
38 |
|
---|
39 | #
|
---|
40 | # Files
|
---|
41 | #
|
---|
42 | # mawt.gmk is just used in building X/Motif native code, so
|
---|
43 | # this list of java files is no longer included.
|
---|
44 | #include FILES_java_unix.gmk
|
---|
45 | include $(BUILDDIR)/sun/awt/FILES_c_unix.gmk
|
---|
46 |
|
---|
47 | include $(BUILDDIR)/sun/awt/FILES_export_unix.gmk
|
---|
48 |
|
---|
49 | # Check which C files should be built. Headless uses only
|
---|
50 | # non-motif files. Also, a version-specific motif file is
|
---|
51 | # compiled based on the motif version.
|
---|
52 | ifdef HEADLESS
|
---|
53 | FILES_c = $(FILES_NO_MOTIF_c)
|
---|
54 | else
|
---|
55 | FILES_c = $(FILES_MOTIF_c) $(FILES_NO_MOTIF_c)
|
---|
56 |
|
---|
57 | ifeq ($(MOTIF_VERSION), 2)
|
---|
58 | FILES_c += awt_motif21.c
|
---|
59 | FILES_c += awt_Choice21.c
|
---|
60 | endif
|
---|
61 |
|
---|
62 | endif
|
---|
63 |
|
---|
64 | ifeq ($(PLATFORM), solaris)
|
---|
65 | ifneq ($(ARCH), amd64)
|
---|
66 | FILES_reorder += reorder-$(ARCH)
|
---|
67 | endif
|
---|
68 | endif
|
---|
69 |
|
---|
70 | #
|
---|
71 | # Rules
|
---|
72 | #
|
---|
73 |
|
---|
74 | # Class files should be built & clobbered in make/sun/awt
|
---|
75 | # If removing this line, also reinclude sun_awt.jmk
|
---|
76 | DONT_CLOBBER_CLASSES = true
|
---|
77 |
|
---|
78 |
|
---|
79 | ifndef HEADLESS
|
---|
80 | ifeq ($(VARIANT), OPT)
|
---|
81 | FILES_m = ../awt/mapfile-mawt-vers
|
---|
82 | endif
|
---|
83 | endif
|
---|
84 |
|
---|
85 | # Since this library will be living in a subdirectory below the other libraries
|
---|
86 | # we need to add an extra runpath so that libraries in the upper directory
|
---|
87 | # are found at runtime.
|
---|
88 | LD_RUNPATH_EXTRAS = ..
|
---|
89 |
|
---|
90 | include $(BUILDDIR)/common/Mapfile-vers.gmk
|
---|
91 | include $(BUILDDIR)/common/Library.gmk
|
---|
92 |
|
---|
93 | $(LIB_LOCATION):
|
---|
94 | $(MKDIR) -p $@
|
---|
95 |
|
---|
96 | ifeq ($(PLATFORM), linux)
|
---|
97 | ifeq ($(STATIC_MOTIF),false)
|
---|
98 | $(LIB_LOCATION)/libXm.so:
|
---|
99 | $(CP) $(MOTIF_LIB)/libXm.so $(LIB_LOCATION)/libXm.so
|
---|
100 | # Automounter problem makes the link fail on Redhat 6.1.
|
---|
101 | # $(LN) -s $(MOTIF_LIB)/libXm.so $(LIB_LOCATION)/libXm.so
|
---|
102 | endif
|
---|
103 | endif
|
---|
104 |
|
---|
105 | clean::
|
---|
106 |
|
---|
107 | #
|
---|
108 | # Add to the ambient vpath to pick up files in subdirectories
|
---|
109 | #
|
---|
110 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/alphacomposite
|
---|
111 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image
|
---|
112 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/gif
|
---|
113 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/cvutils
|
---|
114 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/shell
|
---|
115 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/medialib
|
---|
116 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl
|
---|
117 | vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl
|
---|
118 | vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11
|
---|
119 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/debug
|
---|
120 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../font
|
---|
121 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d
|
---|
122 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops
|
---|
123 | vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe
|
---|
124 | vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image
|
---|
125 | vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child
|
---|
126 |
|
---|
127 | #
|
---|
128 | # Libraries to link in.
|
---|
129 | #
|
---|
130 |
|
---|
131 |
|
---|
132 | ifeq ($(DEBUG_BINARIES), true)
|
---|
133 | CFLAGS += -g
|
---|
134 | endif
|
---|
135 | ifeq ($(HEADLESS),true)
|
---|
136 | CFLAGS += -DHEADLESS=$(HEADLESS)
|
---|
137 | CPPFLAGS += -DHEADLESS=$(HEADLESS)
|
---|
138 | OTHER_LDLIBS =
|
---|
139 | else
|
---|
140 | CFLAGS += -DMOTIF_VERSION=$(MOTIF_VERSION)
|
---|
141 |
|
---|
142 | ifeq ($(STATIC_MOTIF),true)
|
---|
143 | LIBXM = $(MOTIF_LIB)/libXm.a -lXp -lXmu
|
---|
144 | ifeq ($(PLATFORM), linux)
|
---|
145 | ifeq ($(ARCH_DATA_MODEL), 64)
|
---|
146 | LIBXT = -lXt
|
---|
147 | else
|
---|
148 | # Allows for builds on Debian GNU Linux, X11 is in a different place
|
---|
149 | LIBXT = $(firstword $(wildcard /usr/X11R6/lib/libXt.a) \
|
---|
150 | $(wildcard /usr/lib/libXt.a))
|
---|
151 | LIBSM = $(firstword $(wildcard /usr/X11R6/lib/libSM.a) \
|
---|
152 | $(wildcard /usr/lib/libSM.a))
|
---|
153 | LIBICE = $(firstword $(wildcard /usr/X11R6/lib/libICE.a) \
|
---|
154 | $(wildcard /usr/lib/libICE.a))
|
---|
155 | endif
|
---|
156 | endif
|
---|
157 | else
|
---|
158 | LIBXM = -L$(MOTIF_LIB) -lXm -lXp
|
---|
159 | ifeq ($(PLATFORM), linux)
|
---|
160 | LIBXT = -lXt
|
---|
161 | LIBSM =
|
---|
162 | LIBICE =
|
---|
163 | endif
|
---|
164 | endif
|
---|
165 |
|
---|
166 | LIBXTST = -lXtst
|
---|
167 |
|
---|
168 | # Use -lXmu for EditRes support
|
---|
169 | LIBXMU_DBG = -lXmu
|
---|
170 | LIBXMU_OPT =
|
---|
171 | LIBXMU = $(LIBXMU_$(VARIANT))
|
---|
172 |
|
---|
173 | ifeq ($(PLATFORM), solaris)
|
---|
174 | OTHER_LDLIBS = $(LIBXM) -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
|
---|
175 | endif
|
---|
176 |
|
---|
177 | ifeq ($(PLATFORM), linux)
|
---|
178 | OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
|
---|
179 | OTHER_CFLAGS += -DMOTIF_VERSION=2
|
---|
180 | OTHER_CFLAGS += -DXMSTRINGDEFINES=1
|
---|
181 | OTHER_LDLIBS = $(LIBXM) $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi
|
---|
182 | endif
|
---|
183 |
|
---|
184 | endif
|
---|
185 | # !HEADLESS
|
---|
186 |
|
---|
187 | OTHER_LDLIBS += $(JVMLIB) $(LIBCXX) \
|
---|
188 | -lawt $(LIBM) -ldl
|
---|
189 |
|
---|
190 | #
|
---|
191 | # Sun CC with -Xa misdefines __STDC__ to 0 (zero).
|
---|
192 | # The following will force checking of X11 prototypes.
|
---|
193 | #
|
---|
194 | ifneq ($(CC_VERSION),gcc)
|
---|
195 | CPPFLAGS += -DFUNCPROTO=15
|
---|
196 | endif
|
---|
197 |
|
---|
198 | #
|
---|
199 | # Other extra flags needed for compiling.
|
---|
200 | #
|
---|
201 | CPPFLAGS += -I$(CUPS_HEADERS_PATH)
|
---|
202 |
|
---|
203 | ifndef HEADLESS
|
---|
204 | CPPFLAGS += -I$(MOTIF_DIR)/include \
|
---|
205 | -I$(OPENWIN_HOME)/include
|
---|
206 | LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
|
---|
207 |
|
---|
208 | endif # !HEADLESS
|
---|
209 |
|
---|
210 | CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
|
---|
211 | -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
|
---|
212 | -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \
|
---|
213 | -I$(SHARE_SRC)/native/$(PKGDIR)/image \
|
---|
214 | -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
|
---|
215 | -I$(SHARE_SRC)/native/$(PKGDIR)/shell \
|
---|
216 | -I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \
|
---|
217 | -I$(SHARE_SRC)/native/$(PKGDIR)/medialib \
|
---|
218 | -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib \
|
---|
219 | -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d \
|
---|
220 | -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d \
|
---|
221 | -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops \
|
---|
222 | -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe \
|
---|
223 | -I$(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl \
|
---|
224 | -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl \
|
---|
225 | -I$(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/x11 \
|
---|
226 | -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
|
---|
227 | -I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
|
---|
228 | -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
|
---|
229 | -I$(PLATFORM_SRC)/native/$(PKGDIR) \
|
---|
230 | $(EVENT_MODEL)
|
---|
231 |
|
---|
232 | ifeq ($(PLATFORM), linux)
|
---|
233 | # Checking for the X11/extensions headers at the additional location
|
---|
234 | CPPFLAGS += -I/X11R6/include/X11/extensions \
|
---|
235 | -I/usr/include/X11/extensions
|
---|
236 | endif
|
---|
237 |
|
---|
238 | ifeq ($(PLATFORM), solaris)
|
---|
239 | CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions
|
---|
240 | endif
|
---|
241 |
|
---|
242 |
|
---|
243 | LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
|
---|
244 | $(AWT_RUNPATH)
|
---|
245 |
|
---|
246 | CLASSES.export += java.io.InputStream \
|
---|
247 | java.lang.ThreadGroup
|
---|
248 |
|
---|