xref: /aoo42x/main/vcl/Library_vclplug_gen.mk (revision ca963dc9)
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    $$(XRANDR_CFLAGS) \
128))
129$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
130    $$(LDFLAGS) \
131    $(XRANDR_LIBS) \
132))
133else
134$(eval $(call gb_Library_set_defs,vclplug_gen,\
135	$$(DEFS) \
136	-DXRANDR_DLOPEN \
137))
138endif
139endif
140
141## handle Xinerama
142ifneq ($(USE_XINERAMA),NO)
143ifneq ($(OS),SOLARIS)
144# not Solaris
145$(eval $(call gb_Library_set_defs,vclplug_gen,\
146	$$(DEFS) \
147	-DUSE_XINERAMA \
148	-DUSE_XINERAMA_XORG \
149))
150ifeq ($(XINERAMA_LINK),dynamic)
151$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
152    $$(LDFLAGS) \
153))
154
155else
156$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
157    $$(LDFLAGS) \
158    -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \
159))
160endif
161else
162# Solaris
163$(eval $(call gb_Library_set_defs,vclplug_gen,\
164	$$(DEFS) \
165	-DUSE_XINERAMA \
166	-DUSE_XINERAMA_XSUN \
167))
168ifeq ($(USE_XINERAMA_VERSION),Xorg)
169# Solaris, Xorg
170ifeq ($(XINERAMA_LINK),dynamic)
171$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
172    $$(LDFLAGS) \
173    -lXinerama \
174))
175else
176$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
177    $$(LDFLAGS) \
178    -Wl,-Bstatic -lXinerama -Wl,-Bdynamic \
179))
180endif
181endif
182endif
183endif
184
185## handle Render linking
186ifeq ($(XRENDER_LINK),YES)
187$(eval $(call gb_Library_set_defs,vclplug_gen,\
188	$$(DEFS) \
189	-DXRENDER_LINK \
190))
191$(eval $(call gb_Library_set_ldflags,vclplug_gen,\
192    $$(LDFLAGS) \
193    $(shell pkg-config --libs xrender) \
194))
195endif
196
197ifeq ($(OS),LINUX)
198$(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
199	dl \
200	m \
201	pthread \
202))
203$(eval $(call gb_Library_add_external_libs,vclplug_gen,	\
204	Xinerama Xrandr					\
205))
206endif
207# vim: set noet sw=4 ts=4:
208