xref: /aoo42x/main/vcl/Library_vcl.mk (revision 498ce991)
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
266ifeq ($(gb_DEBUGLEVEL),2)
267$(eval $(call gb_Library_add_cobjects,vcl,\
268    vcl/os2/source/app/printf \
269))
270endif
271
272$(eval $(call gb_Library_add_nativeres,vcl,src))
273
274endif
275
276$(eval $(call gb_Library_add_exception_objects,vcl,\
277    vcl/source/app/dbggui \
278    vcl/source/app/dndhelp \
279    vcl/source/app/help \
280    vcl/source/app/i18nhelp \
281    vcl/source/app/idlemgr \
282    vcl/source/app/salvtables \
283    vcl/source/app/session \
284    vcl/source/app/settings \
285    vcl/source/app/sound \
286    vcl/source/app/stdtext \
287    vcl/source/app/svapp \
288    vcl/source/app/svdata \
289    vcl/source/app/svmain \
290    vcl/source/app/svmainhook \
291    vcl/source/app/timer \
292    vcl/source/app/unohelp2 \
293    vcl/source/app/unohelp \
294    vcl/source/app/vclevent \
295    vcl/source/components/display \
296    vcl/source/components/dtranscomp \
297    vcl/source/components/factory \
298    vcl/source/components/fontident \
299    vcl/source/components/stringmirror \
300    vcl/source/control/button \
301    vcl/source/control/combobox \
302    vcl/source/control/ctrl \
303    vcl/source/control/edit \
304    vcl/source/control/field2 \
305    vcl/source/control/field \
306    vcl/source/control/fixbrd \
307    vcl/source/control/fixed \
308    vcl/source/control/group \
309    vcl/source/control/ilstbox \
310    vcl/source/control/imgctrl \
311    vcl/source/control/longcurr \
312    vcl/source/control/lstbox \
313    vcl/source/control/menubtn \
314    vcl/source/control/morebtn \
315    vcl/source/control/quickselectionengine \
316    vcl/source/control/scrbar \
317    vcl/source/control/slider \
318    vcl/source/control/spinbtn \
319    vcl/source/control/spinfld \
320    vcl/source/control/tabctrl \
321    vcl/source/control/throbber \
322    vcl/source/fontsubset/cff \
323    vcl/source/fontsubset/fontsubset \
324    vcl/source/fontsubset/gsub \
325    vcl/source/fontsubset/list \
326    vcl/source/fontsubset/sft \
327    vcl/source/fontsubset/ttcr \
328    vcl/source/fontsubset/xlat \
329    vcl/source/gdi/alpha \
330    vcl/source/gdi/animate \
331    vcl/source/gdi/base14 \
332    vcl/source/gdi/bitmap2 \
333    vcl/source/gdi/bitmap3 \
334    vcl/source/gdi/bitmap4 \
335    vcl/source/gdi/bitmap \
336    vcl/source/gdi/bitmapex \
337    vcl/source/gdi/bmpacc2 \
338    vcl/source/gdi/bmpacc3 \
339    vcl/source/gdi/bmpacc \
340    vcl/source/gdi/bmpconv \
341    vcl/source/gdi/bmpfast \
342    vcl/source/gdi/configsettings \
343    vcl/source/gdi/cvtgrf \
344    vcl/source/gdi/cvtsvm \
345    vcl/source/gdi/extoutdevdata \
346    vcl/source/gdi/font \
347    vcl/source/gdi/gdimtf \
348    vcl/source/gdi/gfxlink \
349    vcl/source/gdi/gradient \
350    vcl/source/gdi/graph \
351    vcl/source/gdi/graphictools \
352    vcl/source/gdi/hatch \
353    vcl/source/gdi/image \
354    vcl/source/gdi/imagerepository \
355    vcl/source/gdi/impanmvw \
356    vcl/source/gdi/impbmp \
357    vcl/source/gdi/impgraph \
358    vcl/source/gdi/impimage \
359    vcl/source/gdi/impimagetree \
360    vcl/source/gdi/impvect \
361    vcl/source/gdi/jobset \
362    vcl/source/gdi/lineinfo \
363    vcl/source/gdi/mapmod \
364    vcl/source/gdi/metaact \
365    vcl/source/gdi/metric \
366    vcl/source/gdi/octree \
367    vcl/source/gdi/oldprintadaptor \
368    vcl/source/gdi/outdev2 \
369    vcl/source/gdi/outdev3 \
370    vcl/source/gdi/outdev4 \
371    vcl/source/gdi/outdev5 \
372    vcl/source/gdi/outdev6 \
373    vcl/source/gdi/outdev \
374    vcl/source/gdi/outdevnative \
375    vcl/source/gdi/outmap \
376    vcl/source/gdi/pdfextoutdevdata \
377    vcl/source/gdi/pdffontcache \
378    vcl/source/gdi/pdfwriter \
379    vcl/source/gdi/pdfwriter_impl2 \
380    vcl/source/gdi/pdfwriter_impl \
381    vcl/source/gdi/pngread \
382    vcl/source/gdi/pngwrite \
383    vcl/source/gdi/print2 \
384    vcl/source/gdi/print3 \
385    vcl/source/gdi/print \
386    vcl/source/gdi/regband \
387    vcl/source/gdi/region \
388    vcl/source/gdi/rendergraphic \
389    vcl/source/gdi/rendergraphicrasterizer \
390    vcl/source/gdi/salgdilayout \
391    vcl/source/gdi/sallayout \
392    vcl/source/gdi/salmisc \
393    vcl/source/gdi/salnativewidgets-none \
394    vcl/source/gdi/svgread \
395	vcl/source/gdi/textlayout \
396    vcl/source/gdi/virdev \
397    vcl/source/gdi/wall \
398    vcl/source/helper/canvasbitmap \
399    vcl/source/helper/canvastools \
400    vcl/source/helper/evntpost \
401    vcl/source/helper/lazydelete \
402    vcl/source/helper/strhelper \
403    vcl/source/helper/threadex \
404    vcl/source/helper/xconnection \
405    vcl/source/salmain/salmain \
406    vcl/source/window/abstdlg \
407    vcl/source/window/accel \
408    vcl/source/window/accmgr \
409    vcl/source/window/arrange \
410    vcl/source/window/brdwin \
411    vcl/source/window/btndlg \
412    vcl/source/window/cmdevt \
413    vcl/source/window/cursor \
414    vcl/source/window/decoview \
415    vcl/source/window/dialog \
416    vcl/source/window/dlgctrl \
417    vcl/source/window/dndevdis \
418    vcl/source/window/dndlcon \
419    vcl/source/window/dockingarea \
420    vcl/source/window/dockmgr \
421    vcl/source/window/dockwin \
422    vcl/source/window/floatwin \
423    vcl/source/window/introwin \
424    vcl/source/window/javachild \
425    vcl/source/window/keycod \
426    vcl/source/window/keyevent \
427    vcl/source/window/menu \
428    vcl/source/window/mnemonic \
429    vcl/source/window/mnemonicengine \
430    vcl/source/window/mouseevent \
431    vcl/source/window/msgbox \
432    vcl/source/window/popupmenuwindow \
433    vcl/source/window/printdlg \
434    vcl/source/window/scrwnd \
435    vcl/source/window/seleng \
436    vcl/source/window/split \
437    vcl/source/window/splitwin \
438    vcl/source/window/status \
439    vcl/source/window/syschild \
440    vcl/source/window/syswin \
441    vcl/source/window/tabdlg \
442    vcl/source/window/tabpage \
443    vcl/source/window/taskpanelist \
444    vcl/source/window/toolbox2 \
445    vcl/source/window/toolbox \
446    vcl/source/window/window2 \
447    vcl/source/window/window3 \
448    vcl/source/window/window4 \
449    vcl/source/window/window \
450    vcl/source/window/winproc \
451    vcl/source/window/wpropset \
452    vcl/source/window/wrkwin \
453))
454
455## handle Graphite
456ifneq ($(ENABLE_GRAPHITE),)
457# add defines, graphite sources for all platforms
458$(eval $(call gb_Library_set_defs,vcl,\
459	$$(DEFS) \
460	-DENABLE_GRAPHITE \
461))
462$(eval $(call gb_Library_add_exception_objects,vcl,\
463    vcl/source/glyphs/graphite_cache \
464    vcl/source/glyphs/graphite_features \
465    vcl/source/glyphs/graphite_layout \
466    vcl/source/glyphs/graphite_textsrc \
467))
468
469#building with stlport, but graphite was not built with stlport
470ifneq ($(USE_SYSTEM_STL),YES)
471ifeq ($(SYSTEM_GRAPHITE),YES)
472$(eval $(call gb_Library_set_defs,vcl,\
473	$$(DEFS) \
474	-DADAPT_EXT_STL \
475))
476endif
477endif
478
479# handle X11 platforms, which have additional files and possibly system graphite
480ifeq ($(GUIBASE),unx)
481$(eval $(call gb_Library_add_exception_objects,vcl,\
482    vcl/source/glyphs/graphite_adaptors \
483    vcl/source/glyphs/graphite_serverfont \
484))
485ifeq ($(SYSTEM_GRAPHITE),YES)
486$(eval $(call gb_Library_set_ldflags,vcl,\
487    $$(LDFLAGS) \
488    $(GRAPHITE_LIBS) \
489))
490else
491$(eval $(call gb_Library_add_linked_static_libs,vcl,\
492    graphite \
493))
494endif
495endif
496# on windows link static graphite library
497ifeq ($(OS),WNT)
498$(eval $(call gb_Library_add_linked_static_libs,vcl,\
499    graphite \
500))
501endif
502endif
503
504ifeq ($(OS),LINUX)
505$(eval $(call gb_Library_add_linked_libs,vcl,\
506	dl \
507	m \
508	pthread \
509))
510endif
511
512ifeq ($(OS),SOLARIS)
513ifeq ($(CPUNAME)$(CPU),SPARCU)
514$(eval $(call gb_Library_set_ldflags,vcl,\
515    $$(LDFLAGS) \
516    -R/usr/sfw/lib/64 \
517))
518else
519$(eval $(call gb_Library_set_ldflags,vcl,\
520    $$(LDFLAGS) \
521    -R/usr/sfw/lib \
522))
523endif
524endif
525
526ifeq ($(GUIBASE),aqua)
527$(eval $(call gb_Library_add_linked_libs,vcl,\
528	AppleRemote \
529))
530$(eval $(call gb_Library_set_ldflags,vcl,\
531    $$(LDFLAGS) \
532    -framework QuickTime \
533    -framework Cocoa \
534    -framework Carbon \
535    -framework CoreFoundation \
536))
537endif
538
539ifeq ($(OS),WNT)
540ifeq ($(USE_MINGW),)
541$(eval $(call gb_Library_set_ldflags,vcl,\
542    $$(LDFLAGS) \
543    /ENTRY:LibMain@12 \
544))
545endif
546$(eval $(call gb_Library_add_linked_libs,vcl,\
547	advapi32 \
548	gdi32 \
549	gdiplus \
550	imm32 \
551	mpr \
552	msimg32 \
553	ole32 \
554	shell32 \
555	user32 \
556	uuid \
557	winspool \
558	$(gb_STDLIBS) \
559))
560endif
561# vim: set noet sw=4 ts=4:
562