xref: /trunk/main/vcl/Library_vcl.mk (revision af1486d9)
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),os2)
49$(eval $(call gb_Library_set_include,vcl,\
50	$$(INCLUDE) \
51	-idirafter /@unixroot/usr/dev/toolkit452/h \
52))
53endif
54ifeq ($(GUIBASE),unx)
55$(eval $(call gb_Library_set_cxxflags,vcl,\
56    $$(CXXFLAGS) \
57))
58endif
59
60$(eval $(call gb_Library_set_defs,vcl,\
61	$$(DEFS) \
62	-DVCL_DLLIMPLEMENTATION \
63    -DCUI_DLL_NAME=\"$(call gb_Library_get_runtime_filename,cui)\" \
64    -DDLLPOSTFIX=$(subst $(or $(gb_Library_DLLEXT),$(gb_Library_PLAINEXT)),,$(gb_Library_OOOEXT)) \
65))
66
67$(eval $(call gb_Library_add_linked_libs,vcl,\
68    tl \
69    utl \
70    sot \
71    ucbhelper \
72	basegfx \
73	comphelper \
74    cppuhelper \
75    icuuc \
76    icule \
77	i18nisolang1 \
78	i18npaper \
79    i18nutil \
80    jvmaccess \
81	stl \
82	cppu \
83	sal \
84	vos3 \
85	$(gb_STDLIBS) \
86))
87
88ifeq ($(GUIBASE),unx)
89$(eval $(call gb_Library_add_linked_libs,vcl,\
90    freetype \
91))
92endif
93
94ifeq ($(GUIBASE),os2)
95# YD FIXME this is not working... needs ldflags hack...
96$(eval $(call gb_Library_add_linked_libs,vcl,\
97    ft2lib \
98))
99$(eval $(call gb_Library_set_ldflags,vcl,\
100    $$(LDFLAGS) \
101    -lft2lib \
102))
103
104endif
105
106ifeq ($(GUIBASE),aqua)
107$(eval $(call gb_Library_set_cxxflags,vcl,\
108    $$(CXXFLAGS) \
109    $$(OBJCXXFLAGS) \
110))
111ifeq ($(ENABLE_CAIRO),TRUE)
112$(eval $(call gb_Library_set_defs,vcl,\
113	$$(DEFS) \
114	-DCAIRO \
115))
116endif
117$(eval $(call gb_Library_add_objcxxobjects,vcl,\
118    vcl/aqua/source/a11y/aqua11yactionwrapper \
119    vcl/aqua/source/a11y/aqua11ycomponentwrapper \
120    vcl/aqua/source/a11y/aqua11yfactory \
121    vcl/aqua/source/a11y/aqua11yrolehelper \
122    vcl/aqua/source/a11y/aqua11yselectionwrapper \
123    vcl/aqua/source/a11y/aqua11ytablewrapper \
124    vcl/aqua/source/a11y/aqua11ytextattributeswrapper \
125    vcl/aqua/source/a11y/aqua11ytextwrapper \
126    vcl/aqua/source/a11y/aqua11yutil \
127    vcl/aqua/source/a11y/aqua11yvaluewrapper \
128    vcl/aqua/source/a11y/aqua11ywrapper \
129    vcl/aqua/source/a11y/aqua11ywrapperbutton \
130    vcl/aqua/source/a11y/aqua11ywrappercheckbox \
131    vcl/aqua/source/a11y/aqua11ywrappercombobox \
132    vcl/aqua/source/a11y/aqua11ywrappergroup \
133    vcl/aqua/source/a11y/aqua11ywrapperlist \
134    vcl/aqua/source/a11y/aqua11ywrapperradiobutton \
135    vcl/aqua/source/a11y/aqua11ywrapperradiogroup \
136    vcl/aqua/source/a11y/aqua11ywrapperrow \
137    vcl/aqua/source/a11y/aqua11ywrapperscrollarea \
138    vcl/aqua/source/a11y/aqua11ywrapperscrollbar \
139    vcl/aqua/source/a11y/aqua11ywrappersplitter \
140    vcl/aqua/source/a11y/aqua11ywrapperstatictext \
141    vcl/aqua/source/a11y/aqua11ywrappertabgroup \
142    vcl/aqua/source/a11y/aqua11ywrappertextarea \
143    vcl/aqua/source/a11y/aqua11ywrappertoolbar \
144    vcl/aqua/source/app/salnstimer \
145    vcl/aqua/source/app/vclnsapp \
146    vcl/aqua/source/gdi/aquaprintaccessoryview \
147    vcl/aqua/source/gdi/aquaprintview \
148    vcl/aqua/source/window/salframeview \
149    vcl/aqua/source/window/salnsmenu \
150))
151$(eval $(call gb_Library_add_exception_objects,vcl,\
152    vcl/aqua/source/a11y/aqua11yfocuslistener \
153    vcl/aqua/source/a11y/aqua11yfocustracker \
154    vcl/aqua/source/a11y/aqua11ylistener \
155    vcl/aqua/source/a11y/documentfocuslistener \
156    vcl/aqua/source/app/saldata \
157    vcl/aqua/source/app/salinst \
158    vcl/aqua/source/app/salsys \
159    vcl/aqua/source/app/saltimer \
160    vcl/aqua/source/dtrans/DataFlavorMapping \
161    vcl/aqua/source/dtrans/DragActionConversion \
162    vcl/aqua/source/dtrans/DragSource \
163    vcl/aqua/source/dtrans/DragSourceContext \
164    vcl/aqua/source/dtrans/DropTarget \
165    vcl/aqua/source/dtrans/HtmlFmtFlt \
166    vcl/aqua/source/dtrans/OSXTransferable \
167    vcl/aqua/source/dtrans/PictToBmpFlt \
168    vcl/aqua/source/dtrans/aqua_clipboard \
169    vcl/aqua/source/dtrans/service_entry \
170    vcl/aqua/source/gdi/ctfonts \
171    vcl/aqua/source/gdi/ctlayout \
172    vcl/aqua/source/gdi/salbmp \
173    vcl/aqua/source/gdi/salcolorutils \
174    vcl/aqua/source/gdi/salgdi \
175    vcl/aqua/source/gdi/salgdiutils \
176    vcl/aqua/source/gdi/salmathutils \
177    vcl/aqua/source/gdi/salnativewidgets \
178    vcl/aqua/source/gdi/salprn \
179    vcl/aqua/source/gdi/salvd \
180    vcl/aqua/source/window/salframe \
181    vcl/aqua/source/window/salmenu \
182    vcl/aqua/source/window/salobj \
183))
184endif
185
186ifeq ($(GUIBASE),unx)
187$(eval $(call gb_Library_set_defs,vcl,\
188	$$(DEFS) \
189    -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
190    -DSAL_DLLPOSTFIX=\"\" \
191    -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
192))
193## handle fontconfig
194ifneq ($(ENABLE_FONTCONFIG),)
195$(eval $(call gb_Library_set_defs,vcl,\
196	$$(DEFS) \
197    -DENABLE_FONTCONFIG \
198))
199## handle CUPS
200ifneq ($(ENABLE_CUPS),)
201$(eval $(call gb_Library_set_defs,vcl,\
202	$$(DEFS) \
203    -DENABLE_CUPS \
204))
205endif
206endif
207$(eval $(call gb_Library_add_exception_objects,vcl,\
208    vcl/source/glyphs/gcach_ftyp \
209    vcl/source/glyphs/gcach_layout \
210    vcl/source/glyphs/gcach_rbmp \
211    vcl/source/glyphs/glyphcache \
212    vcl/unx/generic/fontmanager/fontcache \
213    vcl/unx/generic/fontmanager/fontconfig \
214    vcl/unx/generic/fontmanager/fontmanager \
215    vcl/unx/generic/fontmanager/helper \
216    vcl/unx/generic/fontmanager/parseAFM \
217	vcl/unx/generic/plugadapt/salplug \
218    vcl/unx/generic/printer/cupsmgr \
219    vcl/unx/generic/printer/jobdata \
220    vcl/unx/generic/printer/ppdparser \
221    vcl/unx/generic/printer/printerinfomanager \
222))
223endif
224
225ifeq ($(OS),WNT)
226$(eval $(call gb_Library_add_exception_objects,vcl,\
227    vcl/win/source/app/saldata \
228    vcl/win/source/app/salinfo \
229    vcl/win/source/app/salinst \
230    vcl/win/source/app/salshl \
231    vcl/win/source/app/saltimer \
232    vcl/win/source/gdi/salbmp \
233    vcl/win/source/gdi/salgdi \
234    vcl/win/source/gdi/salgdi2 \
235    vcl/win/source/gdi/salgdi3 \
236    vcl/win/source/gdi/salgdi_gdiplus \
237    vcl/win/source/gdi/salnativewidgets-luna \
238    vcl/win/source/gdi/salprn \
239    vcl/win/source/gdi/salvd \
240    vcl/win/source/gdi/winlayout \
241    vcl/win/source/gdi/wntgdi \
242    vcl/win/source/window/salframe \
243    vcl/win/source/window/salmenu \
244    vcl/win/source/window/salobj \
245))
246
247$(eval $(call gb_Library_add_nativeres,vcl,src))
248
249endif
250
251ifeq ($(OS),OS2)
252$(eval $(call gb_Library_add_exception_objects,vcl,\
253    vcl/os2/source/app/salinfo \
254    vcl/os2/source/app/salinst \
255    vcl/os2/source/app/sallang \
256    vcl/os2/source/app/salshl \
257    vcl/os2/source/app/saltimer \
258    vcl/os2/source/gdi/salbmp \
259    vcl/os2/source/gdi/salgdi \
260    vcl/os2/source/gdi/salgdi2 \
261    vcl/os2/source/gdi/salgdi3 \
262    vcl/os2/source/gdi/salprn \
263    vcl/os2/source/gdi/salvd \
264    vcl/os2/source/gdi/os2layout \
265    vcl/os2/source/window/salframe \
266    vcl/os2/source/window/salmenu \
267    vcl/os2/source/window/salobj \
268))
269
270$(eval $(call gb_Library_add_nativeres,vcl,src))
271
272endif
273
274$(eval $(call gb_Library_add_exception_objects,vcl,\
275    vcl/source/app/dbggui \
276    vcl/source/app/dndhelp \
277    vcl/source/app/help \
278    vcl/source/app/i18nhelp \
279    vcl/source/app/idlemgr \
280    vcl/source/app/salvtables \
281    vcl/source/app/session \
282    vcl/source/app/settings \
283    vcl/source/app/sound \
284    vcl/source/app/stdtext \
285    vcl/source/app/svapp \
286    vcl/source/app/svdata \
287    vcl/source/app/svmain \
288    vcl/source/app/svmainhook \
289    vcl/source/app/timer \
290    vcl/source/app/unohelp2 \
291    vcl/source/app/unohelp \
292    vcl/source/app/vclevent \
293    vcl/source/components/display \
294    vcl/source/components/dtranscomp \
295    vcl/source/components/factory \
296    vcl/source/components/fontident \
297    vcl/source/components/stringmirror \
298    vcl/source/control/button \
299    vcl/source/control/combobox \
300    vcl/source/control/ctrl \
301    vcl/source/control/edit \
302    vcl/source/control/field2 \
303    vcl/source/control/field \
304    vcl/source/control/fixbrd \
305    vcl/source/control/fixed \
306    vcl/source/control/group \
307    vcl/source/control/ilstbox \
308    vcl/source/control/imgctrl \
309    vcl/source/control/longcurr \
310    vcl/source/control/lstbox \
311    vcl/source/control/menubtn \
312    vcl/source/control/morebtn \
313    vcl/source/control/quickselectionengine \
314    vcl/source/control/scrbar \
315    vcl/source/control/slider \
316    vcl/source/control/spinbtn \
317    vcl/source/control/spinfld \
318    vcl/source/control/tabctrl \
319    vcl/source/control/throbber \
320    vcl/source/fontsubset/cff \
321    vcl/source/fontsubset/fontsubset \
322    vcl/source/fontsubset/gsub \
323    vcl/source/fontsubset/list \
324    vcl/source/fontsubset/sft \
325    vcl/source/fontsubset/ttcr \
326    vcl/source/fontsubset/xlat \
327    vcl/source/gdi/alpha \
328    vcl/source/gdi/animate \
329    vcl/source/gdi/base14 \
330    vcl/source/gdi/bitmap3 \
331    vcl/source/gdi/bitmap4 \
332    vcl/source/gdi/bitmap \
333    vcl/source/gdi/bitmapex \
334    vcl/source/gdi/bmpacc2 \
335    vcl/source/gdi/bmpacc3 \
336    vcl/source/gdi/bmpacc \
337    vcl/source/gdi/bmpconv \
338    vcl/source/gdi/bmpfast \
339    vcl/source/gdi/configsettings \
340    vcl/source/gdi/cvtgrf \
341    vcl/source/gdi/cvtsvm \
342    vcl/source/gdi/dibtools \
343    vcl/source/gdi/extoutdevdata \
344    vcl/source/gdi/font \
345    vcl/source/gdi/gdimtf \
346    vcl/source/gdi/gdimetafiletools \
347    vcl/source/gdi/gfxlink \
348    vcl/source/gdi/gradient \
349    vcl/source/gdi/graph \
350    vcl/source/gdi/graphictools \
351    vcl/source/gdi/hatch \
352    vcl/source/gdi/image \
353    vcl/source/gdi/imagerepository \
354    vcl/source/gdi/impanmvw \
355    vcl/source/gdi/impbmp \
356    vcl/source/gdi/impfont \
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/regionband \
389    vcl/source/gdi/salgdilayout \
390    vcl/source/gdi/sallayout \
391    vcl/source/gdi/salmisc \
392    vcl/source/gdi/salnativewidgets-none \
393    vcl/source/gdi/svgdata \
394    vcl/source/gdi/textlayout \
395    vcl/source/gdi/virdev \
396    vcl/source/gdi/wall \
397    vcl/source/helper/canvasbitmap \
398    vcl/source/helper/canvastools \
399    vcl/source/helper/evntpost \
400    vcl/source/helper/lazydelete \
401    vcl/source/helper/strhelper \
402    vcl/source/helper/threadex \
403    vcl/source/helper/xconnection \
404    vcl/source/salmain/salmain \
405    vcl/source/window/abstdlg \
406    vcl/source/window/accel \
407    vcl/source/window/accmgr \
408    vcl/source/window/arrange \
409    vcl/source/window/brdwin \
410    vcl/source/window/btndlg \
411    vcl/source/window/cmdevt \
412    vcl/source/window/cursor \
413    vcl/source/window/decoview \
414    vcl/source/window/dialog \
415    vcl/source/window/dlgctrl \
416    vcl/source/window/dndevdis \
417    vcl/source/window/dndlcon \
418    vcl/source/window/dockingarea \
419    vcl/source/window/dockmgr \
420    vcl/source/window/dockwin \
421    vcl/source/window/floatwin \
422    vcl/source/window/introwin \
423    vcl/source/window/javachild \
424    vcl/source/window/keycod \
425    vcl/source/window/keyevent \
426    vcl/source/window/menu \
427    vcl/source/window/mnemonic \
428    vcl/source/window/mnemonicengine \
429    vcl/source/window/mouseevent \
430    vcl/source/window/msgbox \
431    vcl/source/window/popupmenuwindow \
432    vcl/source/window/printdlg \
433    vcl/source/window/scrwnd \
434    vcl/source/window/seleng \
435    vcl/source/window/split \
436    vcl/source/window/splitwin \
437    vcl/source/window/status \
438    vcl/source/window/syschild \
439    vcl/source/window/syswin \
440    vcl/source/window/tabdlg \
441    vcl/source/window/tabpage \
442    vcl/source/window/taskpanelist \
443    vcl/source/window/toolbox2 \
444    vcl/source/window/toolbox \
445    vcl/source/window/window2 \
446    vcl/source/window/window3 \
447    vcl/source/window/window4 \
448    vcl/source/window/window \
449    vcl/source/window/winproc \
450    vcl/source/window/wpropset \
451    vcl/source/window/wrkwin \
452))
453
454## handle Graphite
455ifeq ($(ENABLE_GRAPHITE),TRUE)
456# add defines, graphite sources for all platforms
457$(eval $(call gb_Library_set_defs,vcl,\
458	$$(DEFS) \
459	-DENABLE_GRAPHITE \
460))
461$(eval $(call gb_Library_add_exception_objects,vcl,\
462    vcl/source/glyphs/graphite_cache \
463    vcl/source/glyphs/graphite_features \
464    vcl/source/glyphs/graphite_layout \
465    vcl/source/glyphs/graphite_textsrc \
466))
467
468# handle X11 platforms, which have additional files and possibly system graphite
469ifeq ($(GUIBASE),unx)
470$(eval $(call gb_Library_add_exception_objects,vcl,\
471    vcl/source/glyphs/graphite_adaptors \
472    vcl/source/glyphs/graphite_serverfont \
473))
474ifeq ($(SYSTEM_GRAPHITE),YES)
475$(eval $(call gb_Library_set_ldflags,vcl,\
476    $$(LDFLAGS) \
477    $(GRAPHITE_LIBS) \
478))
479else
480$(eval $(call gb_Library_add_linked_static_libs,vcl,\
481    graphite \
482))
483endif
484endif
485# on windows link static graphite library
486ifeq ($(OS),WNT)
487$(eval $(call gb_Library_add_linked_static_libs,vcl,\
488    graphite \
489))
490endif
491endif
492
493ifeq ($(OS),LINUX)
494$(eval $(call gb_Library_add_linked_libs,vcl,\
495	dl \
496	m \
497	pthread \
498))
499endif
500
501ifeq ($(OS),SOLARIS)
502ifeq ($(CPUNAME)$(CPU),SPARCU)
503$(eval $(call gb_Library_set_ldflags,vcl,\
504    $$(LDFLAGS) \
505    -R/usr/sfw/lib/64 \
506))
507else
508$(eval $(call gb_Library_set_ldflags,vcl,\
509    $$(LDFLAGS) \
510    -R/usr/sfw/lib \
511))
512endif
513endif
514
515ifeq ($(GUIBASE),aqua)
516$(eval $(call gb_Library_add_linked_libs,vcl,\
517	AppleRemote \
518))
519$(eval $(call gb_Library_set_ldflags,vcl,\
520    $$(LDFLAGS) \
521    -framework Cocoa \
522    -framework Carbon \
523    -framework CoreFoundation \
524))
525ifneq ($(MACOSX_DEPLOYMENT_TARGET),10.7)
526$(eval $(call gb_Library_set_ldflags,vcl, $$(LDFLAGS) -framework QuickTime ))
527endif
528endif
529
530ifeq ($(OS),WNT)
531ifeq ($(USE_MINGW),)
532$(eval $(call gb_Library_set_ldflags,vcl,\
533    $$(LDFLAGS) \
534    /ENTRY:LibMain@12 \
535))
536endif
537$(eval $(call gb_Library_add_linked_libs,vcl,\
538	advapi32 \
539	gdi32 \
540	gdiplus \
541	imm32 \
542	mpr \
543	msimg32 \
544	ole32 \
545	shell32 \
546	user32 \
547	uuid \
548	winspool \
549	$(gb_STDLIBS) \
550))
551endif
552# vim: set noet sw=4 ts=4:
553