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
:= $(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_STATIC_LIBS
),y
)
207 QT_CONFIGURE_OPTS
+= -D QT_NO_DYNAMIC_LIBRARY
210 ifeq ($(BR2_ENDIAN
),"LITTLE")
211 QT_CONFIGURE_OPTS
+= -little-endian
213 QT_CONFIGURE_OPTS
+= -big-endian
216 ifeq ($(BR2_arm
)$(BR2_armeb
),y
)
217 QT_EMB_PLATFORM
= arm
218 else ifeq ($(BR2_i386
),y
)
219 QT_EMB_PLATFORM
= x86
220 else ifeq ($(BR2_x86_64
),y
)
221 QT_EMB_PLATFORM
= x86_64
222 else ifeq ($(BR2_mips
)$(BR2_mipsel
),y
)
223 QT_EMB_PLATFORM
= mips
224 else ifeq ($(BR2_powerpc
),y
)
225 QT_EMB_PLATFORM
= powerpc
226 else ifeq ($(BR2_sh4
)$(BR2_sh4eb
)$(BR2_sh4a
)$(BR2_sh4aeb
),y
)
229 QT_EMB_PLATFORM
= generic
232 ifeq ($(BR2_PACKAGE_QT_X11
),y
)
233 QT_DEPENDENCIES
+= fontconfig xlib_libXi xlib_libX11 xlib_libXrender \
234 xlib_libXcursor xlib_libXrandr xlib_libXext xlib_libXv
235 # Using pkg-config avoids us some logic to redefine and sed again mkspecs files
236 # to add X11 include path and link options
237 QT_CFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags x11`
238 QT_CXXFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags x11`
239 QT_LDFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --libs x11 xext`
240 QT_CONFIGURE_OPTS
+= -arch
$(QT_EMB_PLATFORM
) \
241 -xplatform qws
/linux-
$(QT_EMB_PLATFORM
)-g
++ -x11
-no-gtkstyle
-no-sm \
243 else # if BR2_PACKAGE_QT_EMBEDDED
244 QT_CONFIGURE_OPTS
+= -embedded
$(QT_EMB_PLATFORM
)
247 ifneq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
248 QT_CONFIGURE_OPTS
+= -no-gui
251 ifneq ($(BR2_PACKAGE_QT_GIF
),y
)
252 QT_CONFIGURE_OPTS
+= -no-gif
255 ifeq ($(BR2_PACKAGE_QT_LIBMNG
),y
)
256 QT_CONFIGURE_OPTS
+= -qt-libmng
258 QT_CONFIGURE_OPTS
+= -no-libmng
261 ifeq ($(BR2_PACKAGE_QT_QTZLIB
),y
)
262 QT_CONFIGURE_OPTS
+= -qt-zlib
264 ifeq ($(BR2_PACKAGE_QT_SYSTEMZLIB
),y
)
265 QT_CONFIGURE_OPTS
+= -system-zlib
266 QT_DEPENDENCIES
+= zlib
270 ifeq ($(BR2_PACKAGE_QT_QTJPEG
),y
)
271 QT_CONFIGURE_OPTS
+= -qt-libjpeg
273 ifeq ($(BR2_PACKAGE_QT_SYSTEMJPEG
),y
)
274 QT_CONFIGURE_OPTS
+= -system-libjpeg
275 QT_DEPENDENCIES
+= jpeg
277 QT_CONFIGURE_OPTS
+= -no-libjpeg
281 ifeq ($(BR2_PACKAGE_QT_QTPNG
),y
)
282 QT_CONFIGURE_OPTS
+= -qt-libpng
284 ifeq ($(BR2_PACKAGE_QT_SYSTEMPNG
),y
)
285 QT_CONFIGURE_OPTS
+= -system-libpng
286 QT_DEPENDENCIES
+= libpng
288 QT_CONFIGURE_OPTS
+= -no-libpng
292 ifeq ($(BR2_PACKAGE_QT_QTTIFF
),y
)
293 QT_CONFIGURE_OPTS
+= -qt-libtiff
295 ifeq ($(BR2_PACKAGE_QT_SYSTEMTIFF
),y
)
296 QT_CONFIGURE_OPTS
+= -system-libtiff
297 QT_DEPENDENCIES
+= tiff
299 QT_CONFIGURE_OPTS
+= -no-libtiff
303 QT_FONTS
= $(addprefix $(STAGING_DIR
)/usr
/lib
/fonts
/, $(addsuffix *.qpf
, \
304 $(if
$(BR2_PACKAGE_QT_FONT_MICRO
),micro
) \
305 $(if
$(BR2_PACKAGE_QT_FONT_FIXED
),fixed
) \
306 $(if
$(BR2_PACKAGE_QT_FONT_HELVETICA
),helvetica
) \
307 $(if
$(BR2_PACKAGE_QT_FONT_JAPANESE
),japanese
) \
308 $(if
$(BR2_PACKAGE_QT_FONT_UNIFONT
),unifont
)))
310 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
),y
)
311 QT_CONFIGURE_OPTS
+= -qt-freetype
313 ifeq ($(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
314 QT_CONFIGURE_OPTS
+= -system-freetype
315 QT_CONFIGURE_OPTS
+= -I
$(STAGING_DIR
)/usr
/include/freetype2
/
316 QT_DEPENDENCIES
+= freetype
318 QT_CONFIGURE_OPTS
+= -no-freetype
322 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
323 QT_DEPENDENCIES
+= dbus
326 ifeq ($(BR2_PACKAGE_QT_OPENSSL
),y
)
327 QT_CONFIGURE_OPTS
+= -openssl
328 QT_DEPENDENCIES
+= openssl
330 QT_CONFIGURE_OPTS
+= -no-openssl
333 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
334 QT_CONFIGURE_OPTS
+= -opengl es2
-egl
335 QT_DEPENDENCIES
+= libgles libegl
336 QT_CFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags egl`
337 QT_CXXFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --cflags egl`
338 QT_LDFLAGS
+= `$(PKG_CONFIG_HOST_BINARY) --libs egl`
339 else ifeq ($(BR2_PACKAGE_QT_OPENGL_GL_DESKTOP
),y
)
340 QT_CONFIGURE_OPTS
+= -opengl desktop
341 QT_DEPENDENCIES
+= libgl
343 QT_CONFIGURE_OPTS
+= -no-opengl
347 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
348 ifeq ($(BR2_PACKAGE_QT_IBASE
),y
)
349 QT_CONFIGURE_OPTS
+= -qt-sql-ibase
351 ifeq ($(BR2_PACKAGE_QT_MYSQL
),y
)
352 QT_CONFIGURE_OPTS
+= -qt-sql-mysql
-mysql_config
$(STAGING_DIR
)/usr
/bin
/mysql_config
353 QT_DEPENDENCIES
+= mysql
355 ifeq ($(BR2_PACKAGE_QT_ODBC
),y
)
356 QT_CONFIGURE_OPTS
+= -qt-sql-odbc
357 QT_DEPENDENCIES
+= unixodbc
359 ifeq ($(BR2_PACKAGE_QT_PSQL
),y
)
360 QT_CONFIGURE_OPTS
+= -qt-sql-psql
-psql_config
$(STAGING_DIR
)/usr
/bin
/pg_config
361 QT_DEPENDENCIES
+= postgresql
363 ifeq ($(BR2_PACKAGE_QT_SQLITE_QT
),y
)
364 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite
366 ifeq ($(BR2_PACKAGE_QT_SQLITE_SYSTEM
),y
)
367 QT_CONFIGURE_OPTS
+= -system-sqlite
368 QT_DEPENDENCIES
+= sqlite
370 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
373 ifeq ($(BR2_PACKAGE_QT_SQLITE2
),y
)
374 QT_CONFIGURE_OPTS
+= -qt-sql-sqlite2
377 # By default, no SQL driver is turned on by configure.
378 # but it seems sqlite isn't disabled despite what says
380 QT_CONFIGURE_OPTS
+= -no-sql-sqlite
383 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
384 QT_CONFIGURE_OPTS
+= -xmlpatterns
-exceptions
386 QT_CONFIGURE_OPTS
+= -no-xmlpatterns
389 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
390 QT_CONFIGURE_OPTS
+= -multimedia
392 QT_CONFIGURE_OPTS
+= -no-multimedia
395 ifeq ($(BR2_PACKAGE_QT_AUDIO_BACKEND
),y
)
396 QT_CONFIGURE_OPTS
+= -audio-backend
397 QT_DEPENDENCIES
+= alsa-lib
399 QT_CONFIGURE_OPTS
+= -no-audio-backend
402 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
403 QT_CONFIGURE_OPTS
+= -phonon
404 QT_DEPENDENCIES
+= gstreamer gst-plugins-base
406 QT_CONFIGURE_OPTS
+= -no-phonon
409 ifeq ($(BR2_PACKAGE_QT_PHONON_BACKEND
),y
)
410 QT_CONFIGURE_OPTS
+= -phonon-backend
412 QT_CONFIGURE_OPTS
+= -no-phonon-backend
415 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
416 QT_CONFIGURE_OPTS
+= -svg
418 QT_CONFIGURE_OPTS
+= -no-svg
421 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
422 QT_CONFIGURE_OPTS
+= -webkit
424 QT_CONFIGURE_OPTS
+= -no-webkit
427 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
428 QT_CONFIGURE_OPTS
+= -script
430 QT_CONFIGURE_OPTS
+= -no-script
433 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
434 QT_CONFIGURE_OPTS
+= -scripttools
436 QT_CONFIGURE_OPTS
+= -no-scripttools
439 ifeq ($(BR2_PACKAGE_QT_STL
),y
)
440 QT_CONFIGURE_OPTS
+= -stl
442 QT_CONFIGURE_OPTS
+= -no-stl
445 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
446 QT_CONFIGURE_OPTS
+= -declarative
448 QT_CONFIGURE_OPTS
+= -no-declarative
451 # -no-pch is needed to workaround the issue described at
452 # http://comments.gmane.org/gmane.comp.lib.qt.devel/5933.
453 # In addition, ccache and precompiled headers don't play well together
454 QT_CONFIGURE_OPTS
+= -no-pch
457 # Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux
458 # host. It's unclear if this would happen on other hosts.
459 ifneq ($(findstring linux
,$(GNU_HOST_NAME
)),)
460 ifneq ($(findstring x86
,$(QT_EMB_PLATFORM
)),)
461 QT_CONFIGURE_OPTS
+= -platform linux-g
++
466 # Variable for other Qt applications to use
467 QT_QMAKE
= $(HOST_DIR
)/usr
/bin
/qmake
-spec qws
/linux-
$(QT_EMB_PLATFORM
)-g
++
469 ################################################################################
470 # QT_QMAKE_SET -- helper macro to set <variable> = <value> in
471 # the qmake.conf file. Will remove existing variable declaration if
474 # Argument 1 is the variable name
475 # Argument 2 is the value to set variable to
476 # Argument 3 is the base source directory of Qt
478 # E.G. use like this:
479 # $(call QT_QMAKE_SET,variable,value,directory)
480 ################################################################################
482 $(SED
) '/$(1)/d' $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
483 $(SED
) "/include.*qws.conf/a$(1) = $(2)" $(3)/mkspecs
/qws
/linux-
$(QT_EMB_PLATFORM
)-g
++/qmake.conf
486 ifneq ($(QT_CONFIG_FILE
),)
487 define QT_CONFIGURE_CONFIG_FILE
488 cp
$(QT_CONFIG_FILE
) $(@D
)/src
/corelib
/global
/qconfig-buildroot.h
492 define QT_CONFIGURE_CMDS
493 -[ -f
$(@D
)/Makefile
] && $(MAKE
) -C
$(@D
) confclean
495 $(QT_CONFIGURE_CONFIG_FILE
)
497 $(call QT_QMAKE_SET
,QMAKE_CC
,$(TARGET_CC
),$(@D
))
498 $(call QT_QMAKE_SET
,QMAKE_CXX
,$(TARGET_CXX
),$(@D
))
499 $(call QT_QMAKE_SET
,QMAKE_LINK
,$(TARGET_CXX
),$(@D
))
500 $(call QT_QMAKE_SET
,QMAKE_LINK_SHLIB
,$(TARGET_CXX
),$(@D
))
501 $(call QT_QMAKE_SET
,QMAKE_AR
,$(TARGET_AR
) cqs
,$(@D
))
502 $(call QT_QMAKE_SET
,QMAKE_OBJCOPY
,$(TARGET_OBJCOPY
),$(@D
))
503 $(call QT_QMAKE_SET
,QMAKE_RANLIB
,$(TARGET_RANLIB
),$(@D
))
504 $(call QT_QMAKE_SET
,QMAKE_STRIP
,$(TARGET_STRIP
),$(@D
))
505 $(call QT_QMAKE_SET
,QMAKE_CFLAGS
,$(QT_CFLAGS
),$(@D
))
506 $(call QT_QMAKE_SET
,QMAKE_CXXFLAGS
,$(QT_CXXFLAGS
),$(@D
))
507 $(call QT_QMAKE_SET
,QMAKE_LFLAGS
,$(QT_LDFLAGS
),$(@D
))
508 $(call QT_QMAKE_SET
,PKG_CONFIG
,$(HOST_DIR
)/usr
/bin
/pkg-config
,$(@D
))
509 # Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target
510 # instead of the host then. So set PKG_CONFIG* manually.
512 PKG_CONFIG_SYSROOT_DIR
="$(STAGING_DIR)" \
513 PKG_CONFIG
="$(PKG_CONFIG_HOST_BINARY)" \
514 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
515 $(QT_CONFIGURE_ENV
) \
516 MAKEFLAGS
="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" .
/configure \
517 $(if
$(VERBOSE
),-verbose
,-silent
) \
519 $(QT_CONFIGURE_OPTS
) \
524 -no-separate-debug-info \
526 -plugindir
/usr
/lib
/qt
/plugins \
527 -importdir
/usr
/lib
/qt
/imports \
528 -translationdir
/usr
/share
/qt
/translations \
529 -hostprefix
$(STAGING_DIR
) \
536 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
540 # Build the list of libraries and plugins to install to the target
542 QT_INSTALL_LIBS
+= QtCore
543 QT_HOST_PROGRAMS
+= moc rcc qmake lrelease
545 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE
),y
)
546 QT_INSTALL_LIBS
+= QtGui
547 QT_HOST_PROGRAMS
+= uic
549 ifeq ($(BR2_PACKAGE_QT_SQL_MODULE
),y
)
550 QT_INSTALL_LIBS
+= QtSql
552 ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA
),y
)
553 QT_INSTALL_LIBS
+= QtMultimedia
555 ifeq ($(BR2_PACKAGE_QT_PHONON
),y
)
556 QT_INSTALL_LIBS
+= phonon
558 ifeq ($(BR2_PACKAGE_QT_SVG
),y
)
559 QT_INSTALL_LIBS
+= QtSvg
561 ifeq ($(BR2_PACKAGE_QT_NETWORK
),y
)
562 QT_INSTALL_LIBS
+= QtNetwork
564 ifeq ($(BR2_PACKAGE_QT_WEBKIT
),y
)
565 QT_INSTALL_LIBS
+= QtWebKit
567 ifeq ($(BR2_PACKAGE_QT_XML
),y
)
568 QT_INSTALL_LIBS
+= QtXml
570 ifeq ($(BR2_PACKAGE_QT_DBUS
),y
)
571 QT_INSTALL_LIBS
+= QtDBus
573 ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS
),y
)
574 QT_INSTALL_LIBS
+= QtXmlPatterns
576 ifeq ($(BR2_PACKAGE_QT_SCRIPT
),y
)
577 QT_INSTALL_LIBS
+= QtScript
579 ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS
),y
)
580 QT_INSTALL_LIBS
+= QtScriptTools
582 ifeq ($(BR2_PACKAGE_QT_DECLARATIVE
),y
)
583 QT_INSTALL_LIBS
+= QtDeclarative
585 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT
),y
)
586 QT_INSTALL_LIBS
+= Qt3Support
588 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES
),y
)
589 QT_INSTALL_LIBS
+= QtOpenGL
591 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
592 QT_INSTALL_LIBS
+= pvrQWSWSEGL
594 ifeq ($(BR2_PACKAGE_QT_TEST
),y
)
595 QT_INSTALL_LIBS
+= QtTest
598 QT_CONF_FILE
= $(HOST_DIR
)/usr
/bin
/qt.conf
600 # Since host programs and spec files have been moved to $(HOST_DIR),
601 # we need to tell qmake the new location of the various elements,
602 # through a qt.conf file.
603 define QT_INSTALL_QT_CONF
604 mkdir
-p
$(dir $(QT_CONF_FILE
))
605 echo
"[Paths]" > $(QT_CONF_FILE
)
606 echo
"Prefix=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
607 echo
"Headers=$(STAGING_DIR)/usr/include" >> $(QT_CONF_FILE
)
608 echo
"Libraries=$(STAGING_DIR)/usr/lib" >> $(QT_CONF_FILE
)
609 echo
"Data=$(HOST_DIR)/usr" >> $(QT_CONF_FILE
)
610 echo
"Binaries=$(HOST_DIR)/usr/bin" >> $(QT_CONF_FILE
)
613 # After running Qt normal installation process (which installs
614 # everything in the STAGING_DIR), we move host programs such as qmake,
615 # rcc or uic to the HOST_DIR so that they are available at the usual
616 # location. A qt.conf file is generated to make sure that all host
617 # programs still find all files they need. The .pc files are tuned to
618 # remove the sysroot path from them, since pkg-config already adds it
620 define QT_INSTALL_STAGING_CMDS
621 $(MAKE
) -C
$(@D
) install
622 mkdir
-p
$(HOST_DIR
)/usr
/bin
623 mv
$(addprefix $(STAGING_DIR
)/usr
/bin
/,$(QT_HOST_PROGRAMS
)) $(HOST_DIR
)/usr
/bin
624 ln
-sf
$(STAGING_DIR
)/usr
/mkspecs
$(HOST_DIR
)/usr
/mkspecs
625 $(QT_INSTALL_QT_CONF
)
626 for i in moc uic rcc lupdate lrelease
; do \
627 $(SED
) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \
628 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc ; \
630 $(SED
) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR
)/usr
/lib
/pkgconfig
/Qt
*.
pc
633 # Library installation
634 ifeq ($(BR2_PACKAGE_QT_SHARED
),y
)
635 define QT_INSTALL_TARGET_LIBS
636 mkdir
-p
$(TARGET_DIR
)/usr
/lib
637 for lib in
$(QT_INSTALL_LIBS
); do \
638 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/lib
$${lib}.so.
* $(TARGET_DIR
)/usr
/lib
; \
643 # Plugin installation
644 define QT_INSTALL_TARGET_PLUGINS
645 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/ ] ; then \
646 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
647 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/plugins
/* $(TARGET_DIR
)/usr
/lib
/qt
/plugins
; \
651 # Import installation
652 define QT_INSTALL_TARGET_IMPORTS
653 if
[ -d
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/ ] ; then \
654 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
655 cp
-dpfr
$(STAGING_DIR
)/usr
/lib
/qt
/imports
/* $(TARGET_DIR
)/usr
/lib
/qt
/imports
; \
660 ifeq ($(BR2_PACKAGE_QT_EMBEDDED
),y
)
662 define QT_INSTALL_TARGET_FONTS
663 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
664 cp
-dpf
$(QT_FONTS
) $(TARGET_DIR
)/usr
/lib
/fonts
666 ifneq ($(BR2_PACKAGE_QT_FONT_MICRO
)$(BR2_PACKAGE_QT_FONT_FIXED
),)
667 # as stated in the font source src/3rdparty/fonts/micro.bdf
668 # source src/3rdparty/fonts/5x7.bdf and source src/3rdparty/fonts/6x13.bdf
669 QT_LICENSE
:= $(QT_LICENSE
), Public Domain
(Micro
/Fixed font
)
671 ifneq ($(BR2_PACKAGE_QT_FONT_HELVETICA
)$(BR2_PACKAGE_QT_FONT_JAPANESE
),)
672 QT_LICENSE
:= $(QT_LICENSE
), Adobe Helvetica license
(Helvetica
/Japanese fonts
)
673 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYING.Helvetica
675 ifeq ($(BR2_PACKAGE_QT_FONT_UNIFONT
),y
)
676 QT_LICENSE
:= $(QT_LICENSE
), Freeware
(Unifont font
)
677 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYRIGHT.Unifont
681 ifeq ($(BR2_PACKAGE_QT_QTFREETYPE
)$(BR2_PACKAGE_QT_SYSTEMFREETYPE
),y
)
682 define QT_INSTALL_TARGET_FONTS_TTF
683 mkdir
-p
$(TARGET_DIR
)/usr
/lib
/fonts
684 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/fonts
/*.ttf
$(TARGET_DIR
)/usr
/lib
/fonts
686 QT_LICENSE
:= $(QT_LICENSE
), Bitstream license
(DejaVu
/Vera TrueType fonts
)
687 QT_LICENSE_FILES
+= src
/3rdparty
/fonts
/COPYRIGHT.DejaVu \
688 src
/3rdparty
/fonts
/README.DejaVu \
689 src
/3rdparty
/fonts
/COPYRIGHT.Vera
691 endif # BR2_PACKAGE_QT_EMBEDDED
693 ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR
),y
)
694 define QT_INSTALL_TARGET_POWERVR
695 # Note: this overwrites the default powervr.ini provided by the ti-gfx
697 $(INSTALL
) -D
-m
0644 package
/qt
/powervr.ini \
698 $(TARGET_DIR
)/etc
/powervr.ini
702 ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES
),y
)
703 define QT_INSTALL_TARGET_TRANSLATIONS
704 if
[ -d
$(STAGING_DIR
)/usr
/share
/qt
/translations
/ ] ; then \
705 mkdir
-p
$(TARGET_DIR
)/usr
/share
/qt
/translations
; \
706 cp
-dpfr
$(STAGING_DIR
)/usr
/share
/qt
/translations
/* $(TARGET_DIR
)/usr
/share
/qt
/translations
; \
711 define QT_INSTALL_TARGET_CMDS
712 $(QT_INSTALL_TARGET_LIBS
)
713 $(QT_INSTALL_TARGET_PLUGINS
)
714 $(QT_INSTALL_TARGET_IMPORTS
)
715 $(QT_INSTALL_TARGET_FONTS
)
716 $(QT_INSTALL_TARGET_FONTS_TTF
)
717 $(QT_INSTALL_TARGET_POWERVR
)
718 $(QT_INSTALL_TARGET_TRANSLATIONS
)
721 $(eval
$(generic-package
))