xref: /aoo41x/main/vcl/util/makefile.mk (revision 7871dc3e)
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    -framework QuickTime
198
199LIB1FILES+= \
200            $(SLB)$/sala11y.lib
201.ENDIF
202
203.IF "$(USE_BUILTIN_RASTERIZER)"!=""
204    LIB1FILES +=    $(SLB)$/glyphs.lib
205    SHL1STDLIBS+=   $(FREETYPELIB)
206.ELSE
207.IF "$(ENABLE_GRAPHITE)" == "TRUE"
208    LIB1FILES +=    $(SLB)$/glyphs.lib
209.ENDIF
210.ENDIF # USE_BUILTIN_RASTERIZER
211
212SHL1LIBS=   $(LIB1TARGET)
213.IF "$(GUI)"!="UNX"
214.IF "$(COM)"!="GCC"
215#SHL1OBJS=   $(SLO)$/salshl.obj
216.ENDIF
217.ENDIF
218
219.IF "$(GUI)" != "UNX"
220SHL1RES=    $(RES)$/salsrc.res
221.ENDIF
222
223SHL1DEF=    $(MISC)$/$(SHL1TARGET).def
224
225DEF1NAME    =$(SHL1TARGET)
226DEF1DEPN    =   $(HXXDEPNLST) \
227                $(LIB1TARGET)
228DEF1DES     =VCL
229DEFLIB1NAME =vcl
230
231# --- W32 ----------------------------------------------------------------
232
233.IF "$(GUI)" == "WNT"
234
235.IF "$(ENABLE_GRAPHITE)" == "TRUE"
236.IF "$(COM)" == "GCC"
237SHL1STDLIBS += -lgraphite
238.ELSE
239SHL1STDLIBS += graphite_dll.lib
240.ENDIF
241.ENDIF
242
243SHL1STDLIBS += $(UWINAPILIB)      \
244               $(GDI32LIB)        \
245			   $(GDIPLUSLIB)	  \
246               $(MSIMG32LIB)      \
247               $(WINSPOOLLIB)     \
248               $(OLE32LIB)        \
249               $(SHELL32LIB)      \
250               $(ADVAPI32LIB)
251
252SHL1STDLIBS += $(IMM32LIB)
253
254.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
255LINKFLAGSSHL += /ENTRY:LibMain@12
256.ENDIF
257.ENDIF
258
259# --- OS2 ----------------------------------------------------------------
260
261.IF "$(GUI)" == "OS2"
262STDSHL1 += ft2lib.lib
263.ENDIF
264
265# --- UNX ----------------------------------------------------------------
266
267# UNX sal plugins
268.IF "$(GUI)" == "UNX" && "$(GUIBASE)" != "aqua"
269
270# desktop detector
271LIB7TARGET=$(SLB)$/idet
272LIB7FILES=$(SLB)$/dtdetect.lib
273SHL7TARGET=desktop_detector$(DLLPOSTFIX)
274SHL7STDLIBS=\
275            $(SALLIB) \
276            $(X11LINK_DYNAMIC)
277SHL7IMPLIB=idet
278SHL7LIBS=$(LIB7TARGET)
279
280# basic pure X11 plugin
281LIB2TARGET=$(SLB)$/ipure_x
282LIB2FILES= \
283            $(SLB)$/dtransX11.lib  \
284            $(SLB)$/printergfx.lib  \
285            $(SLB)$/salwin.lib  \
286            $(SLB)$/salgdi.lib  \
287            $(SLB)$/salapp.lib
288SHL2TARGET=vclplug_gen$(DLLPOSTFIX)
289SHL2IMPLIB=ipure_x
290SHL2LIBS=$(LIB2TARGET)
291SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN)
292
293# libs for generic plugin
294SHL2STDLIBS=\
295			$(VCLLIB)\
296            $(I18NPAPERLIB)     \
297            $(I18NISOLANGLIB)     \
298            $(TOOLSLIB)         \
299            $(VOSLIB)           \
300            $(BASEGFXLIB)	\
301            $(UNOTOOLSLIB) \
302            $(COMPHELPERLIB)	\
303            $(CPPUHELPERLIB) \
304            $(CPPULIB) \
305            $(SALLIB)
306
307# prepare linking of Xinerama
308.IF "$(USE_XINERAMA)" != "NO"
309
310.IF "$(OS)"=="MACOSX" || "$(OS)$(CPU)" == "LINUXX"
311XINERAMALIBS=-lXinerama
312.ELSE
313.IF "$(OS)" != "SOLARIS" || "$(USE_XINERAMA_VERSION)" == "Xorg"
314.IF "$(XINERAMA_LINK)" == "dynamic"
315XINERAMALIBS= -lXinerama
316.ELSE
317XINERAMALIBS= -Wl,-Bstatic -lXinerama -Wl,-Bdynamic
318.ENDIF # XINERAMA_LINK == dynamic
319.ENDIF # OS == SOLARIS
320.ENDIF # OS == MACOSX
321
322SHL2STDLIBS += $(XINERAMALIBS)
323.ENDIF # USE_XINERAMA != NO
324
325.IF "$(XRENDER_LINK)" == "YES"
326SHL2STDLIBS+=`pkg-config --libs xrender`
327.ENDIF
328
329.IF "$(GUIBASE)"=="unx"
330
331SHL2STDLIBS += -lXext -lSM -lICE -lX11
332.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD"
333# needed by salprnpsp.cxx
334SHL2STDLIBS+= -ldl
335.ENDIF
336
337.IF "$(ENABLE_RANDR)" != ""
338.IF "$(XRANDR_DLOPEN)" == "FALSE"
339SHL2STDLIBS+= $(XRANDR_LIBS)
340.ENDIF
341.ENDIF
342
343.ENDIF          # "$(GUIBASE)"=="unx"
344
345# gtk plugin
346.IF "$(ENABLE_GTK)" != ""
347PKGCONFIG_MODULES=gtk+-2.0 gthread-2.0
348.IF "$(ENABLE_DBUS)" != ""
349PKGCONFIG_MODULES+= dbus-glib-1
350.ENDIF
351.INCLUDE: pkg_config.mk
352
353LIB4TARGET=$(SLB)$/igtk_plug_
354LIB4FILES=\
355			$(SLB)$/gtkapp.lib\
356			$(SLB)$/gtka11y.lib \
357			$(SLB)$/gtkgdi.lib\
358			$(SLB)$/gtkwin.lib
359
360SHL4TARGET=vclplug_gtk$(DLLPOSTFIX)
361SHL4IMPLIB=igtk_plug_
362SHL4LIBS=$(LIB4TARGET)
363SHL4DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN)
364# libs for gtk plugin
365SHL4STDLIBS+=$(PKGCONFIG_LIBS:s/ -lpangoxft-1.0//)
366# hack for faked SO environment
367.IF "$(PKGCONFIG_ROOT)"!=""
368SHL4SONAME+=-z nodefs
369SHL4NOCHECK=TRUE
370.ENDIF          # "$(PKGCONFIG_ROOT)"!=""
371
372
373SHL4STDLIBS+=-l$(SHL2TARGET)
374SHL4STDLIBS+=\
375            $(VCLLIB)		\
376            $(TOOLSLIB)         \
377            $(CPPUHELPERLIB)    \
378            $(CPPULIB)          \
379            $(VOSLIB)           \
380            $(SALLIB)           \
381            $(X11LINK_DYNAMIC)
382
383.IF "$(ENABLE_RANDR)" != ""
384.IF "$(XRANDR_DLOPEN)" == "FALSE"
385SHL4STDLIBS+= $(XRANDR_LIBS)
386.ENDIF
387.ENDIF
388
389.ENDIF # "$(ENABLE_GTK)" != ""
390
391# KDE plugin
392.IF "$(ENABLE_KDE)" != ""
393.IF "$(KDE_ROOT)"!=""
394EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib
395.IF "$(OS)$(CPU)" == "LINUXX"
396EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib64
397.ENDIF
398.ENDIF
399LIB5TARGET=$(SLB)$/ikde_plug_
400LIB5FILES=$(SLB)$/kdeplug.lib
401SHL5TARGET=vclplug_kde$(DLLPOSTFIX)
402SHL5IMPLIB=ikde_plug_
403SHL5LIBS=$(LIB5TARGET)
404SHL5DEPN=$(SHL2TARGETN)
405# libs for KDE plugin
406SHL5LINKFLAGS+=$(KDE_LIBS)
407SHL5STDLIBS+=-l$(SHL2TARGET)
408SHL5STDLIBS+=\
409        $(VCLLIB)       \
410        $(TOOLSLIB)     \
411        $(VOSLIB)       \
412        $(SALLIB)       \
413        $(X11LINK_DYNAMIC)
414
415.IF "$(ENABLE_RANDR)" != ""
416.IF "$(XRANDR_DLOPEN)" == "FALSE"
417SHL5STDLIBS+= $(XRANDR_LIBS)
418.ENDIF
419.ENDIF
420
421.ENDIF # "$(ENABLE_KDE)" != ""
422
423# KDE4 plugin
424.IF "$(ENABLE_KDE4)" != ""
425.IF "$(KDE4_ROOT)"!=""
426EXTRALIBPATHS+=-L$(KDE4_ROOT)$/lib
427.ENDIF
428LIB6TARGET=$(SLB)$/ikde4_plug_
429LIB6FILES=$(SLB)$/kde4plug.lib
430SHL6TARGET=vclplug_kde4$(DLLPOSTFIX)
431SHL6IMPLIB=ikde4_plug_
432SHL6LIBS=$(LIB6TARGET)
433SHL6DEPN=$(SHL2TARGETN)
434# libs for KDE4 plugin
435SHL6LINKFLAGS+=$(KDE4_LIBS)
436SHL6STDLIBS+=-l$(SHL2TARGET)
437SHL6STDLIBS+=\
438        $(VCLLIB)       \
439        $(PSPLIB)	\
440        $(TOOLSLIB)     \
441        $(VOSLIB)       \
442        $(SALLIB)   \
443        $(X11LINK_DYNAMIC)
444
445.IF "$(ENABLE_RANDR)" != ""
446.IF "$(XRANDR_DLOPEN)" == "FALSE"
447SHL6STDLIBS+= $(XRANDR_LIBS)
448.ENDIF
449.ENDIF
450
451.ENDIF # "$(ENABLE_KDE4)" != ""
452
453.ENDIF # UNX
454
455# --- Allgemein ----------------------------------------------------------
456
457.INCLUDE :  target.mk
458
459ALLTAR : $(MISC)/vcl.component
460
461.IF "$(OS)" == "MACOSX"
462my_platform = .macosx
463.ELIF "$(OS)" == "WNT"
464my_platform = .windows
465.END
466
467$(MISC)/vcl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
468        vcl.component
469    $(XSLTPROC) --nonet --stringparam uri \
470        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
471        $(SOLARENV)/bin/createcomponent.xslt vcl$(my_platform).component
472