summaryrefslogtreecommitdiffstats
path: root/rules/host-qt4.make
blob: 66fac057eeb3bdfc0a866e33a65c4e73724dd5b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# -*-makefile-*-
#
# Copyright (C) 2009 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
HOST_PACKAGES-$(PTXCONF_HOST_QT4) += host-qt4

#
# Paths and names
#
HOST_QT4_DIR		= $(HOST_BUILDDIR)/$(QT4)
HOST_QT4_BUILDDIR	= $(HOST_BUILDDIR)/$(QT4)-build
HOST_QT4_BUILD_OOT	:= YES

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

HOST_QT4_PATH		:= PATH=$(HOST_PATH)
HOST_QT4_ENV		:= $(HOST_ENV) MAKEFLAGS="$(PARALLELMFLAGS)"

#
# autoconf
#
#
# autoconf
#
# Important: Use "-no-fast" here. Otherwise qmake will be called during
# the compile stage when the environment is not properly set!
HOST_QT4_AUTOCONF := \
	-prefix / \
	-shared \
	-opensource \
	-confirm-license \
	-release \
	-embedded \
	-no-fast \
	-no-largefile \
	-no-accessibility \
	-no-sql-ibase \
	-no-sql-mysql \
	-no-sql-odbc \
	-no-sql-psql \
	-no-sql-sqlite \
	-no-sql-sqlite2 \
	-no-qt3support \
	-optimized-qmake \
	-no-nis \
	-no-cups \
	-no-iconv \
	-pch \
	-force-pkg-config \
	-depths all \
	-make libs \
	-make tools \
	-nomake examples \
	-nomake demos \
	-nomake docs \
	-no-libpng \
	-no-libmng \
	-no-libtiff \
	-no-gif \
	-no-libjpeg \
	-qt-zlib \
	-no-freetype \
	-stl \
	-no-glib \
	-no-phonon \
	-no-phonon-backend \
	-no-webkit \
	-no-script \
	-no-scripttools \
	-no-gfx-linuxfb \
	-no-gfx-transformed \
	-no-gfx-qvfb \
	-no-gfx-vnc \
	-no-gfx-multiscreen \
	-no-kbd-tty \
	-no-kbd-linuxinput \
	-no-kbd-qnx \
	-no-kbd-qvfb \
	-no-mouse-pc \
	-no-mouse-linuxtp \
	-no-mouse-linuxinput \
	-no-mouse-tslib \
	-no-mouse-qvfb \
	-no-mouse-qnx

ifdef PTXCONF_HOST_QT4_DBUS
HOST_QT4_AUTOCONF += -qdbus
else
HOST_QT4_AUTOCONF += -no-qdbus
endif

ifdef PTXCONF_HOST_QT4_XMLPATTERNS
HOST_QT4_AUTOCONF += -xmlpatterns -exceptions
else
HOST_QT4_AUTOCONF += -no-xmlpatterns -no-exceptions
endif

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/host-qt4.compile:
	@$(call targetinfo)
	@$(call compile, HOST_QT4, sub-tools-bootstrap)
	@$(call compile, HOST_QT4, sub-xml sub-moc sub-rcc sub-uic)
	@$(call compile, HOST_QT4, sub-network)
ifdef PTXCONF_HOST_QT4_XMLPATTERNS
	@$(call compile, HOST_QT4, sub-xmlpatterns)
endif
	@$(call compile, HOST_QT4, -C tools/linguist/lrelease)
ifdef PTXCONF_HOST_QT4_DBUS
	@$(call compile, HOST_QT4, sub-dbus)
	@$(call compile, HOST_QT4, -C tools/qdbus sub-qdbusxml2cpp sub-qdbuscpp2xml)
endif
	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

HOST_QT4_INSTALL_OPT	= \
	INSTALL_ROOT=$(HOST_QT4_PKGDIR) \
	install_qmake \
	install_mkspecs \
	sub-xml-install_subtargets \
	sub-network-install_subtargets \
	sub-moc-install_subtargets \
	sub-rcc-install_subtargets \
	sub-uic-install_subtargets

ifdef PTXCONF_HOST_QT4_DBUS
HOST_QT4_INSTALL_TARGETS += sub-dbus-install_subtargets
endif
ifdef PTXCONF_HOST_QT4_XMLPATTERNS
HOST_QT4_INSTALL_TARGETS += sub-xmlpatterns-install_subtargets
endif

$(STATEDIR)/host-qt4.install:
	@$(call targetinfo)
	@$(call world/install, HOST_QT4)
	@$(call compile, HOST_QT4, -C tools/linguist/lrelease \
		install INSTALL_ROOT=$(HOST_QT4_PKGDIR))
ifdef PTXCONF_HOST_QT4_DBUS
	@$(call compile, HOST_QT4, -C tools/qdbus \
		INSTALL_ROOT=$(HOST_QT4_PKGDIR) \
		sub-qdbusxml2cpp-install_subtargets \
		sub-qdbuscpp2xml-install_subtargets)
endif
	@$(call touch)

$(STATEDIR)/host-qt4.install.post:
	@$(call targetinfo)
	@$(call world/install.post, HOST_QT4)
#	create a cross qmake:
#	copy host qmake and add a qt.conf (these must be in the same dir)
#	add wrapper script that sets the correct QMAKESPEC
	@rm -f $(PTXDIST_SYSROOT_CROSS)/bin/qmake $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross
	@cp $(HOST_QT4_PKGDIR)/bin/qmake $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross
ifdef PTXCONF_QT4_PLATFORM_EMBEDDED
	@echo -e '#!/bin/sh\nexport QMAKESPEC=qws/linux-ptx-g++\nexec $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross "$$@"\n' > $(PTXDIST_SYSROOT_CROSS)/bin/qmake
else
	@echo -e '#!/bin/sh\nexport QMAKESPEC=linux-ptx-g++\nexec $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross "$$@"\n' > $(PTXDIST_SYSROOT_CROSS)/bin/qmake
endif
	@chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/qmake
	@echo -e "[Paths]\nPrefix=$(SYSROOT)/usr\nBinaries=$(PTXCONF_SYSROOT_HOST)/bin\nImports=/usr/imports" > $(PTXDIST_SYSROOT_CROSS)/bin/qt.conf
	@echo -e "[Paths]\nPrefix=$(PTXCONF_SYSROOT_HOST)" > $(PTXDIST_SYSROOT_HOST)/bin/qt.conf
	@$(call touch)

# vim: syntax=make