summaryrefslogtreecommitdiffstats
path: root/rules/host-qt4.make
blob: 8993a21f0e02d2da0d792b4f009a0d6d43df1367 (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
181
182
183
184
185
186
187
# -*-makefile-*-
# $Id$
#
# 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

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(STATEDIR)/host-qt4.get: $(QT4_SOURCE)
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/host-qt4.extract:
	@$(call targetinfo)
	@$(call clean, $(HOST_QT4_DIR))
	@$(call extract, QT4, $(HOST_BUILDDIR))
	@$(call patchin, QT4, $(HOST_QT4_DIR))
	@$(call touch)

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

HOST_QT4_PATH		:= PATH=$(HOST_PATH)
HOST_QT4_ENV		:= $(HOST_ENV)

#
# 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 := \
	$(HOST_AUTOCONF) \
	-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 \
	-no-mmx \
	-no-3dnow \
	-no-sse \
	-no-sse2 \
	-no-optimized-qmake \
	-no-nis \
	-no-cups \
	-no-iconv \
	-pch \
	-force-pkg-config \
	-depths all \
	-prefix $(PTXCONF_SYSROOT_HOST) \
	-make libs \
	-make tools \
	-nomake examples \
	-nomake demos \
	-no-libpng \
	-no-libmng \
	-no-libtiff \
	-no-gif \
	-no-libjpeg \
	-qt-zlib \
	-no-freetype \
	-no-stl \
	-no-glib \
	-dbus \
	-no-xmlpatterns \
	-no-exceptions \
	-no-phonon \
	-no-phonon-backend \
	-no-webkit \
	-no-scripttools \
	-no-gfx-linuxfb \
	-no-gfx-transformed \
	-no-gfx-qvfb \
	-no-gfx-vnc \
	-no-gfx-multiscreen \
	-no-kbd-tty \
	-no-kbd-usb \
	-no-kbd-sl5000 \
	-no-kbd-yopy \
	-no-kbd-vr41xx \
	-no-kbd-qvfb \
	-no-mouse-pc \
	-no-mouse-bus \
	-no-mouse-linuxtp \
	-no-mouse-yopy \
	-no-mouse-vr41xx \
	-no-mouse-tslib \
	-no-mouse-qvfb

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


$(STATEDIR)/host-qt4.compile:
	@$(call targetinfo)
	@cd $(HOST_QT4_BUILDDIR) && $(HOST_QT4_PATH) $(MAKE) $(PARALLELMFLAGS) \
		sub-tools-bootstrap
	@cd $(HOST_QT4_BUILDDIR) && $(HOST_QT4_PATH) $(MAKE) $(PARALLELMFLAGS) \
		sub-xml sub-dbus sub-moc sub-rcc sub-uic
	@cd $(HOST_QT4_BUILDDIR) && $(HOST_QT4_PATH) $(MAKE) $(PARALLELMFLAGS) \
		sub-network
	@cd $(HOST_QT4_BUILDDIR)/tools/linguist/lrelease && $(HOST_QT4_PATH) \
		$(MAKE) $(PARALLELMFLAGS)
	@cd $(HOST_QT4_BUILDDIR)/tools/qdbus && $(HOST_QT4_PATH) \
		$(MAKE) $(PARALLELMFLAGS) sub-qdbusxml2cpp sub-qdbuscpp2xml
	@$(call touch)

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

HOST_QT4_INSTALL_TARGETS := \
	install_qmake \
	install_mkspecs \
	sub-xml-install_subtargets \
	sub-dbus-install_subtargets \
	sub-network-install_subtargets \
	sub-moc-install_subtargets \
	sub-rcc-install_subtargets \
	sub-uic-install_subtargets

$(STATEDIR)/host-qt4.install:
	@$(call targetinfo)
	@cd $(HOST_QT4_BUILDDIR) && $(HOST_QT4_PATH) $(MAKE) $(PARALLELMFLAGS) \
		$(HOST_QT4_INSTALL_TARGETS) $(HOST_QT4_MAKEVARS)
	@cd $(HOST_QT4_BUILDDIR)/tools/linguist/lrelease && $(HOST_QT4_PATH) \
		$(MAKE) $(PARALLELMFLAGS) install $(HOST_QT4_MAKEVARS)
	@cd $(HOST_QT4_BUILDDIR)/tools/qdbus && $(HOST_QT4_PATH) \
		$(MAKE) $(PARALLELMFLAGS) $(HOST_QT4_MAKEVARS) \
		sub-qdbusxml2cpp-install_subtargets \
		sub-qdbuscpp2xml-install_subtargets
#	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 $(PTXDIST_SYSROOT_HOST)/bin/qmake $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross
	@echo -e '#!/bin/sh\nexport QMAKESPEC=qws/linux-ptx-g++\nexec $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross "$$@"\n' > $(PTXDIST_SYSROOT_CROSS)/bin/qmake
	@chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/qmake
	@echo -e "[Paths]\nPrefix=$(SYSROOT)/usr\nBinaries=$(PTXCONF_SYSROOT_HOST)/bin" > $(PTXDIST_SYSROOT_CROSS)/bin/qt.conf
	@$(call touch)
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

host-qt4_clean:
	rm -rf $(STATEDIR)/host-qt4.*
	rm -rf $(HOST_QT4_DIR)
	rm -rf $(HOST_QT4_BUILDDIR)

# vim: syntax=make