xref: /trunk/main/vcl/Library_vcl.mk (revision 4665f8d3)
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/gdimetafiletools \
341    vcl/source/gdi/gfxlink \
342    vcl/source/gdi/gradient \
343    vcl/source/gdi/graph \
344    vcl/source/gdi/graphictools \
345    vcl/source/gdi/hatch \
346    vcl/source/gdi/image \
347    vcl/source/gdi/imagerepository \
348    vcl/source/gdi/impanmvw \
349    vcl/source/gdi/impbmp \
350    vcl/source/gdi/impgraph \
351    vcl/source/gdi/impimage \
352    vcl/source/gdi/impimagetree \
353    vcl/source/gdi/impvect \
354    vcl/source/gdi/jobset \
355    vcl/source/gdi/lineinfo \
356    vcl/source/gdi/mapmod \
357    vcl/source/gdi/metaact \
358    vcl/source/gdi/metric \
359    vcl/source/gdi/octree \
360    vcl/source/gdi/oldprintadaptor \
361    vcl/source/gdi/outdev2 \
362    vcl/source/gdi/outdev3 \
363    vcl/source/gdi/outdev4 \
364    vcl/source/gdi/outdev5 \
365    vcl/source/gdi/outdev6 \
366    vcl/source/gdi/outdev \
367    vcl/source/gdi/outdevnative \
368    vcl/source/gdi/outmap \
369    vcl/source/gdi/pdfextoutdevdata \
370    vcl/source/gdi/pdffontcache \
371    vcl/source/gdi/pdfwriter \
372    vcl/source/gdi/pdfwriter_impl2 \
373    vcl/source/gdi/pdfwriter_impl \
374    vcl/source/gdi/pngread \
375    vcl/source/gdi/pngwrite \
376    vcl/source/gdi/print2 \
377    vcl/source/gdi/print3 \
378    vcl/source/gdi/print \
379    vcl/source/gdi/regband \
380    vcl/source/gdi/region \
381    vcl/source/gdi/regionband \
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