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