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