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