xref: /aoo42x/main/vcl/Library_vcl.mk (revision 168c4287)
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,vcl))
25
26ifeq ($(OS),MACOSX)
27$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.macosx))
28else ifeq ($(OS),WNT)
29$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.windows))
30else ifeq ($(OS),OS2)
31$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.windows))
32else
33$(eval $(call gb_Library_set_componentfile,vcl,vcl/vcl.unx))
34endif
35
36$(eval $(call gb_Library_add_package_headers,vcl,vcl_inc))
37
38$(eval $(call gb_Library_set_include,vcl,\
39	$$(INCLUDE) \
40	-I$(SRCDIR)/vcl/inc \
41	-I$(SRCDIR)/vcl/inc/pch \
42	-I$(SRCDIR)/solenv/inc \
43	-I$(OUTDIR)/inc/offuh \
44	-I$(OUTDIR)/inc/stl \
45	-I$(OUTDIR)/inc \
46    $$(FREETYPE_CFLAGS) \
47))
48ifeq ($(GUIBASE),unx)
49$(eval $(call gb_Library_set_cxxflags,vcl,\
50    $$(CXXFLAGS) \
51))
52endif
53
54$(eval $(call gb_Library_set_defs,vcl,\
55	$$(DEFS) \
56	-DVCL_DLLIMPLEMENTATION \
57    -DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,cui)\" \
58    -DDLLPOSTFIX=$(subst $(or $(gb_Library_DLLEXT),$(gb_Library_PLAINEXT)),,$(gb_Library_OOOEXT)) \
59))
60
61$(eval $(call gb_Library_add_linked_libs,vcl,\
62    tl \
63    utl \
64    sot \
65    ucbhelper \
66	basegfx \
67	comphelper \
68    cppuhelper \
69    icuuc \
70    icule \
71	i18nisolang1 \
72	i18npaper \
73    i18nutil \
74    jvmaccess \
75	stl \
76	cppu \
77	sal \
78	vos3 \
79	$(gb_STDLIBS) \
80))
81
82ifeq ($(GUIBASE),unx)
83$(eval $(call gb_Library_add_linked_libs,vcl,\
84    freetype \
85))
86endif
87
88ifeq ($(GUIBASE),os2)
89# YD FIXME this is not working... needs ldflags hack...
90$(eval $(call gb_Library_add_linked_libs,vcl,\
91    ft2lib \
92))
93$(eval $(call gb_Library_set_ldflags,vcl,\
94    $$(LDFLAGS) \
95    -lft2lib \
96))
97
98endif
99
100ifeq ($(GUIBASE),aqua)
101$(eval $(call gb_Library_set_cxxflags,vcl,\
102    $$(CXXFLAGS) \
103    $$(OBJCXXFLAGS) \
104))
105ifeq ($(ENABLE_CAIRO),TRUE)
106$(eval $(call gb_Library_set_defs,vcl,\
107	$$(DEFS) \
108	-DCAIRO \
109))
110endif
111$(eval $(call gb_Library_add_objcxxobjects,vcl,\
112    vcl/aqua/source/a11y/aqua11yactionwrapper \
113    vcl/aqua/source/a11y/aqua11ycomponentwrapper \
114    vcl/aqua/source/a11y/aqua11yfactory \
115    vcl/aqua/source/a11y/aqua11yrolehelper \
116    vcl/aqua/source/a11y/aqua11yselectionwrapper \
117    vcl/aqua/source/a11y/aqua11ytablewrapper \
118    vcl/aqua/source/a11y/aqua11ytextattributeswrapper \
119    vcl/aqua/source/a11y/aqua11ytextwrapper \
120    vcl/aqua/source/a11y/aqua11yutil \
121    vcl/aqua/source/a11y/aqua11yvaluewrapper \
122    vcl/aqua/source/a11y/aqua11ywrapper \
123    vcl/aqua/source/a11y/aqua11ywrapperbutton \
124    vcl/aqua/source/a11y/aqua11ywrappercheckbox \
125    vcl/aqua/source/a11y/aqua11ywrappercombobox \
126    vcl/aqua/source/a11y/aqua11ywrappergroup \
127    vcl/aqua/source/a11y/aqua11ywrapperlist \
128    vcl/aqua/source/a11y/aqua11ywrapperradiobutton \
129    vcl/aqua/source/a11y/aqua11ywrapperradiogroup \
130    vcl/aqua/source/a11y/aqua11ywrapperrow \
131    vcl/aqua/source/a11y/aqua11ywrapperscrollarea \
132    vcl/aqua/source/a11y/aqua11ywrapperscrollbar \
133    vcl/aqua/source/a11y/aqua11ywrappersplitter \
134    vcl/aqua/source/a11y/aqua11ywrapperstatictext \
135    vcl/aqua/source/a11y/aqua11ywrappertabgroup \
136    vcl/aqua/source/a11y/aqua11ywrappertextarea \
137    vcl/aqua/source/a11y/aqua11ywrappertoolbar \
138    vcl/aqua/source/app/salnstimer \
139    vcl/aqua/source/app/vclnsapp \
140    vcl/aqua/source/gdi/aquaprintaccessoryview \
141    vcl/aqua/source/gdi/aquaprintview \
142    vcl/aqua/source/window/salframeview \
143    vcl/aqua/source/window/salnsmenu \
144))
145$(eval $(call gb_Library_add_exception_objects,vcl,\
146    vcl/aqua/source/a11y/aqua11yfocuslistener \
147    vcl/aqua/source/a11y/aqua11yfocustracker \
148    vcl/aqua/source/a11y/aqua11ylistener \
149    vcl/aqua/source/a11y/documentfocuslistener \
150    vcl/aqua/source/app/saldata \
151    vcl/aqua/source/app/salinst \
152    vcl/aqua/source/app/salsys \
153    vcl/aqua/source/app/saltimer \
154    vcl/aqua/source/dtrans/DataFlavorMapping \
155    vcl/aqua/source/dtrans/DragActionConversion \
156    vcl/aqua/source/dtrans/DragSource \
157    vcl/aqua/source/dtrans/DragSourceContext \
158    vcl/aqua/source/dtrans/DropTarget \
159    vcl/aqua/source/dtrans/HtmlFmtFlt \
160    vcl/aqua/source/dtrans/OSXTransferable \
161    vcl/aqua/source/dtrans/PictToBmpFlt \
162    vcl/aqua/source/dtrans/aqua_clipboard \
163    vcl/aqua/source/dtrans/service_entry \
164    vcl/aqua/source/gdi/salatslayout \
165    vcl/aqua/source/gdi/salatsuifontutils \
166    vcl/aqua/source/gdi/salbmp \
167    vcl/aqua/source/gdi/salcolorutils \
168    vcl/aqua/source/gdi/salgdi \
169    vcl/aqua/source/gdi/salgdiutils \
170    vcl/aqua/source/gdi/salmathutils \
171    vcl/aqua/source/gdi/salnativewidgets \
172    vcl/aqua/source/gdi/salprn \
173    vcl/aqua/source/gdi/salvd \
174    vcl/aqua/source/window/salframe \
175    vcl/aqua/source/window/salmenu \
176    vcl/aqua/source/window/salobj \
177))
178endif
179
180ifeq ($(GUIBASE),unx)
181$(eval $(call gb_Library_set_defs,vcl,\
182	$$(DEFS) \
183    -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
184    -DSAL_DLLPOSTFIX=\"\" \
185    -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
186))
187## handle fontconfig
188ifneq ($(ENABLE_FONTCONFIG),)
189$(eval $(call gb_Library_set_defs,vcl,\
190	$$(DEFS) \
191    -DENABLE_FONTCONFIG \
192))
193## handle CUPS
194ifneq ($(ENABLE_CUPS),)
195$(eval $(call gb_Library_set_defs,vcl,\
196	$$(DEFS) \
197    -DENABLE_CUPS \
198))
199endif
200endif
201$(eval $(call gb_Library_add_exception_objects,vcl,\
202    vcl/source/glyphs/gcach_ftyp \
203    vcl/source/glyphs/gcach_layout \
204    vcl/source/glyphs/gcach_rbmp \
205    vcl/source/glyphs/glyphcache \
206    vcl/unx/generic/fontmanager/fontcache \
207    vcl/unx/generic/fontmanager/fontconfig \
208    vcl/unx/generic/fontmanager/fontmanager \
209    vcl/unx/generic/fontmanager/helper \
210    vcl/unx/generic/fontmanager/parseAFM \
211	vcl/unx/generic/plugadapt/salplug \
212    vcl/unx/generic/printer/cupsmgr \
213    vcl/unx/generic/printer/jobdata \
214    vcl/unx/generic/printer/ppdparser \
215    vcl/unx/generic/printer/printerinfomanager \
216))
217endif
218
219ifeq ($(OS),WNT)
220$(eval $(call gb_Library_add_exception_objects,vcl,\
221    vcl/win/source/app/saldata \
222    vcl/win/source/app/salinfo \
223    vcl/win/source/app/salinst \
224    vcl/win/source/app/salshl \
225    vcl/win/source/app/saltimer \
226    vcl/win/source/gdi/salbmp \
227    vcl/win/source/gdi/salgdi \
228    vcl/win/source/gdi/salgdi2 \
229    vcl/win/source/gdi/salgdi3 \
230    vcl/win/source/gdi/salgdi_gdiplus \
231    vcl/win/source/gdi/salnativewidgets-luna \
232    vcl/win/source/gdi/salprn \
233    vcl/win/source/gdi/salvd \
234    vcl/win/source/gdi/winlayout \
235    vcl/win/source/gdi/wntgdi \
236    vcl/win/source/window/salframe \
237    vcl/win/source/window/salmenu \
238    vcl/win/source/window/salobj \
239))
240
241$(eval $(call gb_Library_add_nativeres,vcl,src))
242
243endif
244
245ifeq ($(OS),OS2)
246$(eval $(call gb_Library_add_exception_objects,vcl,\
247    vcl/os2/source/app/salinfo \
248    vcl/os2/source/app/salinst \
249    vcl/os2/source/app/sallang \
250    vcl/os2/source/app/salshl \
251    vcl/os2/source/app/saltimer \
252    vcl/os2/source/gdi/salbmp \
253    vcl/os2/source/gdi/salgdi \
254    vcl/os2/source/gdi/salgdi2 \
255    vcl/os2/source/gdi/salgdi3 \
256    vcl/os2/source/gdi/salprn \
257    vcl/os2/source/gdi/salvd \
258    vcl/os2/source/gdi/os2layout \
259    vcl/os2/source/window/salframe \
260    vcl/os2/source/window/salmenu \
261    vcl/os2/source/window/salobj \
262))
263
264$(eval $(call gb_Library_add_nativeres,vcl,src))
265
266endif
267
268$(eval $(call gb_Library_add_exception_objects,vcl,\
269    vcl/source/app/dbggui \
270    vcl/source/app/dndhelp \
271    vcl/source/app/help \
272    vcl/source/app/i18nhelp \
273    vcl/source/app/idlemgr \
274    vcl/source/app/salvtables \
275    vcl/source/app/session \
276    vcl/source/app/settings \
277    vcl/source/app/sound \
278    vcl/source/app/stdtext \
279    vcl/source/app/svapp \
280    vcl/source/app/svdata \
281    vcl/source/app/svmain \
282    vcl/source/app/svmainhook \
283    vcl/source/app/timer \
284    vcl/source/app/unohelp2 \
285    vcl/source/app/unohelp \
286    vcl/source/app/vclevent \
287    vcl/source/components/display \
288    vcl/source/components/dtranscomp \
289    vcl/source/components/factory \
290    vcl/source/components/fontident \
291    vcl/source/components/stringmirror \
292    vcl/source/control/button \
293    vcl/source/control/combobox \
294    vcl/source/control/ctrl \
295    vcl/source/control/edit \
296    vcl/source/control/field2 \
297    vcl/source/control/field \
298    vcl/source/control/fixbrd \
299    vcl/source/control/fixed \
300    vcl/source/control/group \
301    vcl/source/control/ilstbox \
302    vcl/source/control/imgctrl \
303    vcl/source/control/longcurr \
304    vcl/source/control/lstbox \
305    vcl/source/control/menubtn \
306    vcl/source/control/morebtn \
307    vcl/source/control/quickselectionengine \
308    vcl/source/control/scrbar \
309    vcl/source/control/slider \
310    vcl/source/control/spinbtn \
311    vcl/source/control/spinfld \
312    vcl/source/control/tabctrl \
313    vcl/source/control/throbber \
314    vcl/source/fontsubset/cff \
315    vcl/source/fontsubset/fontsubset \
316    vcl/source/fontsubset/gsub \
317    vcl/source/fontsubset/list \
318    vcl/source/fontsubset/sft \
319    vcl/source/fontsubset/ttcr \
320    vcl/source/fontsubset/xlat \
321    vcl/source/gdi/alpha \
322    vcl/source/gdi/animate \
323    vcl/source/gdi/base14 \
324    vcl/source/gdi/bitmap2 \
325    vcl/source/gdi/bitmap3 \
326    vcl/source/gdi/bitmap4 \
327    vcl/source/gdi/bitmap \
328    vcl/source/gdi/bitmapex \
329    vcl/source/gdi/bmpacc2 \
330    vcl/source/gdi/bmpacc3 \
331    vcl/source/gdi/bmpacc \
332    vcl/source/gdi/bmpconv \
333    vcl/source/gdi/bmpfast \
334    vcl/source/gdi/configsettings \
335    vcl/source/gdi/cvtgrf \
336    vcl/source/gdi/cvtsvm \
337    vcl/source/gdi/extoutdevdata \
338    vcl/source/gdi/font \
339    vcl/source/gdi/gdimtf \
340    vcl/source/gdi/gfxlink \
341    vcl/source/gdi/gradient \
342    vcl/source/gdi/graph \
343    vcl/source/gdi/graphictools \
344    vcl/source/gdi/hatch \
345    vcl/source/gdi/image \
346    vcl/source/gdi/imagerepository \
347    vcl/source/gdi/impanmvw \
348    vcl/source/gdi/impbmp \
349    vcl/source/gdi/impgraph \
350    vcl/source/gdi/impimage \
351    vcl/source/gdi/impimagetree \
352    vcl/source/gdi/impvect \
353    vcl/source/gdi/jobset \
354    vcl/source/gdi/lineinfo \
355    vcl/source/gdi/mapmod \
356    vcl/source/gdi/metaact \
357    vcl/source/gdi/metric \
358    vcl/source/gdi/octree \
359    vcl/source/gdi/oldprintadaptor \
360    vcl/source/gdi/outdev2 \
361    vcl/source/gdi/outdev3 \
362    vcl/source/gdi/outdev4 \
363    vcl/source/gdi/outdev5 \
364    vcl/source/gdi/outdev6 \
365    vcl/source/gdi/outdev \
366    vcl/source/gdi/outdevnative \
367    vcl/source/gdi/outmap \
368    vcl/source/gdi/pdfextoutdevdata \
369    vcl/source/gdi/pdffontcache \
370    vcl/source/gdi/pdfwriter \
371    vcl/source/gdi/pdfwriter_impl2 \
372    vcl/source/gdi/pdfwriter_impl \
373    vcl/source/gdi/pngread \
374    vcl/source/gdi/pngwrite \
375    vcl/source/gdi/print2 \
376    vcl/source/gdi/print3 \
377    vcl/source/gdi/print \
378    vcl/source/gdi/regband \
379    vcl/source/gdi/region \
380    vcl/source/gdi/salgdilayout \
381    vcl/source/gdi/sallayout \
382    vcl/source/gdi/salmisc \
383    vcl/source/gdi/salnativewidgets-none \
384    vcl/source/gdi/svgdata \
385    vcl/source/gdi/textlayout \
386    vcl/source/gdi/virdev \
387    vcl/source/gdi/wall \
388    vcl/source/helper/canvasbitmap \
389    vcl/source/helper/canvastools \
390    vcl/source/helper/evntpost \
391    vcl/source/helper/lazydelete \
392    vcl/source/helper/strhelper \
393    vcl/source/helper/threadex \
394    vcl/source/helper/xconnection \
395    vcl/source/salmain/salmain \
396    vcl/source/window/abstdlg \
397    vcl/source/window/accel \
398    vcl/source/window/accmgr \
399    vcl/source/window/arrange \
400    vcl/source/window/brdwin \
401    vcl/source/window/btndlg \
402    vcl/source/window/cmdevt \
403    vcl/source/window/cursor \
404    vcl/source/window/decoview \
405    vcl/source/window/dialog \
406    vcl/source/window/dlgctrl \
407    vcl/source/window/dndevdis \
408    vcl/source/window/dndlcon \
409    vcl/source/window/dockingarea \
410    vcl/source/window/dockmgr \
411    vcl/source/window/dockwin \
412    vcl/source/window/floatwin \
413    vcl/source/window/introwin \
414    vcl/source/window/javachild \
415    vcl/source/window/keycod \
416    vcl/source/window/keyevent \
417    vcl/source/window/menu \
418    vcl/source/window/mnemonic \
419    vcl/source/window/mnemonicengine \
420    vcl/source/window/mouseevent \
421    vcl/source/window/msgbox \
422    vcl/source/window/popupmenuwindow \
423    vcl/source/window/printdlg \
424    vcl/source/window/scrwnd \
425    vcl/source/window/seleng \
426    vcl/source/window/split \
427    vcl/source/window/splitwin \
428    vcl/source/window/status \
429    vcl/source/window/syschild \
430    vcl/source/window/syswin \
431    vcl/source/window/tabdlg \
432    vcl/source/window/tabpage \
433    vcl/source/window/taskpanelist \
434    vcl/source/window/toolbox2 \
435    vcl/source/window/toolbox \
436    vcl/source/window/window2 \
437    vcl/source/window/window3 \
438    vcl/source/window/window4 \
439    vcl/source/window/window \
440    vcl/source/window/winproc \
441    vcl/source/window/wpropset \
442    vcl/source/window/wrkwin \
443))
444
445## handle Graphite
446ifeq ($(ENABLE_GRAPHITE),TRUE)
447# add defines, graphite sources for all platforms
448$(eval $(call gb_Library_set_defs,vcl,\
449	$$(DEFS) \
450	-DENABLE_GRAPHITE \
451))
452$(eval $(call gb_Library_add_exception_objects,vcl,\
453    vcl/source/glyphs/graphite_cache \
454    vcl/source/glyphs/graphite_features \
455    vcl/source/glyphs/graphite_layout \
456    vcl/source/glyphs/graphite_textsrc \
457))
458
459#building with stlport, but graphite was not built with stlport
460ifneq ($(USE_SYSTEM_STL),YES)
461ifeq ($(SYSTEM_GRAPHITE),YES)
462$(eval $(call gb_Library_set_defs,vcl,\
463	$$(DEFS) \
464	-DADAPT_EXT_STL \
465))
466endif
467endif
468
469# handle X11 platforms, which have additional files and possibly system graphite
470ifeq ($(GUIBASE),unx)
471$(eval $(call gb_Library_add_exception_objects,vcl,\
472    vcl/source/glyphs/graphite_adaptors \
473    vcl/source/glyphs/graphite_serverfont \
474))
475ifeq ($(SYSTEM_GRAPHITE),YES)
476$(eval $(call gb_Library_set_ldflags,vcl,\
477    $$(LDFLAGS) \
478    $(GRAPHITE_LIBS) \
479))
480else
481$(eval $(call gb_Library_add_linked_static_libs,vcl,\
482    graphite \
483))
484endif
485endif
486# on windows link static graphite library
487ifeq ($(OS),WNT)
488$(eval $(call gb_Library_add_linked_static_libs,vcl,\
489    graphite \
490))
491endif
492endif
493
494ifeq ($(OS),LINUX)
495$(eval $(call gb_Library_add_linked_libs,vcl,\
496	dl \
497	m \
498	pthread \
499))
500endif
501
502ifeq ($(OS),SOLARIS)
503ifeq ($(CPUNAME)$(CPU),SPARCU)
504$(eval $(call gb_Library_set_ldflags,vcl,\
505    $$(LDFLAGS) \
506    -R/usr/sfw/lib/64 \
507))
508else
509$(eval $(call gb_Library_set_ldflags,vcl,\
510    $$(LDFLAGS) \
511    -R/usr/sfw/lib \
512))
513endif
514endif
515
516ifeq ($(GUIBASE),aqua)
517$(eval $(call gb_Library_add_linked_libs,vcl,\
518	AppleRemote \
519))
520$(eval $(call gb_Library_set_ldflags,vcl,\
521    $$(LDFLAGS) \
522    -framework QuickTime \
523    -framework Cocoa \
524    -framework Carbon \
525    -framework CoreFoundation \
526))
527endif
528
529ifeq ($(OS),WNT)
530ifeq ($(USE_MINGW),)
531$(eval $(call gb_Library_set_ldflags,vcl,\
532    $$(LDFLAGS) \
533    /ENTRY:LibMain@12 \
534))
535endif
536$(eval $(call gb_Library_add_linked_libs,vcl,\
537	advapi32 \
538	gdi32 \
539	gdiplus \
540	imm32 \
541	mpr \
542	msimg32 \
543	ole32 \
544	shell32 \
545	user32 \
546	uuid \
547	winspool \
548	$(gb_STDLIBS) \
549))
550endif
551# vim: set noet sw=4 ts=4:
552