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_MYSQL
),y
)
363 QT_CONFIGURE_OPTS
+= -qt-sql-mysql
-mysql_config
$(STAGING_DIR
)/usr
/bin
/mysql_config
364 QT_DEPENDENCIES
+= mysql
366 ifeq ($(BR2_PACKAGE_QT_ODBC
),y
)
367 QT_CONFIGURE_OPTS
+= -qt-sql-odbc
368 QT_DEPENDENCIES
+= unixodbc
370 ifeq ($(BR2_PACKAGE_QT_PSQL
),y
)
371 QT_CONFIGURE_OPTS
+= -qt-sql-psql
-psql_config
$(STAGING_DIR
)/usr
/bin
/pg_config
372 QT_DEPENDENCIES
+= postgresql
374 ifeq ($(BR2_PACKAGE_QT_SQLITE_QT
),y
)
375 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite
377 ifeq ($(BR2_PACKAGE_QT_SQLITE_SYSTEM
),y
)
378 QT_CONFIGURE_OPTS
+= -system-sqlite
379 QT_DEPENDENCIES
+= sqlite
381 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
384 ifeq ($(BR2_PACKAGE_QT_SQLITE2
),y
)
385 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite2
388 # By default, no SQL driver is turned on by configure.
389 # but it seems sqlite isn't disabled despite what says
391 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
394 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
395 QT_CONFIGURE_OPTS
+= -xmlpatterns
-exceptions
397 QT_CONFIGURE_OPTS
+= -no-xmlpatterns
400 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
401 QT_CONFIGURE_OPTS
+= -multimedia
403 QT_CONFIGURE_OPTS
+= -no-multimedia
406 ifeq ($(BR2_PACKAGE_QT_AUDIO_BACKEND
),y
)
407 QT_CONFIGURE_OPTS
+= -audio-backend
408 QT_DEPENDENCIES
+= alsa-lib
410 QT_CONFIGURE_OPTS
+= -no-audio-backend
413 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
414 QT_CONFIGURE_OPTS
+= -phonon
415 QT_DEPENDENCIES
+= gstreamer gst-plugins-base
417 QT_CONFIGURE_OPTS
+= -no-phonon
420 ifeq ($(BR2_PACKAGE_QT_PHONON_BACKEND
),y
)
421 QT_CONFIGURE_OPTS
+= -phonon-backend
423 QT_CONFIGURE_OPTS
+= -no-phonon-backend
426 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
427 QT_CONFIGURE_OPTS
+= -svg
429 QT_CONFIGURE_OPTS
+= -no-svg
432 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
433 QT_CONFIGURE_OPTS
+= -webkit
434 QT_DEPENDENCIES
+= gstreamer gst-plugins-base
436 QT_CONFIGURE_OPTS
+= -no-webkit
439 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
440 QT_CONFIGURE_OPTS
+= -script
442 QT_CONFIGURE_OPTS
+= -no-script
445 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
446 QT_CONFIGURE_OPTS
+= -scripttools
448 QT_CONFIGURE_OPTS
+= -no-scripttools
451 ifeq ($(BR2_PACKAGE_QT_STL
),y
)
452 QT_CONFIGURE_OPTS
+= -stl
454 QT_CONFIGURE_OPTS
+= -no-stl
457 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
458 QT_CONFIGURE_OPTS
+= -declarative
460 QT_CONFIGURE_OPTS
+= -no-declarative
463 # -no-pch is needed to workaround the issue described at
464 # http://comments.gmane.org/gmane.comp.lib.qt.devel/5933.
465 # In addition, ccache and precompiled headers don't play well together
466 QT_CONFIGURE_OPTS
+= -no-pch
469 # Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux
470 # host. It's unclear if this would happen on other hosts.
471 ifneq ($(findstring linux
,$(GNU_HOST_NAME
)),)
472 ifneq ($(findstring x86
,$(QT_EMB_PLATFORM
)),)
473 QT_CONFIGURE_OPTS
+= -platform linux-g
++
478 # Variable for other Qt applications to use
479 QT_QMAKE
= $(HOST_DIR
)/usr
/bin
/qmake
-spec qws
/linux-
$(QT_EMB_PLATFORM
)-g
++
481 ################################################################################
482 # QT_QMAKE_SET -- helper macro to set <variable> = <value> in
483 # the qmake.conf file. Will remove existing variable declaration if
486 # Argument 1 is the variable name
487 # Argument 2 is the value to set variable to
488 # Argument 3 is the base source directory of Qt
490 # E.G. use like this:
491 # $(call QT_QMAKE_SET,variable,value,directory)
492 ################################################################################
494 $(SED
) '/$(1)/d' $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
495 $(SED
) "/include.*qws.conf/a$(1) = $(2)" $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
498 ifneq ($(QT_CONFIG_FILE
),)
499 define QT_CONFIGURE_CONFIG_FILE
500 cp
$(QT_CONFIG_FILE
) $(@D
)/src
/corelib
/global
/qconfig-buildroot.h
504 define QT_CONFIGURE_CMDS
505 -[ -f
$(@D
)/Makefile
] && $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) confclean
507 $(QT_CONFIGURE_CONFIG_FILE
)
509 $(call QT_QMAKE_SET
,QMAKE_CC
,$(TARGET_CC
),$(@D
))
510 $(call QT_QMAKE_SET
,QMAKE_CXX
,$(TARGET_CXX
),$(@D
))
511 $(call QT_QMAKE_SET
,QMAKE_LINK
,$(TARGET_CXX
),$(@D
))
512 $(call QT_QMAKE_SET
,QMAKE_LINK_SHLIB
,$(TARGET_CXX
),$(@D
))
513 $(call QT_QMAKE_SET
,QMAKE_AR
,$(TARGET_AR
) cqs
,$(@D
))
514 $(call QT_QMAKE_SET
,QMAKE_OBJCOPY
,$(TARGET_OBJCOPY
),$(@D
))
515 $(call QT_QMAKE_SET
,QMAKE_RANLIB
,$(TARGET_RANLIB
),$(@D
))
516 $(call QT_QMAKE_SET
,QMAKE_STRIP
,$(TARGET_STRIP
),$(@D
))
517 $(call QT_QMAKE_SET
,QMAKE_CFLAGS
,$(QT_CFLAGS
),$(@D
))
518 $(call QT_QMAKE_SET
,QMAKE_CXXFLAGS
,$(QT_CXXFLAGS
),$(@D
))
519 $(call QT_QMAKE_SET
,QMAKE_LFLAGS
,$(QT_LDFLAGS
),$(@D
))
520 $(call QT_QMAKE_SET
,PKG_CONFIG
,$(HOST_DIR
)/usr
/bin
/pkg-config
,$(@D
))
521 # Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target
522 # instead of the host then. So set PKG_CONFIG* manually.
524 PKG_CONFIG_SYSROOT_DIR
="$(STAGING_DIR)" \
525 PKG_CONFIG
="$(PKG_CONFIG_HOST_BINARY)" \
526 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
528 MAKEFLAGS
="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" .
/configure \
529 $(if
$(VERBOSE
),-verbose
,-silent
) \
531 $(QT_CONFIGURE_OPTS
) \
535 -no-separate-debug-info \
537 -plugindir
/usr
/lib
/qt
/plugins \
538 -importdir
/usr
/lib
/qt
/imports \
539 -translationdir
/usr
/share
/qt
/translations \
540 -hostprefix
$(STAGING_DIR
) \
547 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
551 # Build the list of libraries and plugins to install to the target
553 QT_INSTALL_LIBS
+= QtCore
554 QT_HOST_PROGRAMS
+= moc rcc qmake lrelease
556 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
557 QT_INSTALL_LIBS
+= QtGui
558 QT_HOST_PROGRAMS
+= uic
560 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
561 QT_INSTALL_LIBS
+= QtSql
563 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
564 QT_INSTALL_LIBS
+= QtMultimedia
566 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
567 QT_INSTALL_LIBS
+= phonon
569 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
570 QT_INSTALL_LIBS
+= QtSvg
572 ifeq ($(BR2_PACKAGE_QT_NETWORK
),y
)
573 QT_INSTALL_LIBS
+= QtNetwork
575 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
576 QT_INSTALL_LIBS
+= QtWebKit
578 ifeq ($(BR2_PACKAGE_QT_XML
),y
)
579 QT_INSTALL_LIBS
+= QtXml
581 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
582 QT_INSTALL_LIBS
+= QtDBus
584 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
585 QT_INSTALL_LIBS
+= QtXmlPatterns
587 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
588 QT_INSTALL_LIBS
+= QtScript
590 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
591 QT_INSTALL_LIBS
+= QtScriptTools
593 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
594 QT_INSTALL_LIBS
+= QtDeclarative
596 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT
),y
)
597 QT_INSTALL_LIBS
+= Qt3Support
599 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
600 QT_INSTALL_LIBS
+= QtOpenGL
602 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
603 QT_INSTALL_LIBS
+= pvrQWSWSEGL
605 ifeq ($(BR2_PACKAGE_QT_TEST
),y
)
606 QT_INSTALL_LIBS
+= QtTest
609 QT_CONF_FILE
= $(HOST_DIR
)/usr
/bin
/qt.conf
611 # Since host programs and spec files have been moved to $(HOST_DIR),
612 # we need to tell qmake the new location of the various elements,
613 # through a qt.conf file.
614 define QT_INSTALL_QT_CONF
615 mkdir
-p
$(dir $(QT_CONF_FILE
))
616 echo
"[Paths]" > $(QT_CONF_FILE
)
617 echo
"Prefix=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
618 echo
"Headers=$(STAGING_DIR)/usr/include" >> $(QT_CONF_FILE
)
619 echo
"Libraries=$(STAGING_DIR)/usr/lib" >> $(QT_CONF_FILE
)
620 echo
"Data=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
621 echo
"Binaries=$(HOST_DIR)/usr/bin" >> $(QT_CONF_FILE
)
624 # After running Qt normal installation process (which installs
625 # everything in the STAGING_DIR), we move host programs such as qmake,
626 # rcc or uic to the HOST_DIR so that they are available at the usual
627 # location. A qt.conf file is generated to make sure that all host
628 # programs still find all files they need. The .pc files are tuned to
629 # remove the sysroot path from them, since pkg-config already adds it
631 define QT_INSTALL_STAGING_CMDS
632 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) install
633 mkdir
-p
$(HOST_DIR
)/usr
/bin
634 mv
$(addprefix $(STAGING_DIR
)/usr
/bin
/,$(QT_HOST_PROGRAMS
)) $(HOST_DIR
)/usr
/bin
635 ln
-sf
$(STAGING_DIR
)/usr
/mkspecs
$(HOST_DIR
)/usr
/mkspecs
636 $(QT_INSTALL_QT_CONF
)
637 for i in moc uic rcc lupdate lrelease
; do \
638 $(SED
) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \
639 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc ; \
641 $(SED
) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc
644 # Library installation
645 ifeq ($(BR2_PACKAGE_QT_SHARED
),y
)
646 define QT_INSTALL_TARGET_LIBS
647 mkdir
-p
$(TARGET_DIR
)/usr
/lib
648 for lib in
$(QT_INSTALL_LIBS
); do \
649 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/lib
$${lib}.so.
* $(TARGET_DIR
)/usr
/lib
; \
654 # Plugin installation
655 define QT_INSTALL_TARGET_PLUGINS
656 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/ ] ; then \
657 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
658 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/* $(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
662 # Import installation
663 define QT_INSTALL_TARGET_IMPORTS
664 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/ ] ; then \
665 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
666 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/* $(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
671 ifeq ($(BR2_PACKAGE_QT_EMBEDDED
),y
)
673 define QT_INSTALL_TARGET_FONTS
674 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
675 cp
-dpf
$(QT_FONTS
) $(TARGET_DIR
)/usr
/lib
/fonts
677 ifneq ($(BR2_PACKAGE_QT_FONT_MICRO
)$(BR2_PACKAGE_QT_FONT_FIXED
),)
678 # as stated in the font source src/3rdparty/fonts/micro.bdf
679 # source src/3rdparty/fonts/5x7.bdf and source src/3rdparty/fonts/6x13.bdf
680 QT_LICENSE
:= $(QT_LICENSE
), Public Domain
(Micro
/Fixed font
)
682 ifneq ($(BR2_PACKAGE_QT_FONT_HELVETICA
)$(BR2_PACKAGE_QT_FONT_JAPANESE
),)
683 QT_LICENSE
:= $(QT_LICENSE
), Adobe Helvetica license
(Helvetica
/Japanese fonts
)
684 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYING.Helvetica
686 ifeq ($(BR2_PACKAGE_QT_FONT_UNIFONT
),y
)
687 QT_LICENSE
:= $(QT_LICENSE
), Freeware
(Unifont font
)
688 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYRIGHT.Unifont
692 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
)$(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
693 define QT_INSTALL_TARGET_FONTS_TTF
694 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
695 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/fonts
/*.ttf
$(TARGET_DIR
)/usr
/lib
/fonts
697 QT_LICENSE
:= $(QT_LICENSE
), Bitstream license
(DejaVu
/Vera TrueType fonts
)
698 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYRIGHT.DejaVu \
699 src
/3rdparty
/fonts
/README.DejaVu \
700 src
/3rdparty
/fonts
/COPYRIGHT.Vera
702 endif # BR2_PACKAGE_QT_EMBEDDED
704 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
705 define QT_INSTALL_TARGET_POWERVR
706 # Note: this overwrites the default powervr.ini provided by the ti-gfx
708 $(INSTALL
) -D
-m
0644 package
/qt
/powervr.ini \
709 $(TARGET_DIR
)/etc
/powervr.ini
713 ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES
),y
)
714 define QT_INSTALL_TARGET_TRANSLATIONS
715 if
[ -d
$(STAGING_DIR
)/usr
/share
/qt
/translations
/ ] ; then \
716 mkdir
-p
$(TARGET_DIR
)/usr
/share
/qt
/translations
; \
717 cp
-dpfr
$(STAGING_DIR
)/usr
/share
/qt
/translations
/* $(TARGET_DIR
)/usr
/share
/qt
/translations
; \
722 define QT_INSTALL_TARGET_CMDS
723 $(QT_INSTALL_TARGET_LIBS
)
724 $(QT_INSTALL_TARGET_PLUGINS
)
725 $(QT_INSTALL_TARGET_IMPORTS
)
726 $(QT_INSTALL_TARGET_FONTS
)
727 $(QT_INSTALL_TARGET_FONTS_TTF
)
728 $(QT_INSTALL_TARGET_POWERVR
)
729 $(QT_INSTALL_TARGET_TRANSLATIONS
)
732 $(eval
$(generic-package
))