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 # Patch fixing ALSA detection. Taken from Qt5, but applies fine to
20 QT_PATCH
= https
://github.com
/qtproject
/qtbase
/commit
/b8f98d956501dfa4ce03a137f15d404930a56066.patch
21 QT_DEPENDENCIES
= host-pkgconf
22 QT_INSTALL_STAGING
= YES
24 QT_LICENSE
:= LGPLv2.1 with exceptions or GPLv3
25 ifneq ($(BR2_PACKAGE_QT_LICENSE_APPROVED
),y
)
26 QT_LICENSE
:= $(QT_LICENSE
) or Digia Qt Commercial license
28 QT_LICENSE_FILES
= LICENSE.LGPL LGPL_EXCEPTION.txt LICENSE.GPL3
30 ifeq ($(BR2_PACKAGE_QT_LICENSE_APPROVED
),y
)
31 QT_CONFIGURE_OPTS
+= -opensource
-confirm-license
34 QT_CONFIG_FILE
= $(call qstrip
,$(BR2_PACKAGE_QT_CONFIG_FILE
))
36 ifneq ($(QT_CONFIG_FILE
),)
37 QT_CONFIGURE_OPTS
+= -qconfig buildroot
40 QT_CFLAGS
= $(TARGET_CFLAGS
)
41 QT_CXXFLAGS
= $(TARGET_CXXFLAGS
)
42 QT_LDFLAGS
= $(TARGET_LDFLAGS
)
44 # Qt WebKit build fails when gcc-6 is used for build, because
45 # 'std::auto_ptr' is deprecated starting from gcc 6.x. So, we have to
46 # use an older c++ standard to prevent build failure
47 QT_CXXFLAGS
+= -std
=gnu
++98
49 # Qt has some assembly function that are not present in thumb1 mode:
50 # Error: selected processor does not support Thumb mode `swp r3,r7,[r4]'
51 # so, we desactivate thumb mode
52 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB
),y
)
57 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT
),y
)
58 QT_CONFIGURE_OPTS
+= -qt3support
60 QT_CONFIGURE_OPTS
+= -no-qt3support
63 ifeq ($(BR2_PACKAGE_QT_DEMOS
),y
)
64 QT_CONFIGURE_OPTS
+= -demosdir
$(TARGET_DIR
)/usr
/share
/qt
/demos
66 QT_CONFIGURE_OPTS
+= -nomake demos
68 ifeq ($(BR2_PACKAGE_QT_EXAMPLES
),y
)
69 QT_CONFIGURE_OPTS
+= -examplesdir
$(TARGET_DIR
)/usr
/share
/qt
/examples
71 QT_CONFIGURE_OPTS
+= -nomake examples
74 # ensure glib is built first if enabled for Qt's glib support
75 ifeq ($(BR2_PACKAGE_LIBGLIB2
),y
)
76 QT_CONFIGURE_OPTS
+= -glib
77 QT_DEPENDENCIES
+= libglib2
79 QT_CONFIGURE_OPTS
+= -no-glib
84 QT_PIXEL_DEPTHS
= # empty
85 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_1
),y
)
88 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_4
),y
)
91 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_8
),y
)
94 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_12
),y
)
97 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_15
),y
)
100 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_16
),y
)
101 QT_PIXEL_DEPTHS
+= 16
103 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_18
),y
)
104 QT_PIXEL_DEPTHS
+= 18
106 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_24
),y
)
107 QT_PIXEL_DEPTHS
+= 24
109 ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_32
),y
)
110 QT_PIXEL_DEPTHS
+= 32
112 ifneq ($(QT_PIXEL_DEPTHS
),)
113 QT_CONFIGURE_OPTS
+= -depths
$(subst $(space
),$(comma
),$(strip $(QT_PIXEL_DEPTHS
)))
117 ifeq ($(BR2_PACKAGE_QT_GFX_LINUXFB
),y
)
118 QT_CONFIGURE_OPTS
+= -qt-gfx-linuxfb
120 QT_CONFIGURE_OPTS
+= -no-gfx-linuxfb
122 ifeq ($(BR2_PACKAGE_QT_GFX_TRANSFORMED
),y
)
123 QT_CONFIGURE_OPTS
+= -qt-gfx-transformed
125 QT_CONFIGURE_OPTS
+= -no-gfx-transformed
127 ifeq ($(BR2_PACKAGE_QT_GFX_QVFB
),y
)
128 QT_CONFIGURE_OPTS
+= -qt-gfx-qvfb
130 QT_CONFIGURE_OPTS
+= -no-gfx-qvfb
132 ifeq ($(BR2_PACKAGE_QT_GFX_VNC
),y
)
133 QT_CONFIGURE_OPTS
+= -qt-gfx-vnc
135 QT_CONFIGURE_OPTS
+= -no-gfx-vnc
137 ifeq ($(BR2_PACKAGE_QT_GFX_MULTISCREEN
),y
)
138 QT_CONFIGURE_OPTS
+= -qt-gfx-multiscreen
140 QT_CONFIGURE_OPTS
+= -no-gfx-multiscreen
142 ifeq ($(BR2_PACKAGE_QT_GFX_DIRECTFB
),y
)
143 QT_CONFIGURE_OPTS
+= -qt-gfx-directfb
144 QT_DEPENDENCIES
+= directfb
146 QT_CONFIGURE_OPTS
+= -no-gfx-directfb
148 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
149 QT_CONFIGURE_OPTS
+= \
150 -plugin-gfx-powervr
-D QT_NO_QWS_CURSOR
-D QT_QWS_CLIENTBLIT
151 QT_DEPENDENCIES
+= powervr
155 ifeq ($(BR2_PACKAGE_QT_MOUSE_PC
),y
)
156 QT_CONFIGURE_OPTS
+= -qt-mouse-pc
158 QT_CONFIGURE_OPTS
+= -no-mouse-pc
160 ifeq ($(BR2_PACKAGE_QT_MOUSE_LINUXTP
),y
)
161 QT_CONFIGURE_OPTS
+= -qt-mouse-linuxtp
163 QT_CONFIGURE_OPTS
+= -no-mouse-linuxtp
165 ifeq ($(BR2_PACKAGE_QT_MOUSE_LINUXINPUT
),y
)
166 QT_CONFIGURE_OPTS
+= -qt-mouse-linuxinput
168 QT_CONFIGURE_OPTS
+= -no-mouse-linuxinput
170 ifeq ($(BR2_PACKAGE_QT_MOUSE_TSLIB
),y
)
171 QT_CONFIGURE_OPTS
+= -qt-mouse-tslib
172 QT_DEPENDENCIES
+= tslib
174 QT_CONFIGURE_OPTS
+= -no-mouse-tslib
176 ifeq ($(BR2_PACKAGE_QT_MOUSE_QVFB
),y
)
177 QT_CONFIGURE_OPTS
+= -qt-mouse-qvfb
179 QT_CONFIGURE_OPTS
+= -no-mouse-qvfb
181 ifeq ($(BR2_PACKAGE_QT_MOUSE_NO_QWS_CURSOR
),y
)
182 QT_CONFIGURE_OPTS
+= -D QT_NO_QWS_CURSOR
186 ifeq ($(BR2_PACKAGE_QT_KEYBOARD_TTY
),y
)
187 QT_CONFIGURE_OPTS
+= -qt-kbd-tty
189 QT_CONFIGURE_OPTS
+= -no-kbd-tty
191 ifeq ($(BR2_PACKAGE_QT_KEYBOARD_LINUXINPUT
),y
)
192 QT_CONFIGURE_OPTS
+= -qt-kbd-linuxinput
194 QT_CONFIGURE_OPTS
+= -no-kbd-linuxinput
196 ifeq ($(BR2_PACKAGE_QT_KEYBOARD_QVFB
),y
)
197 QT_CONFIGURE_OPTS
+= -qt-kbd-qvfb
199 QT_CONFIGURE_OPTS
+= -no-kbd-qvfb
202 ifeq ($(BR2_PACKAGE_QT_DEBUG
),y
)
203 QT_CONFIGURE_OPTS
+= -debug
205 QT_CONFIGURE_OPTS
+= -release
208 ifeq ($(BR2_PACKAGE_QT_SHARED
),y
)
209 QT_CONFIGURE_OPTS
+= -shared
211 QT_CONFIGURE_OPTS
+= -static
214 ifeq ($(BR2_STATIC_LIBS
),y
)
215 QT_CONFIGURE_OPTS
+= -D QT_NO_DYNAMIC_LIBRARY
218 ifeq ($(BR2_ENDIAN
),"LITTLE")
219 QT_CONFIGURE_OPTS
+= -little-endian
221 QT_CONFIGURE_OPTS
+= -big-endian
224 ifeq ($(BR2_arm
)$(BR2_armeb
),y
)
225 QT_EMB_PLATFORM
= arm
226 else ifeq ($(BR2_i386
),y
)
227 QT_EMB_PLATFORM
= x86
228 else ifeq ($(BR2_x86_64
),y
)
229 QT_EMB_PLATFORM
= x86_64
230 else ifeq ($(BR2_mips
)$(BR2_mipsel
),y
)
231 QT_EMB_PLATFORM
= mips
232 else ifeq ($(BR2_powerpc
),y
)
233 QT_EMB_PLATFORM
= powerpc
234 else ifeq ($(BR2_sh4
)$(BR2_sh4eb
)$(BR2_sh4a
)$(BR2_sh4aeb
),y
)
237 QT_EMB_PLATFORM
= generic
240 ifeq ($(BR2_PACKAGE_QT_X11
),y
)
241 QT_DEPENDENCIES
+= fontconfig xlib_libXi xlib_libX11 xlib_libXrender \
242 xlib_libXcursor xlib_libXrandr xlib_libXext xlib_libXv
243 # Using pkg-config avoids us some logic to redefine and sed again mkspecs files
244 # to add X11 include path and link options
245 QT_CFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags x11`
246 QT_CXXFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags x11`
247 QT_LDFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --libs x11 xext`
248 QT_CONFIGURE_OPTS
+= -arch
$(QT_EMB_PLATFORM
) \
249 -xplatform qws
/linux-
$(QT_EMB_PLATFORM
)-g
++ -x11
-no-gtkstyle
-no-sm \
251 else # if BR2_PACKAGE_QT_EMBEDDED
252 QT_CONFIGURE_OPTS
+= -embedded
$(QT_EMB_PLATFORM
)
255 ifneq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
256 QT_CONFIGURE_OPTS
+= -no-gui
259 ifneq ($(BR2_PACKAGE_QT_GIF
),y
)
260 QT_CONFIGURE_OPTS
+= -no-gif
263 ifeq ($(BR2_PACKAGE_QT_LIBMNG
),y
)
264 QT_CONFIGURE_OPTS
+= -qt-libmng
266 QT_CONFIGURE_OPTS
+= -no-libmng
269 ifeq ($(BR2_PACKAGE_QT_ACCESSIBILITY
),y
)
270 QT_CONFIGURE_OPTS
+= -accessibility
272 QT_CONFIGURE_OPTS
+= -no-accessibility
275 ifeq ($(BR2_PACKAGE_QT_QTZLIB
),y
)
276 QT_CONFIGURE_OPTS
+= -qt-zlib
278 ifeq ($(BR2_PACKAGE_QT_SYSTEMZLIB
),y
)
279 QT_CONFIGURE_OPTS
+= -system-zlib
280 QT_DEPENDENCIES
+= zlib
284 ifeq ($(BR2_PACKAGE_QT_QTJPEG
),y
)
285 QT_CONFIGURE_OPTS
+= -qt-libjpeg
287 ifeq ($(BR2_PACKAGE_QT_SYSTEMJPEG
),y
)
288 QT_CONFIGURE_OPTS
+= -system-libjpeg
289 QT_DEPENDENCIES
+= jpeg
291 QT_CONFIGURE_OPTS
+= -no-libjpeg
295 ifeq ($(BR2_PACKAGE_QT_QTPNG
),y
)
296 QT_CONFIGURE_OPTS
+= -qt-libpng
298 ifeq ($(BR2_PACKAGE_QT_SYSTEMPNG
),y
)
299 QT_CONFIGURE_OPTS
+= -system-libpng
300 QT_DEPENDENCIES
+= libpng
302 QT_CONFIGURE_OPTS
+= -no-libpng
306 ifeq ($(BR2_PACKAGE_QT_QTTIFF
),y
)
307 QT_CONFIGURE_OPTS
+= -qt-libtiff
309 ifeq ($(BR2_PACKAGE_QT_SYSTEMTIFF
),y
)
310 QT_CONFIGURE_OPTS
+= -system-libtiff
311 QT_DEPENDENCIES
+= tiff
313 QT_CONFIGURE_OPTS
+= -no-libtiff
317 QT_FONTS
= $(addprefix $(STAGING_DIR
)/usr
/lib
/fonts
/, $(addsuffix *.qpf
, \
318 $(if
$(BR2_PACKAGE_QT_FONT_MICRO
),micro
) \
319 $(if
$(BR2_PACKAGE_QT_FONT_FIXED
),fixed
) \
320 $(if
$(BR2_PACKAGE_QT_FONT_HELVETICA
),helvetica
) \
321 $(if
$(BR2_PACKAGE_QT_FONT_JAPANESE
),japanese
) \
322 $(if
$(BR2_PACKAGE_QT_FONT_UNIFONT
),unifont
)))
324 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
),y
)
325 QT_CONFIGURE_OPTS
+= -qt-freetype
327 ifeq ($(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
328 QT_CONFIGURE_OPTS
+= -system-freetype
329 QT_CONFIGURE_OPTS
+= -I
$(STAGING_DIR
)/usr
/include/freetype2
/
330 QT_DEPENDENCIES
+= freetype
332 QT_CONFIGURE_OPTS
+= -no-freetype
336 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
337 QT_DEPENDENCIES
+= dbus
340 ifeq ($(BR2_PACKAGE_QT_OPENSSL
),y
)
341 QT_CONFIGURE_OPTS
+= -openssl
342 QT_DEPENDENCIES
+= openssl
344 QT_CONFIGURE_OPTS
+= -no-openssl
347 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
348 QT_CONFIGURE_OPTS
+= -opengl es2
-egl
349 QT_DEPENDENCIES
+= libgles libegl
350 QT_CFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags egl`
351 QT_CXXFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags egl`
352 QT_LDFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --libs egl`
353 else ifeq ($(BR2_PACKAGE_QT_OPENGL_GL_DESKTOP
),y
)
354 QT_CONFIGURE_OPTS
+= -opengl desktop
355 QT_DEPENDENCIES
+= libgl
357 QT_CONFIGURE_OPTS
+= -no-opengl
361 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
362 ifeq ($(BR2_PACKAGE_QT_IBASE
),y
)
363 QT_CONFIGURE_OPTS
+= -qt-sql-ibase
365 ifeq ($(BR2_PACKAGE_QT_MYSQL
),y
)
366 QT_CONFIGURE_OPTS
+= -qt-sql-mysql
-mysql_config
$(STAGING_DIR
)/usr
/bin
/mysql_config
367 QT_DEPENDENCIES
+= mysql
369 ifeq ($(BR2_PACKAGE_QT_ODBC
),y
)
370 QT_CONFIGURE_OPTS
+= -qt-sql-odbc
371 QT_DEPENDENCIES
+= unixodbc
373 ifeq ($(BR2_PACKAGE_QT_PSQL
),y
)
374 QT_CONFIGURE_OPTS
+= -qt-sql-psql
-psql_config
$(STAGING_DIR
)/usr
/bin
/pg_config
375 QT_DEPENDENCIES
+= postgresql
377 ifeq ($(BR2_PACKAGE_QT_SQLITE_QT
),y
)
378 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite
380 ifeq ($(BR2_PACKAGE_QT_SQLITE_SYSTEM
),y
)
381 QT_CONFIGURE_OPTS
+= -system-sqlite
382 QT_DEPENDENCIES
+= sqlite
384 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
387 ifeq ($(BR2_PACKAGE_QT_SQLITE2
),y
)
388 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite2
391 # By default, no SQL driver is turned on by configure.
392 # but it seems sqlite isn't disabled despite what says
394 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
397 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
398 QT_CONFIGURE_OPTS
+= -xmlpatterns
-exceptions
400 QT_CONFIGURE_OPTS
+= -no-xmlpatterns
403 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
404 QT_CONFIGURE_OPTS
+= -multimedia
406 QT_CONFIGURE_OPTS
+= -no-multimedia
409 ifeq ($(BR2_PACKAGE_QT_AUDIO_BACKEND
),y
)
410 QT_CONFIGURE_OPTS
+= -audio-backend
411 QT_DEPENDENCIES
+= alsa-lib
413 QT_CONFIGURE_OPTS
+= -no-audio-backend
416 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
417 QT_CONFIGURE_OPTS
+= -phonon
418 QT_DEPENDENCIES
+= gstreamer gst-plugins-base
420 QT_CONFIGURE_OPTS
+= -no-phonon
423 ifeq ($(BR2_PACKAGE_QT_PHONON_BACKEND
),y
)
424 QT_CONFIGURE_OPTS
+= -phonon-backend
426 QT_CONFIGURE_OPTS
+= -no-phonon-backend
429 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
430 QT_CONFIGURE_OPTS
+= -svg
432 QT_CONFIGURE_OPTS
+= -no-svg
435 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
436 QT_CONFIGURE_OPTS
+= -webkit
437 QT_DEPENDENCIES
+= gstreamer gst-plugins-base
439 QT_CONFIGURE_OPTS
+= -no-webkit
442 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
443 QT_CONFIGURE_OPTS
+= -script
445 QT_CONFIGURE_OPTS
+= -no-script
448 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
449 QT_CONFIGURE_OPTS
+= -scripttools
451 QT_CONFIGURE_OPTS
+= -no-scripttools
454 ifeq ($(BR2_PACKAGE_QT_STL
),y
)
455 QT_CONFIGURE_OPTS
+= -stl
457 QT_CONFIGURE_OPTS
+= -no-stl
460 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
461 QT_CONFIGURE_OPTS
+= -declarative
463 QT_CONFIGURE_OPTS
+= -no-declarative
466 # -no-pch is needed to workaround the issue described at
467 # http://comments.gmane.org/gmane.comp.lib.qt.devel/5933.
468 # In addition, ccache and precompiled headers don't play well together
469 QT_CONFIGURE_OPTS
+= -no-pch
472 # Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux
473 # host. It's unclear if this would happen on other hosts.
474 ifneq ($(findstring linux
,$(GNU_HOST_NAME
)),)
475 ifneq ($(findstring x86
,$(QT_EMB_PLATFORM
)),)
476 QT_CONFIGURE_OPTS
+= -platform linux-g
++
481 # Variable for other Qt applications to use
482 QT_QMAKE
= $(HOST_DIR
)/usr
/bin
/qmake
-spec qws
/linux-
$(QT_EMB_PLATFORM
)-g
++
484 ################################################################################
485 # QT_QMAKE_SET -- helper macro to set <variable> = <value> in
486 # the qmake.conf file. Will remove existing variable declaration if
489 # Argument 1 is the variable name
490 # Argument 2 is the value to set variable to
491 # Argument 3 is the base source directory of Qt
493 # E.G. use like this:
494 # $(call QT_QMAKE_SET,variable,value,directory)
495 ################################################################################
497 $(SED
) '/$(1)/d' $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
498 $(SED
) "/include.*qws.conf/a$(1) = $(2)" $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
501 ifneq ($(QT_CONFIG_FILE
),)
502 define QT_CONFIGURE_CONFIG_FILE
503 cp
$(QT_CONFIG_FILE
) $(@D
)/src
/corelib
/global
/qconfig-buildroot.h
507 define QT_CONFIGURE_CMDS
508 -[ -f
$(@D
)/Makefile
] && $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) confclean
510 $(QT_CONFIGURE_CONFIG_FILE
)
512 $(call QT_QMAKE_SET
,QMAKE_CC
,$(TARGET_CC
),$(@D
))
513 $(call QT_QMAKE_SET
,QMAKE_CXX
,$(TARGET_CXX
),$(@D
))
514 $(call QT_QMAKE_SET
,QMAKE_LINK
,$(TARGET_CXX
),$(@D
))
515 $(call QT_QMAKE_SET
,QMAKE_LINK_SHLIB
,$(TARGET_CXX
),$(@D
))
516 $(call QT_QMAKE_SET
,QMAKE_AR
,$(TARGET_AR
) cqs
,$(@D
))
517 $(call QT_QMAKE_SET
,QMAKE_OBJCOPY
,$(TARGET_OBJCOPY
),$(@D
))
518 $(call QT_QMAKE_SET
,QMAKE_RANLIB
,$(TARGET_RANLIB
),$(@D
))
519 $(call QT_QMAKE_SET
,QMAKE_STRIP
,$(TARGET_STRIP
),$(@D
))
520 $(call QT_QMAKE_SET
,QMAKE_CFLAGS
,$(QT_CFLAGS
),$(@D
))
521 $(call QT_QMAKE_SET
,QMAKE_CXXFLAGS
,$(QT_CXXFLAGS
),$(@D
))
522 $(call QT_QMAKE_SET
,QMAKE_LFLAGS
,$(QT_LDFLAGS
),$(@D
))
523 $(call QT_QMAKE_SET
,PKG_CONFIG
,$(HOST_DIR
)/usr
/bin
/pkg-config
,$(@D
))
524 # Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target
525 # instead of the host then. So set PKG_CONFIG* manually.
527 PKG_CONFIG_SYSROOT_DIR
="$(STAGING_DIR)" \
528 PKG_CONFIG
="$(PKG_CONFIG_HOST_BINARY)" \
529 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
531 MAKEFLAGS
="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" .
/configure \
532 $(if
$(VERBOSE
),-verbose
,-silent
) \
534 $(QT_CONFIGURE_OPTS
) \
538 -no-separate-debug-info \
540 -plugindir
/usr
/lib
/qt
/plugins \
541 -importdir
/usr
/lib
/qt
/imports \
542 -translationdir
/usr
/share
/qt
/translations \
543 -hostprefix
$(STAGING_DIR
) \
550 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
554 # Build the list of libraries and plugins to install to the target
556 QT_INSTALL_LIBS
+= QtCore
557 QT_HOST_PROGRAMS
+= moc rcc qmake lrelease
559 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
560 QT_INSTALL_LIBS
+= QtGui
561 QT_HOST_PROGRAMS
+= uic
563 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
564 QT_INSTALL_LIBS
+= QtSql
566 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
567 QT_INSTALL_LIBS
+= QtMultimedia
569 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
570 QT_INSTALL_LIBS
+= phonon
572 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
573 QT_INSTALL_LIBS
+= QtSvg
575 ifeq ($(BR2_PACKAGE_QT_NETWORK
),y
)
576 QT_INSTALL_LIBS
+= QtNetwork
578 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
579 QT_INSTALL_LIBS
+= QtWebKit
581 ifeq ($(BR2_PACKAGE_QT_XML
),y
)
582 QT_INSTALL_LIBS
+= QtXml
584 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
585 QT_INSTALL_LIBS
+= QtDBus
587 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
588 QT_INSTALL_LIBS
+= QtXmlPatterns
590 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
591 QT_INSTALL_LIBS
+= QtScript
593 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
594 QT_INSTALL_LIBS
+= QtScriptTools
596 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
597 QT_INSTALL_LIBS
+= QtDeclarative
599 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT
),y
)
600 QT_INSTALL_LIBS
+= Qt3Support
602 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
603 QT_INSTALL_LIBS
+= QtOpenGL
605 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
606 QT_INSTALL_LIBS
+= pvrQWSWSEGL
608 ifeq ($(BR2_PACKAGE_QT_TEST
),y
)
609 QT_INSTALL_LIBS
+= QtTest
612 QT_CONF_FILE
= $(HOST_DIR
)/usr
/bin
/qt.conf
614 # Since host programs and spec files have been moved to $(HOST_DIR),
615 # we need to tell qmake the new location of the various elements,
616 # through a qt.conf file.
617 define QT_INSTALL_QT_CONF
618 mkdir
-p
$(dir $(QT_CONF_FILE
))
619 echo
"[Paths]" > $(QT_CONF_FILE
)
620 echo
"Prefix=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
621 echo
"Headers=$(STAGING_DIR)/usr/include" >> $(QT_CONF_FILE
)
622 echo
"Libraries=$(STAGING_DIR)/usr/lib" >> $(QT_CONF_FILE
)
623 echo
"Data=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
624 echo
"Binaries=$(HOST_DIR)/usr/bin" >> $(QT_CONF_FILE
)
627 # After running Qt normal installation process (which installs
628 # everything in the STAGING_DIR), we move host programs such as qmake,
629 # rcc or uic to the HOST_DIR so that they are available at the usual
630 # location. A qt.conf file is generated to make sure that all host
631 # programs still find all files they need. The .pc files are tuned to
632 # remove the sysroot path from them, since pkg-config already adds it
634 define QT_INSTALL_STAGING_CMDS
635 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) install
636 mkdir
-p
$(HOST_DIR
)/usr
/bin
637 mv
$(addprefix $(STAGING_DIR
)/usr
/bin
/,$(QT_HOST_PROGRAMS
)) $(HOST_DIR
)/usr
/bin
638 ln
-sf
$(STAGING_DIR
)/usr
/mkspecs
$(HOST_DIR
)/usr
/mkspecs
639 $(QT_INSTALL_QT_CONF
)
640 for i in moc uic rcc lupdate lrelease
; do \
641 $(SED
) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \
642 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc ; \
644 $(SED
) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc
647 # Library installation
648 ifeq ($(BR2_PACKAGE_QT_SHARED
),y
)
649 define QT_INSTALL_TARGET_LIBS
650 mkdir
-p
$(TARGET_DIR
)/usr
/lib
651 for lib in
$(QT_INSTALL_LIBS
); do \
652 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/lib
$${lib}.so.
* $(TARGET_DIR
)/usr
/lib
; \
657 # Plugin installation
658 define QT_INSTALL_TARGET_PLUGINS
659 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/ ] ; then \
660 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
661 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/* $(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
665 # Import installation
666 define QT_INSTALL_TARGET_IMPORTS
667 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/ ] ; then \
668 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
669 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/* $(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
674 ifeq ($(BR2_PACKAGE_QT_EMBEDDED
),y
)
676 define QT_INSTALL_TARGET_FONTS
677 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
678 cp
-dpf
$(QT_FONTS
) $(TARGET_DIR
)/usr
/lib
/fonts
680 ifneq ($(BR2_PACKAGE_QT_FONT_MICRO
)$(BR2_PACKAGE_QT_FONT_FIXED
),)
681 # as stated in the font source src/3rdparty/fonts/micro.bdf
682 # source src/3rdparty/fonts/5x7.bdf and source src/3rdparty/fonts/6x13.bdf
683 QT_LICENSE
:= $(QT_LICENSE
), Public Domain
(Micro
/Fixed font
)
685 ifneq ($(BR2_PACKAGE_QT_FONT_HELVETICA
)$(BR2_PACKAGE_QT_FONT_JAPANESE
),)
686 QT_LICENSE
:= $(QT_LICENSE
), Adobe Helvetica license
(Helvetica
/Japanese fonts
)
687 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYING.Helvetica
689 ifeq ($(BR2_PACKAGE_QT_FONT_UNIFONT
),y
)
690 QT_LICENSE
:= $(QT_LICENSE
), Freeware
(Unifont font
)
691 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYRIGHT.Unifont
695 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
)$(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
696 define QT_INSTALL_TARGET_FONTS_TTF
697 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
698 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/fonts
/*.ttf
$(TARGET_DIR
)/usr
/lib
/fonts
700 QT_LICENSE
:= $(QT_LICENSE
), Bitstream license
(DejaVu
/Vera TrueType fonts
)
701 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYRIGHT.DejaVu \
702 src
/3rdparty
/fonts
/README.DejaVu \
703 src
/3rdparty
/fonts
/COPYRIGHT.Vera
705 endif # BR2_PACKAGE_QT_EMBEDDED
707 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
708 define QT_INSTALL_TARGET_POWERVR
709 # Note: this overwrites the default powervr.ini provided by the ti-gfx
711 $(INSTALL
) -D
-m
0644 package
/qt
/powervr.ini \
712 $(TARGET_DIR
)/etc
/powervr.ini
716 ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES
),y
)
717 define QT_INSTALL_TARGET_TRANSLATIONS
718 if
[ -d
$(STAGING_DIR
)/usr
/share
/qt
/translations
/ ] ; then \
719 mkdir
-p
$(TARGET_DIR
)/usr
/share
/qt
/translations
; \
720 cp
-dpfr
$(STAGING_DIR
)/usr
/share
/qt
/translations
/* $(TARGET_DIR
)/usr
/share
/qt
/translations
; \
725 define QT_INSTALL_TARGET_CMDS
726 $(QT_INSTALL_TARGET_LIBS
)
727 $(QT_INSTALL_TARGET_PLUGINS
)
728 $(QT_INSTALL_TARGET_IMPORTS
)
729 $(QT_INSTALL_TARGET_FONTS
)
730 $(QT_INSTALL_TARGET_FONTS_TTF
)
731 $(QT_INSTALL_TARGET_POWERVR
)
732 $(QT_INSTALL_TARGET_TRANSLATIONS
)
735 $(eval
$(generic-package
))