xref: /aoo42x/main/vcl/util/makefile.mk (revision ddde725d)
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
28PRJ=..
29
30PRJNAME=vcl
31TARGET=vcl
32TARGETTYPE=GUI
33USE_DEFFILE=TRUE
34GEN_HID_OTHER=TRUE
35
36.IF "$(SNDFILE_LIBS)"!=""
37SNDFILELIB=$(SNDFILE_LIBS)
38.ENDIF
39
40# --- Settings -----------------------------------------------------------
41
42.INCLUDE :  settings.mk
43.INCLUDE :  makefile.pmk
44.INCLUDE :  makefile2.pmk
45
46.IF "$(OS)" == "SOLARIS"
47.IF "$(CPUNAME)" == "SPARC" && "$(CPU)" == "U"
48LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib/64 $(LINKFLAGSRUNPATH_OOO)
49.ELSE
50LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib $(LINKFLAGSRUNPATH_OOO)
51.ENDIF
52.ENDIF
53
54# --- Allgemein ----------------------------------------------------------
55
56HXXDEPNLST= $(INC)$/vcl$/accel.hxx       \
57            $(INC)$/vcl$/animate.hxx     \
58            $(INC)$/vcl$/apptypes.hxx    \
59            $(INC)$/vcl$/bitmap.hxx      \
60            $(INC)$/vcl$/bitmapex.hxx    \
61            $(INC)$/vcl$/bmpacc.hxx      \
62            $(INC)$/vcl$/btndlg.hxx      \
63            $(INC)$/vcl$/button.hxx      \
64            $(INC)$/vcl$/ctrl.hxx        \
65            $(INC)$/vcl$/cursor.hxx      \
66            $(INC)$/vcl$/cmdevt.hxx      \
67            $(INC)$/vcl$/decoview.hxx    \
68            $(INC)$/vcl$/dialog.hxx      \
69            $(INC)$/vcl$/dllapi.h        \
70            $(INC)$/vcl$/dockwin.hxx     \
71            $(INC)$/vcl$/edit.hxx        \
72            $(INC)$/vcl$/event.hxx       \
73            $(INC)$/vcl$/field.hxx       \
74            $(INC)$/vcl$/fixed.hxx       \
75            $(INC)$/vcl$/floatwin.hxx    \
76            $(INC)$/vcl$/font.hxx        \
77            $(INC)$/vcl$/floatwin.hxx    \
78            $(INC)$/vcl$/graph.hxx       \
79            $(INC)$/vcl$/group.hxx       \
80            $(INC)$/vcl$/help.hxx        \
81            $(INC)$/vcl$/jobset.hxx      \
82            $(INC)$/vcl$/keycodes.hxx    \
83            $(INC)$/vcl$/keycod.hxx      \
84            $(INC)$/vcl$/image.hxx       \
85            $(INC)$/vcl$/lstbox.h             \
86            $(INC)$/vcl$/lstbox.hxx      \
87            $(INC)$/vcl$/mapmod.hxx      \
88            $(INC)$/vcl$/metaact.hxx     \
89            $(INC)$/vcl$/menu.hxx        \
90            $(INC)$/vcl$/menubtn.hxx     \
91            $(INC)$/vcl$/metric.hxx      \
92            $(INC)$/vcl$/morebtn.hxx     \
93            $(INC)$/vcl$/msgbox.hxx      \
94            $(INC)$/vcl$/octree.hxx      \
95            $(INC)$/vcl$/outdev.hxx      \
96            $(INC)$/vcl$/pointr.hxx      \
97            $(INC)$/vcl$/ptrstyle.hxx    \
98            $(INC)$/vcl$/prntypes.hxx    \
99            $(INC)$/vcl$/print.hxx       \
100            $(INC)$/vcl$/prndlg.hxx      \
101            $(INC)$/vcl$/region.hxx      \
102            $(INC)$/vcl$/salbtype.hxx    \
103            $(INC)$/vcl$/scrbar.hxx      \
104            $(INC)$/vcl$/slider.hxx      \
105            $(INC)$/vcl$/seleng.hxx      \
106            $(INC)$/vcl$/settings.hxx    \
107            $(INC)$/vcl$/sound.hxx       \
108            $(INC)$/vcl$/sndstyle.hxx    \
109            $(INC)$/vcl$/split.hxx       \
110            $(INC)$/vcl$/splitwin.hxx    \
111            $(INC)$/vcl$/spin.hxx        \
112            $(INC)$/vcl$/spinfld.hxx     \
113            $(INC)$/vcl$/status.hxx      \
114            $(INC)$/vcl$/stdtext.hxx     \
115            $(INC)$/vcl$/sv.h            \
116            $(INC)$/vcl$/svapp.hxx       \
117            $(INC)$/vcl$/syschild.hxx    \
118            $(INC)$/vcl$/sysdata.hxx     \
119            $(INC)$/vcl$/syswin.hxx      \
120            $(INC)$/vcl$/tabctrl.hxx     \
121            $(INC)$/vcl$/tabdlg.hxx      \
122            $(INC)$/vcl$/tabpage.hxx     \
123            $(INC)$/vcl$/toolbox.hxx     \
124            $(INC)$/vcl$/timer.hxx       \
125            $(INC)$/vcl$/virdev.hxx      \
126            $(INC)$/vcl$/wall.hxx        \
127            $(INC)$/vcl$/waitobj.hxx     \
128            $(INC)$/vcl$/window.hxx      \
129            $(INC)$/vcl$/wrkwin.hxx
130
131.IF "$(linkinc)" != ""
132SHL11FILE=  $(MISC)$/app.slo
133SHL12FILE=  $(MISC)$/gdi.slo
134SHL13FILE=  $(MISC)$/win.slo
135SHL14FILE=  $(MISC)$/ctrl.slo
136#SHL15FILE=  $(MISC)$/ex.slo
137SHL16FILE=  $(MISC)$/salapp.slo
138SHL17FILE=  $(MISC)$/salwin.slo
139SHL18FILE=  $(MISC)$/salgdi.slo
140.ENDIF
141
142LIB1TARGET= $(SLB)$/$(TARGET).lib
143LIB1FILES=  $(SLB)$/app.lib         \
144            $(SLB)$/gdi.lib         \
145            $(SLB)$/win.lib         \
146            $(SLB)$/ctrl.lib        \
147            $(SLB)$/helper.lib	    \
148            $(SLB)$/fontsubset.lib  \
149            $(SLB)$/components.lib
150
151.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua"
152LIB1FILES+= $(SLB)$/salplug.lib  \
153            $(SLB)$/fontman.lib  \
154            $(SLB)$/printer.lib
155.ELSE
156LIB1FILES+= \
157            $(SLB)$/salwin.lib  \
158            $(SLB)$/salgdi.lib  \
159            $(SLB)$/salapp.lib
160.IF "$(GUIBASE)" == "aqua"
161LIB1FILES+= $(SLB)$/dtransaqua.lib
162.ENDIF
163.ENDIF
164
165SHL1TARGET= vcl$(DLLPOSTFIX)
166SHL1IMPLIB= ivcl
167SHL1STDLIBS+=\
168            $(SOTLIB)           \
169            $(UNOTOOLSLIB)      \
170            $(TOOLSLIB)         \
171            $(I18NPAPERLIB)     \
172            $(I18NISOLANGLIB)   \
173            $(I18NUTILLIB)      \
174            $(COMPHELPERLIB)	\
175            $(UCBHELPERLIB)     \
176            $(CPPUHELPERLIB)    \
177            $(CPPULIB)          \
178            $(VOSLIB)           \
179            $(SALLIB)			\
180            $(BASEGFXLIB)		\
181            $(ICUUCLIB)			\
182			$(ICUDATALIB)		\
183            $(ICULELIB)			\
184			$(JVMACCESSLIB)
185
186.IF "$(GUI)" == "UNX"
187.IF "$(ENABLE_GRAPHITE)" != ""
188.IF "$(SYSTEM_GRAPHITE)" == "YES"
189SHL1STDLIBS+= $(GRAPHITE_LIBS)
190.ELSE
191SHL1STDLIBS+= $(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)/libgraphite.a
192.ENDIF
193.ENDIF
194.ENDIF
195SHL1USE_EXPORTS=name
196
197.IF "$(GUIBASE)"=="aqua"
198SHL1STDLIBS+= \
199	$(BASEBMPLIB) \
200	-lAppleRemote$(DLLPOSTFIX) \
201    -framework QuickTime
202
203LIB1FILES+= \
204            $(SLB)$/sala11y.lib
205.ENDIF
206
207.IF "$(USE_BUILTIN_RASTERIZER)"!=""
208    LIB1FILES +=    $(SLB)$/glyphs.lib
209    SHL1STDLIBS+=   $(FREETYPELIB)
210.ELSE
211.IF "$(ENABLE_GRAPHITE)" == "TRUE"
212    LIB1FILES +=    $(SLB)$/glyphs.lib
213.ENDIF
214.ENDIF # USE_BUILTIN_RASTERIZER
215
216SHL1LIBS=   $(LIB1TARGET)
217.IF "$(GUI)"!="UNX"
218.IF "$(COM)"!="GCC"
219#SHL1OBJS=   $(SLO)$/salshl.obj
220.ENDIF
221.ENDIF
222
223.IF "$(GUI)" != "UNX"
224SHL1RES=    $(RES)$/salsrc.res
225.ENDIF
226
227SHL1DEF=    $(MISC)$/$(SHL1TARGET).def
228
229DEF1NAME    =$(SHL1TARGET)
230DEF1DEPN    =   $(HXXDEPNLST) \
231                $(LIB1TARGET)
232DEF1DES     =VCL
233DEFLIB1NAME =vcl
234
235# --- W32 ----------------------------------------------------------------
236
237.IF "$(GUI)" == "WNT"
238
239.IF "$(ENABLE_GRAPHITE)" == "TRUE"
240.IF "$(COM)" == "GCC"
241SHL1STDLIBS += -lgraphite
242.ELSE
243SHL1STDLIBS += graphite_dll.lib
244.ENDIF
245.ENDIF
246
247SHL1STDLIBS += $(UWINAPILIB)      \
248               $(GDI32LIB)        \
249			   $(GDIPLUSLIB)	  \
250               $(MSIMG32LIB)      \
251               $(WINSPOOLLIB)     \
252               $(OLE32LIB)        \
253               $(SHELL32LIB)      \
254               $(ADVAPI32LIB)
255
256SHL1STDLIBS += $(IMM32LIB)
257
258.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
259LINKFLAGSSHL += /ENTRY:LibMain@12
260.ENDIF
261.ENDIF
262
263# --- OS2 ----------------------------------------------------------------
264
265.IF "$(GUI)" == "OS2"
266STDSHL1 += ft2lib.lib
267.ENDIF
268
269# --- UNX ----------------------------------------------------------------
270
271# UNX sal plugins
272.IF "$(GUI)" == "UNX" && "$(GUIBASE)" != "aqua"
273
274# desktop detector
275LIB7TARGET=$(SLB)$/idet
276LIB7FILES=$(SLB)$/dtdetect.lib
277SHL7TARGET=desktop_detector$(DLLPOSTFIX)
278SHL7STDLIBS=\
279            $(SALLIB) \
280            $(X11LINK_DYNAMIC)
281SHL7IMPLIB=idet
282SHL7LIBS=$(LIB7TARGET)
283
284# basic pure X11 plugin
285LIB2TARGET=$(SLB)$/ipure_x
286LIB2FILES= \
287            $(SLB)$/dtransX11.lib  \
288            $(SLB)$/printergfx.lib  \
289            $(SLB)$/salwin.lib  \
290            $(SLB)$/salgdi.lib  \
291            $(SLB)$/salapp.lib
292SHL2TARGET=vclplug_gen$(DLLPOSTFIX)
293SHL2IMPLIB=ipure_x
294SHL2LIBS=$(LIB2TARGET)
295SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN)
296
297# libs for generic plugin
298SHL2STDLIBS=\
299			$(VCLLIB)\
300            $(I18NPAPERLIB)     \
301            $(I18NISOLANGLIB)     \
302            $(TOOLSLIB)         \
303            $(VOSLIB)           \
304            $(BASEGFXLIB)	\
305            $(UNOTOOLSLIB) \
306            $(COMPHELPERLIB)	\
307            $(CPPUHELPERLIB) \
308            $(CPPULIB) \
309            $(SALLIB)
310
311# prepare linking of Xinerama
312.IF "$(USE_XINERAMA)" != "NO"
313
314.IF "$(OS)"=="MACOSX" || "$(OS)$(CPU)" == "LINUXX"
315XINERAMALIBS=-lXinerama
316.ELSE
317.IF "$(OS)" != "SOLARIS" || "$(USE_XINERAMA_VERSION)" == "Xorg"
318.IF "$(XINERAMA_LINK)" == "dynamic"
319XINERAMALIBS= -lXinerama
320.ELSE
321XINERAMALIBS= -Wl,-Bstatic -lXinerama -Wl,-Bdynamic
322.ENDIF # XINERAMA_LINK == dynamic
323.ENDIF # OS == SOLARIS
324.ENDIF # OS == MACOSX
325
326SHL2STDLIBS += $(XINERAMALIBS)
327.ENDIF # USE_XINERAMA != NO
328
329.IF "$(XRENDER_LINK)" == "YES"
330SHL2STDLIBS+=`pkg-config --libs xrender`
331.ENDIF
332
333.IF "$(GUIBASE)"=="unx"
334
335SHL2STDLIBS += -lXext -lSM -lICE -lX11
336.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD"
337# needed by salprnpsp.cxx
338SHL2STDLIBS+= -ldl
339.ENDIF
340
341.IF "$(ENABLE_RANDR)" != ""
342.IF "$(XRANDR_DLOPEN)" == "FALSE"
343SHL2STDLIBS+= $(XRANDR_LIBS)
344.ENDIF
345.ENDIF
346
347.ENDIF          # "$(GUIBASE)"=="unx"
348
349# gtk plugin
350.IF "$(ENABLE_GTK)" != ""
351PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0
352.IF "$(ENABLE_DBUS)" != ""
353PKGCONFIG_MODULES+= dbus-glib-1
354.ENDIF
355.INCLUDE: pkg_config.mk
356
357LIB4TARGET=$(SLB)$/igtk_plug_
358LIB4FILES=\
359			$(SLB)$/gtkapp.lib\
360			$(SLB)$/gtka11y.lib \
361			$(SLB)$/gtkgdi.lib\
362			$(SLB)$/gtkwin.lib
363
364SHL4TARGET=vclplug_gtk$(DLLPOSTFIX)
365SHL4IMPLIB=igtk_plug_
366SHL4LIBS=$(LIB4TARGET)
367SHL4DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN)
368# libs for gtk plugin
369SHL4STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//)
370# hack for faked SO environment
371.IF "$(PKGCONFIG_ROOT)"!=""
372SHL4SONAME+=-z nodefs
373SHL4NOCHECK=TRUE
374.ENDIF          # "$(PKGCONFIG_ROOT)"!=""
375
376
377SHL4STDLIBS+=-l$(SHL2TARGET)
378SHL4STDLIBS+=\
379            $(VCLLIB)		\
380            $(TOOLSLIB)         \
381            $(CPPUHELPERLIB)    \
382            $(CPPULIB)          \
383            $(VOSLIB)           \
384            $(SALLIB)           \
385            $(X11LINK_DYNAMIC)
386
387.IF "$(ENABLE_RANDR)" != ""
388.IF "$(XRANDR_DLOPEN)" == "FALSE"
389SHL4STDLIBS+= $(XRANDR_LIBS)
390.ENDIF
391.ENDIF
392
393.ENDIF # "$(ENABLE_GTK)" != ""
394
395# KDE plugin
396.IF "$(ENABLE_KDE)" != ""
397.IF "$(KDE_ROOT)"!=""
398EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib
399.IF "$(OS)$(CPU)" == "LINUXX"
400EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib64
401.ENDIF
402.ENDIF
403LIB5TARGET=$(SLB)$/ikde_plug_
404LIB5FILES=$(SLB)$/kdeplug.lib
405SHL5TARGET=vclplug_kde$(DLLPOSTFIX)
406SHL5IMPLIB=ikde_plug_
407SHL5LIBS=$(LIB5TARGET)
408SHL5DEPN=$(SHL2TARGETN)
409# libs for KDE plugin
410SHL5LINKFLAGS+=$(KDE_LIBS)
411SHL5STDLIBS+=-l$(SHL2TARGET)
412SHL5STDLIBS+=\
413        $(VCLLIB)       \
414        $(TOOLSLIB)     \
415        $(VOSLIB)       \
416        $(SALLIB)       \
417        $(X11LINK_DYNAMIC)
418
419.IF "$(ENABLE_RANDR)" != ""
420.IF "$(XRANDR_DLOPEN)" == "FALSE"
421SHL5STDLIBS+= $(XRANDR_LIBS)
422.ENDIF
423.ENDIF
424
425.ENDIF # "$(ENABLE_KDE)" != ""
426
427# KDE4 plugin
428.IF "$(ENABLE_KDE4)" != ""
429.IF "$(KDE4_ROOT)"!=""
430EXTRALIBPATHS+=-L$(KDE4_ROOT)$/lib
431.ENDIF
432LIB6TARGET=$(SLB)$/ikde4_plug_
433LIB6FILES=$(SLB)$/kde4plug.lib
434SHL6TARGET=vclplug_kde4$(DLLPOSTFIX)
435SHL6IMPLIB=ikde4_plug_
436SHL6LIBS=$(LIB6TARGET)
437SHL6DEPN=$(SHL2TARGETN)
438# libs for KDE4 plugin
439SHL6LINKFLAGS+=$(KDE4_LIBS)
440SHL6STDLIBS+=-l$(SHL2TARGET)
441SHL6STDLIBS+=\
442        $(VCLLIB)       \
443        $(PSPLIB)	\
444        $(TOOLSLIB)     \
445        $(VOSLIB)       \
446        $(SALLIB)   \
447        $(X11LINK_DYNAMIC)
448
449.IF "$(ENABLE_RANDR)" != ""
450.IF "$(XRANDR_DLOPEN)" == "FALSE"
451SHL6STDLIBS+= $(XRANDR_LIBS)
452.ENDIF
453.ENDIF
454
455.ENDIF # "$(ENABLE_KDE4)" != ""
456
457.ENDIF # UNX
458
459# --- Allgemein ----------------------------------------------------------
460
461.INCLUDE :  target.mk
462
463ALLTAR : $(MISC)/vcl.component
464
465.IF "$(OS)" == "MACOSX"
466my_platform = .macosx
467.ELIF "$(OS)" == "WNT"
468my_platform = .windows
469.END
470
471$(MISC)/vcl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
472        vcl.component
473    $(XSLTPROC) --nonet --stringparam uri \
474        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
475        $(SOLARENV)/bin/createcomponent.xslt vcl$(my_platform).component
476