xref: /aoo42x/main/vcl/util/makefile.mk (revision 5a7504da)
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
24PRJ=..
25
26PRJNAME=vcl
27TARGET=vcl
28TARGETTYPE=GUI
29USE_DEFFILE=TRUE
30GEN_HID_OTHER=TRUE
31
32.IF "$(SNDFILE_LIBS)"!=""
33SNDFILELIB=$(SNDFILE_LIBS)
34.ENDIF
35
36# --- Settings -----------------------------------------------------------
37
38.INCLUDE :  settings.mk
39.INCLUDE :  makefile.pmk
40.INCLUDE :  makefile2.pmk
41
42.IF "$(OS)" == "SOLARIS"
43.IF "$(CPUNAME)" == "SPARC" && "$(CPU)" == "U"
44LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib/64 $(LINKFLAGSRUNPATH_OOO)
45.ELSE
46LINKFLAGSRUNPATH_OOO := -R/usr/sfw/lib $(LINKFLAGSRUNPATH_OOO)
47.ENDIF
48.ENDIF
49
50# --- Allgemein ----------------------------------------------------------
51
52HXXDEPNLST= $(INC)$/vcl$/accel.hxx       \
53            $(INC)$/vcl$/animate.hxx     \
54            $(INC)$/vcl$/apptypes.hxx    \
55            $(INC)$/vcl$/bitmap.hxx      \
56            $(INC)$/vcl$/bitmapex.hxx    \
57            $(INC)$/vcl$/bmpacc.hxx      \
58            $(INC)$/vcl$/btndlg.hxx      \
59            $(INC)$/vcl$/button.hxx      \
60            $(INC)$/vcl$/ctrl.hxx        \
61            $(INC)$/vcl$/cursor.hxx      \
62            $(INC)$/vcl$/cmdevt.hxx      \
63            $(INC)$/vcl$/decoview.hxx    \
64            $(INC)$/vcl$/dialog.hxx      \
65            $(INC)$/vcl$/dllapi.h        \
66            $(INC)$/vcl$/dockwin.hxx     \
67            $(INC)$/vcl$/edit.hxx        \
68            $(INC)$/vcl$/event.hxx       \
69            $(INC)$/vcl$/field.hxx       \
70            $(INC)$/vcl$/fixed.hxx       \
71            $(INC)$/vcl$/floatwin.hxx    \
72            $(INC)$/vcl$/font.hxx        \
73            $(INC)$/vcl$/floatwin.hxx    \
74            $(INC)$/vcl$/graph.hxx       \
75            $(INC)$/vcl$/group.hxx       \
76            $(INC)$/vcl$/help.hxx        \
77            $(INC)$/vcl$/jobset.hxx      \
78            $(INC)$/vcl$/keycodes.hxx    \
79            $(INC)$/vcl$/keycod.hxx      \
80            $(INC)$/vcl$/image.hxx       \
81            $(INC)$/vcl$/lstbox.h             \
82            $(INC)$/vcl$/lstbox.hxx      \
83            $(INC)$/vcl$/mapmod.hxx      \
84            $(INC)$/vcl$/metaact.hxx     \
85            $(INC)$/vcl$/menu.hxx        \
86            $(INC)$/vcl$/menubtn.hxx     \
87            $(INC)$/vcl$/metric.hxx      \
88            $(INC)$/vcl$/morebtn.hxx     \
89            $(INC)$/vcl$/msgbox.hxx      \
90            $(INC)$/vcl$/octree.hxx      \
91            $(INC)$/vcl$/outdev.hxx      \
92            $(INC)$/vcl$/pointr.hxx      \
93            $(INC)$/vcl$/ptrstyle.hxx    \
94            $(INC)$/vcl$/prntypes.hxx    \
95            $(INC)$/vcl$/print.hxx       \
96            $(INC)$/vcl$/prndlg.hxx      \
97            $(INC)$/vcl$/region.hxx      \
98            $(INC)$/vcl$/salbtype.hxx    \
99            $(INC)$/vcl$/scrbar.hxx      \
100            $(INC)$/vcl$/slider.hxx      \
101            $(INC)$/vcl$/seleng.hxx      \
102            $(INC)$/vcl$/settings.hxx    \
103            $(INC)$/vcl$/sound.hxx       \
104            $(INC)$/vcl$/sndstyle.hxx    \
105            $(INC)$/vcl$/split.hxx       \
106            $(INC)$/vcl$/splitwin.hxx    \
107            $(INC)$/vcl$/spin.hxx        \
108            $(INC)$/vcl$/spinfld.hxx     \
109            $(INC)$/vcl$/status.hxx      \
110            $(INC)$/vcl$/stdtext.hxx     \
111            $(INC)$/vcl$/sv.h            \
112            $(INC)$/vcl$/svapp.hxx       \
113            $(INC)$/vcl$/syschild.hxx    \
114            $(INC)$/vcl$/sysdata.hxx     \
115            $(INC)$/vcl$/syswin.hxx      \
116            $(INC)$/vcl$/tabctrl.hxx     \
117            $(INC)$/vcl$/tabdlg.hxx      \
118            $(INC)$/vcl$/tabpage.hxx     \
119            $(INC)$/vcl$/toolbox.hxx     \
120            $(INC)$/vcl$/timer.hxx       \
121            $(INC)$/vcl$/virdev.hxx      \
122            $(INC)$/vcl$/wall.hxx        \
123            $(INC)$/vcl$/waitobj.hxx     \
124            $(INC)$/vcl$/window.hxx      \
125            $(INC)$/vcl$/wrkwin.hxx
126
127.IF "$(linkinc)" != ""
128SHL11FILE=  $(MISC)$/app.slo
129SHL12FILE=  $(MISC)$/gdi.slo
130SHL13FILE=  $(MISC)$/win.slo
131SHL14FILE=  $(MISC)$/ctrl.slo
132#SHL15FILE=  $(MISC)$/ex.slo
133SHL16FILE=  $(MISC)$/salapp.slo
134SHL17FILE=  $(MISC)$/salwin.slo
135SHL18FILE=  $(MISC)$/salgdi.slo
136.ENDIF
137
138LIB1TARGET= $(SLB)$/$(TARGET).lib
139LIB1FILES=  $(SLB)$/app.lib         \
140            $(SLB)$/gdi.lib         \
141            $(SLB)$/win.lib         \
142            $(SLB)$/ctrl.lib        \
143            $(SLB)$/helper.lib	    \
144            $(SLB)$/fontsubset.lib  \
145            $(SLB)$/components.lib
146
147.IF "$(GUI)" == "UNX" && "$(GUIBASE)"!="aqua"
148LIB1FILES+= $(SLB)$/salplug.lib  \
149            $(SLB)$/fontman.lib  \
150            $(SLB)$/printer.lib
151.ELSE
152LIB1FILES+= \
153            $(SLB)$/salwin.lib  \
154            $(SLB)$/salgdi.lib  \
155            $(SLB)$/salapp.lib
156.IF "$(GUIBASE)" == "aqua"
157LIB1FILES+= $(SLB)$/dtransaqua.lib
158.ENDIF
159.ENDIF
160
161SHL1TARGET= vcl$(DLLPOSTFIX)
162SHL1IMPLIB= ivcl
163SHL1STDLIBS+=\
164            $(SOTLIB)           \
165            $(UNOTOOLSLIB)      \
166            $(TOOLSLIB)         \
167            $(I18NPAPERLIB)     \
168            $(I18NISOLANGLIB)   \
169            $(I18NUTILLIB)      \
170            $(COMPHELPERLIB)	\
171            $(UCBHELPERLIB)     \
172            $(CPPUHELPERLIB)    \
173            $(CPPULIB)          \
174            $(VOSLIB)           \
175            $(SALLIB)			\
176            $(BASEGFXLIB)		\
177            $(ICUUCLIB)			\
178			$(ICUDATALIB)		\
179            $(ICULELIB)			\
180			$(JVMACCESSLIB)
181
182.IF "$(GUI)" == "UNX"
183.IF "$(ENABLE_GRAPHITE)" != ""
184.IF "$(SYSTEM_GRAPHITE)" == "YES"
185SHL1STDLIBS+= $(GRAPHITE_LIBS)
186.ELSE
187SHL1STDLIBS+= $(SOLARVERSION)/$(INPATH)/lib$(UPDMINOREXT)/libgraphite.a
188.ENDIF
189.ENDIF
190.ENDIF
191SHL1USE_EXPORTS=name
192
193.IF "$(GUIBASE)"=="aqua"
194SHL1STDLIBS+= \
195	$(BASEBMPLIB) \
196	-lAppleRemote$(DLLPOSTFIX)
197
198# the QuickTime API has been removed in OSX SDK 10.7
199.IF "${MACOSX_DEPLOYMENT_TARGET:s/.//}"<"107"
200SHL1STDLIBS+= -framework QuickTime
201.ENDIF
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