xref: /trunk/main/vcl/Library_vcl.mk (revision 9ef65f0e)
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/rendergraphic \
383    vcl/source/gdi/rendergraphicrasterizer \
384    vcl/source/gdi/salgdilayout \
385    vcl/source/gdi/sallayout \
386    vcl/source/gdi/salmisc \
387    vcl/source/gdi/salnativewidgets-none \
388    vcl/source/gdi/svgread \
389	vcl/source/gdi/textlayout \
390    vcl/source/gdi/virdev \
391    vcl/source/gdi/wall \
392    vcl/source/helper/canvasbitmap \
393    vcl/source/helper/canvastools \
394    vcl/source/helper/evntpost \
395    vcl/source/helper/lazydelete \
396    vcl/source/helper/strhelper \
397    vcl/source/helper/threadex \
398    vcl/source/helper/xconnection \
399    vcl/source/salmain/salmain \
400    vcl/source/window/abstdlg \
401    vcl/source/window/accel \
402    vcl/source/window/accmgr \
403    vcl/source/window/arrange \
404    vcl/source/window/brdwin \
405    vcl/source/window/btndlg \
406    vcl/source/window/cmdevt \
407    vcl/source/window/cursor \
408    vcl/source/window/decoview \
409    vcl/source/window/dialog \
410    vcl/source/window/dlgctrl \
411    vcl/source/window/dndevdis \
412    vcl/source/window/dndlcon \
413    vcl/source/window/dockingarea \
414    vcl/source/window/dockmgr \
415    vcl/source/window/dockwin \
416    vcl/source/window/floatwin \
417    vcl/source/window/introwin \
418    vcl/source/window/javachild \
419    vcl/source/window/keycod \
420    vcl/source/window/keyevent \
421    vcl/source/window/menu \
422    vcl/source/window/mnemonic \
423    vcl/source/window/mnemonicengine \
424    vcl/source/window/mouseevent \
425    vcl/source/window/msgbox \
426    vcl/source/window/popupmenuwindow \
427    vcl/source/window/printdlg \
428    vcl/source/window/scrwnd \
429    vcl/source/window/seleng \
430    vcl/source/window/split \
431    vcl/source/window/splitwin \
432    vcl/source/window/status \
433    vcl/source/window/syschild \
434    vcl/source/window/syswin \
435    vcl/source/window/tabdlg \
436    vcl/source/window/tabpage \
437    vcl/source/window/taskpanelist \
438    vcl/source/window/toolbox2 \
439    vcl/source/window/toolbox \
440    vcl/source/window/window2 \
441    vcl/source/window/window3 \
442    vcl/source/window/window4 \
443    vcl/source/window/window \
444    vcl/source/window/winproc \
445    vcl/source/window/wpropset \
446    vcl/source/window/wrkwin \
447))
448
449## handle Graphite
450ifeq ($(ENABLE_GRAPHITE),TRUE)
451# add defines, graphite sources for all platforms
452$(eval $(call gb_Library_set_defs,vcl,\
453	$$(DEFS) \
454	-DENABLE_GRAPHITE \
455))
456$(eval $(call gb_Library_add_exception_objects,vcl,\
457    vcl/source/glyphs/graphite_cache \
458    vcl/source/glyphs/graphite_features \
459    vcl/source/glyphs/graphite_layout \
460    vcl/source/glyphs/graphite_textsrc \
461))
462
463#building with stlport, but graphite was not built with stlport
464ifneq ($(USE_SYSTEM_STL),YES)
465ifeq ($(SYSTEM_GRAPHITE),YES)
466$(eval $(call gb_Library_set_defs,vcl,\
467	$$(DEFS) \
468	-DADAPT_EXT_STL \
469))
470endif
471endif
472
473# handle X11 platforms, which have additional files and possibly system graphite
474ifeq ($(GUIBASE),unx)
475$(eval $(call gb_Library_add_exception_objects,vcl,\
476    vcl/source/glyphs/graphite_adaptors \
477    vcl/source/glyphs/graphite_serverfont \
478))
479ifeq ($(SYSTEM_GRAPHITE),YES)
480$(eval $(call gb_Library_set_ldflags,vcl,\
481    $$(LDFLAGS) \
482    $(GRAPHITE_LIBS) \
483))
484else
485$(eval $(call gb_Library_add_linked_static_libs,vcl,\
486    graphite \
487))
488endif
489endif
490# on windows link static graphite library
491ifeq ($(OS),WNT)
492$(eval $(call gb_Library_add_linked_static_libs,vcl,\
493    graphite \
494))
495endif
496endif
497
498ifeq ($(OS),LINUX)
499$(eval $(call gb_Library_add_linked_libs,vcl,\
500	dl \
501	m \
502	pthread \
503))
504endif
505
506ifeq ($(OS),SOLARIS)
507ifeq ($(CPUNAME)$(CPU),SPARCU)
508$(eval $(call gb_Library_set_ldflags,vcl,\
509    $$(LDFLAGS) \
510    -R/usr/sfw/lib/64 \
511))
512else
513$(eval $(call gb_Library_set_ldflags,vcl,\
514    $$(LDFLAGS) \
515    -R/usr/sfw/lib \
516))
517endif
518endif
519
520ifeq ($(GUIBASE),aqua)
521$(eval $(call gb_Library_add_linked_libs,vcl,\
522	AppleRemote \
523))
524$(eval $(call gb_Library_set_ldflags,vcl,\
525    $$(LDFLAGS) \
526    -framework QuickTime \
527    -framework Cocoa \
528    -framework Carbon \
529    -framework CoreFoundation \
530))
531endif
532
533ifeq ($(OS),WNT)
534ifeq ($(USE_MINGW),)
535$(eval $(call gb_Library_set_ldflags,vcl,\
536    $$(LDFLAGS) \
537    /ENTRY:LibMain@12 \
538))
539endif
540$(eval $(call gb_Library_add_linked_libs,vcl,\
541	advapi32 \
542	gdi32 \
543	gdiplus \
544	imm32 \
545	mpr \
546	msimg32 \
547	ole32 \
548	shell32 \
549	user32 \
550	uuid \
551	winspool \
552	$(gb_STDLIBS) \
553))
554endif
555# vim: set noet sw=4 ts=4:
556