1 ################################################################################
3 # Qt Embedded for Linux
5 # This makefile was originally composed by Thomas Lundquist <thomasez@zelow.no>
6 # Later heavily modified by buildroot developers
8 # BTW, this uses alot of FPU calls and it's pretty slow if you use
9 # the kernels FPU emulation so it's better to choose soft float in the
10 # buildroot config (and uClibc.config of course, if you have your own.)
12 ################################################################################
14 QT_VERSION_MAJOR
= 4.8
15 QT_VERSION
= $(QT_VERSION_MAJOR
).7
16 QT_SOURCE
= qt-everywhere-opensource-src-
$(QT_VERSION
).
tar.gz
17 QT_SITE
= http
://download.qt-project.org
/official_releases
/qt
/$(QT_VERSION_MAJOR
)/$(QT_VERSION
)
18 QT_DEPENDENCIES
= host-pkgconf
19 QT_INSTALL_STAGING
= YES
21 QT_LICENSE
= LGPLv2.1 with exceptions or GPLv3
22 ifneq ($(BR2_PACKAGE_QT_LICENSE_APPROVED
),y
)
23 QT_LICENSE
+= or Digia Qt Commercial license
25 QT_LICENSE_FILES
= LICENSE.LGPL LGPL_EXCEPTION.txt LICENSE.GPL3
27 ifeq ($(BR2_PACKAGE_QT_LICENSE_APPROVED
),y
)
28 QT_CONFIGURE_OPTS
+= -opensource
-confirm-license
31 QT_CONFIG_FILE
= $(call qstrip
,$(BR2_PACKAGE_QT_CONFIG_FILE
))
33 ifneq ($(QT_CONFIG_FILE
),)
34 QT_CONFIGURE_OPTS
+= -qconfig buildroot
37 QT_CFLAGS
= $(TARGET_CFLAGS
)
38 QT_CXXFLAGS
= $(TARGET_CXXFLAGS
)
39 QT_LDFLAGS
= $(TARGET_LDFLAGS
)
41 # Qt has some assembly function that are not present in thumb1 mode:
42 # Error: selected processor does not support Thumb mode `swp r3,r7,[r4]'
43 # so, we desactivate thumb mode
44 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB
),y
)
49 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT
),y
)
50 QT_CONFIGURE_OPTS
+= -qt3support
52 QT_CONFIGURE_OPTS
+= -no-qt3support
55 ifeq ($(BR2_PACKAGE_QT_DEMOS
),y
)
56 QT_CONFIGURE_OPTS
+= -demosdir
$(TARGET_DIR
)/usr
/share
/qt
/demos
58 QT_CONFIGURE_OPTS
+= -nomake demos
60 ifeq ($(BR2_PACKAGE_QT_EXAMPLES
),y
)
61 QT_CONFIGURE_OPTS
+= -examplesdir
$(TARGET_DIR
)/usr
/share
/qt
/examples
63 QT_CONFIGURE_OPTS
+= -nomake examples
66 # ensure glib is built first if enabled for Qt's glib support
67 ifeq ($(BR2_PACKAGE_LIBGLIB2
),y
)
68 QT_CONFIGURE_OPTS
+= -glib
69 QT_DEPENDENCIES
+= libglib2
71 QT_CONFIGURE_OPTS
+= -no-glib
76 QT_PIXEL_DEPTHS
= # empty
77 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_1
),y
)
80 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_4
),y
)
83 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_8
),y
)
86 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_12
),y
)
89 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_15
),y
)
92 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_16
),y
)
95 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_18
),y
)
98 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_24
),y
)
101 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_32
),y
)
102 QT_PIXEL_DEPTHS
+= 32
104 ifneq ($(QT_PIXEL_DEPTHS
),)
105 QT_CONFIGURE_OPTS
+= -depths
$(subst $(space
),$(comma
),$(strip $(QT_PIXEL_DEPTHS
)))
109 ifeq ($(BR2_PACKAGE_QT_GFX_LINUXFB
),y
)
110 QT_CONFIGURE_OPTS
+= -qt-gfx-linuxfb
112 QT_CONFIGURE_OPTS
+= -no-gfx-linuxfb
114 ifeq ($(BR2_PACKAGE_QT_GFX_TRANSFORMED
),y
)
115 QT_CONFIGURE_OPTS
+= -qt-gfx-transformed
117 QT_CONFIGURE_OPTS
+= -no-gfx-transformed
119 ifeq ($(BR2_PACKAGE_QT_GFX_QVFB
),y
)
120 QT_CONFIGURE_OPTS
+= -qt-gfx-qvfb
122 QT_CONFIGURE_OPTS
+= -no-gfx-qvfb
124 ifeq ($(BR2_PACKAGE_QT_GFX_VNC
),y
)
125 QT_CONFIGURE_OPTS
+= -qt-gfx-vnc
127 QT_CONFIGURE_OPTS
+= -no-gfx-vnc
129 ifeq ($(BR2_PACKAGE_QT_GFX_MULTISCREEN
),y
)
130 QT_CONFIGURE_OPTS
+= -qt-gfx-multiscreen
132 QT_CONFIGURE_OPTS
+= -no-gfx-multiscreen
134 ifeq ($(BR2_PACKAGE_QT_GFX_DIRECTFB
),y
)
135 QT_CONFIGURE_OPTS
+= -qt-gfx-directfb
136 QT_DEPENDENCIES
+= directfb
138 QT_CONFIGURE_OPTS
+= -no-gfx-directfb
140 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
141 QT_CONFIGURE_OPTS
+= \
142 -plugin-gfx-powervr
-D QT_NO_QWS_CURSOR
-D QT_QWS_CLIENTBLIT
143 QT_DEPENDENCIES
+= powervr
147 ifeq ($(BR2_PACKAGE_QT_MOUSE_PC
),y
)
148 QT_CONFIGURE_OPTS
+= -qt-mouse-pc
150 QT_CONFIGURE_OPTS
+= -no-mouse-pc
152 ifeq ($(BR2_PACKAGE_QT_MOUSE_LINUXTP
),y
)
153 QT_CONFIGURE_OPTS
+= -qt-mouse-linuxtp
155 QT_CONFIGURE_OPTS
+= -no-mouse-linuxtp
157 ifeq ($(BR2_PACKAGE_QT_MOUSE_LINUXINPUT
),y
)
158 QT_CONFIGURE_OPTS
+= -qt-mouse-linuxinput
160 QT_CONFIGURE_OPTS
+= -no-mouse-linuxinput
162 ifeq ($(BR2_PACKAGE_QT_MOUSE_TSLIB
),y
)
163 QT_CONFIGURE_OPTS
+= -qt-mouse-tslib
164 QT_DEPENDENCIES
+= tslib
166 QT_CONFIGURE_OPTS
+= -no-mouse-tslib
168 ifeq ($(BR2_PACKAGE_QT_MOUSE_QVFB
),y
)
169 QT_CONFIGURE_OPTS
+= -qt-mouse-qvfb
171 QT_CONFIGURE_OPTS
+= -no-mouse-qvfb
173 ifeq ($(BR2_PACKAGE_QT_MOUSE_NO_QWS_CURSOR
),y
)
174 QT_CONFIGURE_OPTS
+= -D QT_NO_QWS_CURSOR
178 ifeq ($(BR2_PACKAGE_QT_KEYBOARD_TTY
),y
)
179 QT_CONFIGURE_OPTS
+= -qt-kbd-tty
181 QT_CONFIGURE_OPTS
+= -no-kbd-tty
183 ifeq ($(BR2_PACKAGE_QT_KEYBOARD_LINUXINPUT
),y
)
184 QT_CONFIGURE_OPTS
+= -qt-kbd-linuxinput
186 QT_CONFIGURE_OPTS
+= -no-kbd-linuxinput
188 ifeq ($(BR2_PACKAGE_QT_KEYBOARD_QVFB
),y
)
189 QT_CONFIGURE_OPTS
+= -qt-kbd-qvfb
191 QT_CONFIGURE_OPTS
+= -no-kbd-qvfb
194 ifeq ($(BR2_PACKAGE_QT_DEBUG
),y
)
195 QT_CONFIGURE_OPTS
+= -debug
197 QT_CONFIGURE_OPTS
+= -release
200 ifeq ($(BR2_PACKAGE_QT_SHARED
),y
)
201 QT_CONFIGURE_OPTS
+= -shared
203 QT_CONFIGURE_OPTS
+= -static
206 ifeq ($(BR2_ENDIAN
),"LITTLE")
207 QT_CONFIGURE_OPTS
+= -little-endian
209 QT_CONFIGURE_OPTS
+= -big-endian
212 ifeq ($(BR2_arm
)$(BR2_armeb
),y
)
213 QT_EMB_PLATFORM
= arm
214 else ifeq ($(BR2_i386
),y
)
215 QT_EMB_PLATFORM
= x86
216 else ifeq ($(BR2_x86_64
),y
)
217 QT_EMB_PLATFORM
= x86_64
218 else ifeq ($(BR2_mips
)$(BR2_mipsel
),y
)
219 QT_EMB_PLATFORM
= mips
220 else ifeq ($(BR2_powerpc
),y
)
221 QT_EMB_PLATFORM
= powerpc
222 else ifeq ($(BR2_sh4
)$(BR2_sh4eb
)$(BR2_sh4a
)$(BR2_sh4aeb
),y
)
225 QT_EMB_PLATFORM
= generic
228 ifeq ($(BR2_PACKAGE_QT_X11
),y
)
229 QT_DEPENDENCIES
+= fontconfig xlib_libXi xlib_libX11 xlib_libXrender \
230 xlib_libXcursor xlib_libXrandr xlib_libXext xlib_libXv
231 # Using pkg-config avoids us some logic to redefine and sed again mkspecs files
232 # to add X11 include path and link options
233 QT_CFLAGS
+= $(shell $(PKG_CONFIG_HOST_BINARY
) --cflags x11
)
234 QT_CXXFLAGS
+= $(shell $(PKG_CONFIG_HOST_BINARY
) --cflags x11
)
235 QT_LDFLAGS
+= $(shell $(PKG_CONFIG_HOST_BINARY
) --libs x11 xext
)
236 QT_CONFIGURE_OPTS
+= -arch
$(QT_EMB_PLATFORM
) \
237 -xplatform qws
/linux-
$(QT_EMB_PLATFORM
)-g
++ -x11
-no-gtkstyle
-no-sm \
239 else # if BR2_PACKAGE_QT_EMBEDDED
240 QT_CONFIGURE_OPTS
+= -embedded
$(QT_EMB_PLATFORM
)
243 ifneq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
244 QT_CONFIGURE_OPTS
+= -no-gui
247 ifneq ($(BR2_PACKAGE_QT_GIF
),y
)
248 QT_CONFIGURE_OPTS
+= -no-gif
251 ifeq ($(BR2_PACKAGE_QT_LIBMNG
),y
)
252 QT_CONFIGURE_OPTS
+= -qt-libmng
254 QT_CONFIGURE_OPTS
+= -no-libmng
257 ifeq ($(BR2_PACKAGE_QT_QTZLIB
),y
)
258 QT_CONFIGURE_OPTS
+= -qt-zlib
260 ifeq ($(BR2_PACKAGE_QT_SYSTEMZLIB
),y
)
261 QT_CONFIGURE_OPTS
+= -system-zlib
262 QT_DEPENDENCIES
+= zlib
266 ifeq ($(BR2_PACKAGE_QT_QTJPEG
),y
)
267 QT_CONFIGURE_OPTS
+= -qt-libjpeg
269 ifeq ($(BR2_PACKAGE_QT_SYSTEMJPEG
),y
)
270 QT_CONFIGURE_OPTS
+= -system-libjpeg
271 QT_DEPENDENCIES
+= jpeg
273 QT_CONFIGURE_OPTS
+= -no-libjpeg
277 ifeq ($(BR2_PACKAGE_QT_QTPNG
),y
)
278 QT_CONFIGURE_OPTS
+= -qt-libpng
280 ifeq ($(BR2_PACKAGE_QT_SYSTEMPNG
),y
)
281 QT_CONFIGURE_OPTS
+= -system-libpng
282 QT_DEPENDENCIES
+= libpng
284 QT_CONFIGURE_OPTS
+= -no-libpng
288 ifeq ($(BR2_PACKAGE_QT_QTTIFF
),y
)
289 QT_CONFIGURE_OPTS
+= -qt-libtiff
291 ifeq ($(BR2_PACKAGE_QT_SYSTEMTIFF
),y
)
292 QT_CONFIGURE_OPTS
+= -system-libtiff
293 QT_DEPENDENCIES
+= tiff
295 QT_CONFIGURE_OPTS
+= -no-libtiff
299 QT_FONTS
= $(addprefix $(STAGING_DIR
)/usr
/lib
/fonts
/, $(addsuffix *.qpf
, \
300 $(if
$(BR2_PACKAGE_QT_FONT_MICRO
),micro
) \
301 $(if
$(BR2_PACKAGE_QT_FONT_FIXED
),fixed
) \
302 $(if
$(BR2_PACKAGE_QT_FONT_HELVETICA
),helvetica
) \
303 $(if
$(BR2_PACKAGE_QT_FONT_JAPANESE
),japanese
) \
304 $(if
$(BR2_PACKAGE_QT_FONT_UNIFONT
),unifont
)))
306 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
),y
)
307 QT_CONFIGURE_OPTS
+= -qt-freetype
309 ifeq ($(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
310 QT_CONFIGURE_OPTS
+= -system-freetype
311 QT_CONFIGURE_OPTS
+= -I
$(STAGING_DIR
)/usr
/include/freetype2
/
312 QT_DEPENDENCIES
+= freetype
314 QT_CONFIGURE_OPTS
+= -no-freetype
318 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
319 QT_DEPENDENCIES
+= dbus
322 ifeq ($(BR2_PACKAGE_QT_OPENSSL
),y
)
323 QT_CONFIGURE_OPTS
+= -openssl
324 QT_DEPENDENCIES
+= openssl
326 QT_CONFIGURE_OPTS
+= -no-openssl
329 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
330 QT_CONFIGURE_OPTS
+= -opengl es2
-egl
331 QT_DEPENDENCIES
+= libgles libegl
332 QT_CFLAGS
+= $(shell $(PKG_CONFIG_HOST_BINARY
) --cflags egl
)
333 QT_CXXFLAGS
+= $(shell $(PKG_CONFIG_HOST_BINARY
) --cflags egl
)
334 QT_LDFLAGS
+= $(shell $(PKG_CONFIG_HOST_BINARY
) --libs egl
)
336 QT_CONFIGURE_OPTS
+= -no-opengl
340 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
341 ifeq ($(BR2_PACKAGE_QT_IBASE
),y
)
342 QT_CONFIGURE_OPTS
+= -qt-sql-ibase
344 ifeq ($(BR2_PACKAGE_QT_MYSQL
),y
)
345 QT_CONFIGURE_OPTS
+= -qt-sql-mysql
-mysql_config
$(STAGING_DIR
)/usr
/bin
/mysql_config
346 QT_DEPENDENCIES
+= mysql
348 ifeq ($(BR2_PACKAGE_QT_ODBC
),y
)
349 QT_CONFIGURE_OPTS
+= -qt-sql-odbc
350 QT_DEPENDENCIES
+= unixodbc
352 ifeq ($(BR2_PACKAGE_QT_PSQL
),y
)
353 QT_CONFIGURE_OPTS
+= -qt-sql-psql
-psql_config
$(STAGING_DIR
)/usr
/bin
/pg_config
354 QT_DEPENDENCIES
+= postgresql
356 ifeq ($(BR2_PACKAGE_QT_SQLITE_QT
),y
)
357 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite
359 ifeq ($(BR2_PACKAGE_QT_SQLITE_SYSTEM
),y
)
360 QT_CONFIGURE_OPTS
+= -system-sqlite
361 QT_DEPENDENCIES
+= sqlite
363 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
366 ifeq ($(BR2_PACKAGE_QT_SQLITE2
),y
)
367 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite2
370 # By default, no SQL driver is turned on by configure.
371 # but it seems sqlite isn't disabled despite what says
373 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
376 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
377 QT_CONFIGURE_OPTS
+= -xmlpatterns
-exceptions
379 QT_CONFIGURE_OPTS
+= -no-xmlpatterns
382 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
383 QT_CONFIGURE_OPTS
+= -multimedia
385 QT_CONFIGURE_OPTS
+= -no-multimedia
388 ifeq ($(BR2_PACKAGE_QT_AUDIO_BACKEND
),y
)
389 QT_CONFIGURE_OPTS
+= -audio-backend
390 QT_DEPENDENCIES
+= alsa-lib
392 QT_CONFIGURE_OPTS
+= -no-audio-backend
395 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
396 QT_CONFIGURE_OPTS
+= -phonon
397 QT_DEPENDENCIES
+= gstreamer gst-plugins-base
399 QT_CONFIGURE_OPTS
+= -no-phonon
402 ifeq ($(BR2_PACKAGE_QT_PHONON_BACKEND
),y
)
403 QT_CONFIGURE_OPTS
+= -phonon-backend
405 QT_CONFIGURE_OPTS
+= -no-phonon-backend
408 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
409 QT_CONFIGURE_OPTS
+= -svg
411 QT_CONFIGURE_OPTS
+= -no-svg
414 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
415 QT_CONFIGURE_OPTS
+= -webkit
417 QT_CONFIGURE_OPTS
+= -no-webkit
420 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
421 QT_CONFIGURE_OPTS
+= -script
423 QT_CONFIGURE_OPTS
+= -no-script
426 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
427 QT_CONFIGURE_OPTS
+= -scripttools
429 QT_CONFIGURE_OPTS
+= -no-scripttools
432 ifeq ($(BR2_PACKAGE_QT_STL
),y
)
433 QT_CONFIGURE_OPTS
+= -stl
435 QT_CONFIGURE_OPTS
+= -no-stl
438 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
439 QT_CONFIGURE_OPTS
+= -declarative
441 QT_CONFIGURE_OPTS
+= -no-declarative
444 # -no-pch is needed to workaround the issue described at
445 # http://comments.gmane.org/gmane.comp.lib.qt.devel/5933.
446 # In addition, ccache and precompiled headers don't play well together
447 QT_CONFIGURE_OPTS
+= -no-pch
450 # Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux
451 # host. It's unclear if this would happen on other hosts.
452 ifneq ($(findstring linux
,$(GNU_HOST_NAME
)),)
453 ifneq ($(findstring x86
,$(QT_EMB_PLATFORM
)),)
454 QT_CONFIGURE_OPTS
+= -platform linux-g
++
459 # Variable for other Qt applications to use
460 QT_QMAKE
= $(HOST_DIR
)/usr
/bin
/qmake
-spec qws
/linux-
$(QT_EMB_PLATFORM
)-g
++
462 ################################################################################
463 # QT_QMAKE_SET -- helper macro to set <variable> = <value> in
464 # the qmake.conf file. Will remove existing variable declaration if
467 # Argument 1 is the variable name
468 # Argument 2 is the value to set variable to
469 # Argument 3 is the base source directory of Qt
471 # E.G. use like this:
472 # $(call QT_QMAKE_SET,variable,value,directory)
473 ################################################################################
475 $(SED
) '/$(1)/d' $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
476 $(SED
) '/include.*qws.conf/a$(1) = $(2)' $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
479 ifneq ($(QT_CONFIG_FILE
),)
480 define QT_CONFIGURE_CONFIG_FILE
481 cp
$(QT_CONFIG_FILE
) $(@D
)/src
/corelib
/global
/qconfig-buildroot.h
485 define QT_CONFIGURE_CMDS
486 -[ -f
$(@D
)/Makefile
] && $(MAKE
) -C
$(@D
) confclean
488 $(QT_CONFIGURE_CONFIG_FILE
)
490 $(call QT_QMAKE_SET
,QMAKE_CC
,$(TARGET_CC
),$(@D
))
491 $(call QT_QMAKE_SET
,QMAKE_CXX
,$(TARGET_CXX
),$(@D
))
492 $(call QT_QMAKE_SET
,QMAKE_LINK
,$(TARGET_CXX
),$(@D
))
493 $(call QT_QMAKE_SET
,QMAKE_LINK_SHLIB
,$(TARGET_CXX
),$(@D
))
494 $(call QT_QMAKE_SET
,QMAKE_AR
,$(TARGET_AR
) cqs
,$(@D
))
495 $(call QT_QMAKE_SET
,QMAKE_OBJCOPY
,$(TARGET_OBJCOPY
),$(@D
))
496 $(call QT_QMAKE_SET
,QMAKE_RANLIB
,$(TARGET_RANLIB
),$(@D
))
497 $(call QT_QMAKE_SET
,QMAKE_STRIP
,$(TARGET_STRIP
),$(@D
))
498 $(call QT_QMAKE_SET
,QMAKE_CFLAGS
,$(QT_CFLAGS
),$(@D
))
499 $(call QT_QMAKE_SET
,QMAKE_CXXFLAGS
,$(QT_CXXFLAGS
),$(@D
))
500 $(call QT_QMAKE_SET
,QMAKE_LFLAGS
,$(QT_LDFLAGS
),$(@D
))
501 $(call QT_QMAKE_SET
,PKG_CONFIG
,$(HOST_DIR
)/usr
/bin
/pkg-config
,$(@D
))
502 # Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target
503 # instead of the host then. So set PKG_CONFIG* manually.
505 PKG_CONFIG_SYSROOT_DIR
="$(STAGING_DIR)" \
506 PKG_CONFIG
="$(PKG_CONFIG_HOST_BINARY)" \
507 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
508 $(QT_CONFIGURE_ENV
) \
509 MAKEFLAGS
="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" .
/configure \
510 $(if
$(VERBOSE
),-verbose
,-silent
) \
512 $(QT_CONFIGURE_OPTS
) \
517 -no-separate-debug-info \
519 -plugindir
/usr
/lib
/qt
/plugins \
520 -importdir
/usr
/lib
/qt
/imports \
521 -translationdir
/usr
/share
/qt
/translations \
522 -hostprefix
$(STAGING_DIR
) \
529 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
533 # Build the list of libraries and plugins to install to the target
535 QT_INSTALL_LIBS
+= QtCore
536 QT_HOST_PROGRAMS
+= moc rcc qmake lrelease
538 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
539 QT_INSTALL_LIBS
+= QtGui
540 QT_HOST_PROGRAMS
+= uic
542 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
543 QT_INSTALL_LIBS
+= QtSql
545 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
546 QT_INSTALL_LIBS
+= QtMultimedia
548 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
549 QT_INSTALL_LIBS
+= phonon
551 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
552 QT_INSTALL_LIBS
+= QtSvg
554 ifeq ($(BR2_PACKAGE_QT_NETWORK
),y
)
555 QT_INSTALL_LIBS
+= QtNetwork
557 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
558 QT_INSTALL_LIBS
+= QtWebKit
560 ifeq ($(BR2_PACKAGE_QT_XML
),y
)
561 QT_INSTALL_LIBS
+= QtXml
563 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
564 QT_INSTALL_LIBS
+= QtDBus
566 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
567 QT_INSTALL_LIBS
+= QtXmlPatterns
569 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
570 QT_INSTALL_LIBS
+= QtScript
572 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
573 QT_INSTALL_LIBS
+= QtScriptTools
575 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
576 QT_INSTALL_LIBS
+= QtDeclarative
578 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT
),y
)
579 QT_INSTALL_LIBS
+= Qt3Support
581 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
582 QT_INSTALL_LIBS
+= QtOpenGL
584 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
585 QT_INSTALL_LIBS
+= pvrQWSWSEGL
587 ifeq ($(BR2_PACKAGE_QT_TEST
),y
)
588 QT_INSTALL_LIBS
+= QtTest
591 QT_CONF_FILE
= $(HOST_DIR
)/usr
/bin
/qt.conf
593 # Since host programs and spec files have been moved to $(HOST_DIR),
594 # we need to tell qmake the new location of the various elements,
595 # through a qt.conf file.
596 define QT_INSTALL_QT_CONF
597 mkdir
-p
$(dir $(QT_CONF_FILE
))
598 echo
"[Paths]" > $(QT_CONF_FILE
)
599 echo
"Prefix=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
600 echo
"Headers=$(STAGING_DIR)/usr/include" >> $(QT_CONF_FILE
)
601 echo
"Libraries=$(STAGING_DIR)/usr/lib" >> $(QT_CONF_FILE
)
602 echo
"Data=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
603 echo
"Binaries=$(HOST_DIR)/usr/bin" >> $(QT_CONF_FILE
)
606 # After running Qt normal installation process (which installs
607 # everything in the STAGING_DIR), we move host programs such as qmake,
608 # rcc or uic to the HOST_DIR so that they are available at the usual
609 # location. A qt.conf file is generated to make sure that all host
610 # programs still find all files they need. The .pc files are tuned to
611 # remove the sysroot path from them, since pkg-config already adds it
613 define QT_INSTALL_STAGING_CMDS
614 $(MAKE
) -C
$(@D
) install
615 mkdir
-p
$(HOST_DIR
)/usr
/bin
616 mv
$(addprefix $(STAGING_DIR
)/usr
/bin
/,$(QT_HOST_PROGRAMS
)) $(HOST_DIR
)/usr
/bin
617 ln
-sf
$(STAGING_DIR
)/usr
/mkspecs
$(HOST_DIR
)/usr
/mkspecs
618 $(QT_INSTALL_QT_CONF
)
619 for i in moc uic rcc lupdate lrelease
; do \
620 $(SED
) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \
621 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc ; \
623 $(SED
) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc
626 # Library installation
627 ifeq ($(BR2_PACKAGE_QT_SHARED
),y
)
628 define QT_INSTALL_TARGET_LIBS
629 mkdir
-p
$(TARGET_DIR
)/usr
/lib
630 for lib in
$(QT_INSTALL_LIBS
); do \
631 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/lib
$${lib}.so.
* $(TARGET_DIR
)/usr
/lib
; \
636 # Plugin installation
637 define QT_INSTALL_TARGET_PLUGINS
638 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/ ] ; then \
639 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
640 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/* $(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
644 # Import installation
645 define QT_INSTALL_TARGET_IMPORTS
646 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/ ] ; then \
647 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
648 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/* $(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
653 ifeq ($(BR2_PACKAGE_QT_EMBEDDED
),y
)
655 define QT_INSTALL_TARGET_FONTS
656 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
657 cp
-dpf
$(QT_FONTS
) $(TARGET_DIR
)/usr
/lib
/fonts
661 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
)$(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
662 define QT_INSTALL_TARGET_FONTS_TTF
663 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
664 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/fonts
/*.ttf
$(TARGET_DIR
)/usr
/lib
/fonts
667 endif # BR2_PACKAGE_QT_EMBEDDED
669 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
670 define QT_INSTALL_TARGET_POWERVR
671 # Note: this overwrites the default powervr.ini provided by the ti-gfx
673 $(INSTALL
) -D
-m
0644 package
/qt
/powervr.ini \
674 $(TARGET_DIR
)/etc
/powervr.ini
678 ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES
),y
)
679 define QT_INSTALL_TARGET_TRANSLATIONS
680 if
[ -d
$(STAGING_DIR
)/usr
/share
/qt
/translations
/ ] ; then \
681 mkdir
-p
$(TARGET_DIR
)/usr
/share
/qt
/translations
; \
682 cp
-dpfr
$(STAGING_DIR
)/usr
/share
/qt
/translations
/* $(TARGET_DIR
)/usr
/share
/qt
/translations
; \
687 define QT_INSTALL_TARGET_CMDS
688 $(QT_INSTALL_TARGET_LIBS
)
689 $(QT_INSTALL_TARGET_PLUGINS
)
690 $(QT_INSTALL_TARGET_IMPORTS
)
691 $(QT_INSTALL_TARGET_FONTS
)
692 $(QT_INSTALL_TARGET_FONTS_TTF
)
693 $(QT_INSTALL_TARGET_POWERVR
)
694 $(QT_INSTALL_TARGET_TRANSLATIONS
)
697 $(eval
$(generic-package
))