summaryrefslogtreecommitdiffstats
path: root/rules/host-qt4.make
blob: f865db6f0f4e3de05adbd10f2d093c6709080b9c (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
# -*-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)

#
# 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 \
	-no-stl \
	-no-glib \
	-dbus \
	-no-xmlpatterns \
	-no-exceptions \
	-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

# ----------------------------------------------------------------------------
# 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

HOST_QT4_INSTALL_OPT	= INSTALL_ROOT=$(HOST_QT4_PKGDIR)

$(STATEDIR)/host-qt4.install:
	@$(call targetinfo)
	@cd $(HOST_QT4_BUILDDIR) && $(HOST_QT4_PATH) $(MAKE) $(PARALLELMFLAGS) \
		$(HOST_QT4_INSTALL_TARGETS) $(HOST_QT4_INSTALL_OPT)
	@cd $(HOST_QT4_BUILDDIR)/tools/linguist/lrelease && $(HOST_QT4_PATH) \
		$(MAKE) $(PARALLELMFLAGS) install $(HOST_QT4_INSTALL_OPT)
	@cd $(HOST_QT4_BUILDDIR)/tools/qdbus && $(HOST_QT4_PATH) \
		$(MAKE) $(PARALLELMFLAGS) $(HOST_QT4_INSTALL_OPT) \
		sub-qdbusxml2cpp-install_subtargets \
		sub-qdbuscpp2xml-install_subtargets
	@$(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" > $(PTXDIST_SYSROOT_CROSS)/bin/qt.conf
	@$(call touch)

# vim: syntax=make