xref: /trunk/main/vcl/Library_vclplug_gen.mk (revision b02b7cdb)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24$(eval $(call gb_Library_Library,vclplug_gen))
25
26$(eval $(call gb_Library_set_include,vclplug_gen,\
27	$$(INCLUDE) \
28	-I$(SRCDIR)/vcl/inc \
29	-I$(SRCDIR)/vcl/inc/pch \
30	-I$(SRCDIR)/solenv/inc \
31	-I$(OUTDIR)/inc/offuh \
32	-I$(OUTDIR)/inc/stl \
33	-I$(OUTDIR)/inc \
34))
35
36$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
37    vcl \
38    tl \
39    utl \
40    sot \
41    ucbhelper \
42	basegfx \
43	comphelper \
44    cppuhelper \
45    icuuc \
46    icule \
47	i18nisolang1 \
48	i18npaper \
49    i18nutil \
50    jvmaccess \
51	stl \
52	cppu \
53	sal \
54	vos3 \
55    X11 \
56    Xext \
57    SM \
58    ICE \
59	$(gb_STDLIBS) \
60))
61
62$(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
63    vcl/unx/generic/app/i18n_cb \
64    vcl/unx/generic/app/i18n_ic \
65    vcl/unx/generic/app/i18n_im \
66    vcl/unx/generic/app/i18n_keysym \
67    vcl/unx/generic/app/i18n_status \
68    vcl/unx/generic/app/i18n_wrp \
69    vcl/unx/generic/app/i18n_xkb \
70    vcl/unx/generic/app/keysymnames \
71    vcl/unx/generic/app/randrwrapper \
72    vcl/unx/generic/app/saldata \
73    vcl/unx/generic/app/saldisp \
74    vcl/unx/generic/app/salinst \
75    vcl/unx/generic/app/salsys \
76    vcl/unx/generic/app/saltimer \
77    vcl/unx/generic/app/sm \
78    vcl/unx/generic/app/soicon \
79    vcl/unx/generic/app/wmadaptor \
80    vcl/unx/generic/dtrans/bmp \
81    vcl/unx/generic/dtrans/config \
82    vcl/unx/generic/dtrans/X11_clipboard \
83    vcl/unx/generic/dtrans/X11_dndcontext \
84    vcl/unx/generic/dtrans/X11_droptarget \
85    vcl/unx/generic/dtrans/X11_selection \
86    vcl/unx/generic/dtrans/X11_service \
87    vcl/unx/generic/dtrans/X11_transferable \
88    vcl/unx/generic/gdi/cdeint \
89    vcl/unx/generic/gdi/dtint \
90    vcl/unx/generic/gdi/gcach_xpeer \
91    vcl/unx/generic/gdi/pspgraphics \
92    vcl/unx/generic/gdi/salbmp \
93    vcl/unx/generic/gdi/salcvt \
94    vcl/unx/generic/gdi/salgdi2 \
95    vcl/unx/generic/gdi/salgdi3 \
96    vcl/unx/generic/gdi/salgdi \
97    vcl/unx/generic/gdi/salprnpsp \
98    vcl/unx/generic/gdi/salvd \
99    vcl/unx/generic/gdi/xrender_peer \
100    vcl/unx/generic/printergfx/bitmap_gfx \
101    vcl/unx/generic/printergfx/common_gfx \
102    vcl/unx/generic/printergfx/glyphset \
103    vcl/unx/generic/printergfx/printerjob \
104    vcl/unx/generic/printergfx/psputil \
105    vcl/unx/generic/printergfx/text_gfx \
106    vcl/unx/generic/window/FWS \
107    vcl/unx/generic/window/salframe \
108    vcl/unx/generic/window/salobj \
109))
110
111$(eval $(call gb_Library_set_defs,vclplug_gen,\
112	$$(DEFS) \
113    -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
114    -DVCLPLUG_GEN_IMPLEMENTATION \
115))
116
117
118## handle RandR
119ifneq ($(ENABLE_RANDR),)
120$(eval $(call gb_Library_set_defs,vclplug_gen,\
121	$$(DEFS) \
122	-DUSE_RANDR \
123))
124ifeq ($(XRANDR_DLOPEN),FALSE)
125$(eval $(call gb_Library_set_cxxflags,vclplug_gen,\
126    $$(CXXFLAGS) \
127))
128$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
129    $$(LDFLAGS) \
130    $(XRANDR_LIBS) \
131))
132else
133$(eval $(call gb_Library_set_defs,vclplug_gen,\
134	$$(DEFS) \
135	-DXRANDR_DLOPEN \
136))
137endif
138endif
139
140## handle Xinerama
141ifneq ($(USE_XINERAMA),NO)
142ifneq ($(OS),SOLARIS)
143# not Solaris
144$(eval $(call gb_Library_set_defs,vclplug_gen,\
145	$$(DEFS) \
146	-DUSE_XINERAMA \
147	-DUSE_XINERAMA_XORG \
148))
149ifeq ($(XINERAMA_LINK),dynamic)
150$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
151    $$(LDFLAGS) \
152))
153
154else
155$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
156    $$(LDFLAGS) \
157    -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \
158))
159endif
160else
161# Solaris
162$(eval $(call gb_Library_set_defs,vclplug_gen,\
163	$$(DEFS) \
164	-DUSE_XINERAMA \
165	-DUSE_XINERAMA_XSUN \
166))
167ifeq ($(USE_XINERAMA_VERSION),Xorg)
168# Solaris, Xorg
169ifeq ($(XINERAMA_LINK),dynamic)
170$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
171    $$(LDFLAGS) \
172    -lXinerama \
173))
174else
175$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
176    $$(LDFLAGS) \
177    -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \
178))
179endif
180endif
181endif
182endif
183
184## handle Render linking
185ifeq ($(XRENDER_LINK),YES)
186$(eval $(call gb_Library_set_defs,vclplug_gen,\
187	$$(DEFS) \
188	-DXRENDER_LINK \
189))
190$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
191    $$(LDFLAGS) \
192    $(shell pkg-config --libs xrender) \
193))
194endif
195
196ifeq ($(OS),LINUX)
197$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
198	dl \
199	m \
200	pthread \
201))
202$(eval $(call gb_Library_add_external_libs,vclplug_gen,	\
203	Xinerama Xrandr					\
204))
205endif
206ifeq ($(OS),FREEBSD)
207$(eval $(call gb_Library_add_external_libs,vclplug_gen,	\
208	Xinerama Xrandr					\
209))
210endif
211# vim: set noet sw=4 ts=4:
212