summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2015-10-15 16:57:00 (GMT)
committerTony Theodore <tonyt@logyst.com>2015-11-26 05:48:53 (GMT)
commit5e6a9e2a6639013519bf95d90b51f57917ac9549 (patch)
tree6b7cdc187722587fd7c7cca15589cb523c7ce366
parenta6ba06c5260d26e805d9fdf54c587636bb861d4a (diff)
downloadmxe-5e6a9e2a6639013519bf95d90b51f57917ac9549.zip
mxe-5e6a9e2a6639013519bf95d90b51f57917ac9549.tar.gz
mxe-5e6a9e2a6639013519bf95d90b51f57917ac9549.tar.bz2
plugins: add qt override example with minimal deps and custom cflags
-rw-r--r--plugins/custom-qt-min/overrides.mk82
1 files changed, 82 insertions, 0 deletions
diff --git a/plugins/custom-qt-min/overrides.mk b/plugins/custom-qt-min/overrides.mk
new file mode 100644
index 0000000..159e0dd
--- /dev/null
+++ b/plugins/custom-qt-min/overrides.mk
@@ -0,0 +1,82 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+# MXE provides a fully featured build of Qt. Some users want more control...
+# http://lists.nongnu.org/archive/html/mingw-cross-env-list/2013-08/msg00010.html
+# http://lists.nongnu.org/archive/html/mingw-cross-env-list/2012-05/msg00019.html
+#
+# build of qt and deps is (say): 25 mins with 12.5 MB test program
+# custom with minimal deps is: 4 mins with 7.6 MB test program
+# custom min deps and cflags is: 4 mins with 5.9 MB test program
+#
+# make qt MXE_PLUGIN_DIRS='plugins/custom-qt-min'
+
+qt_DEPS := gcc
+
+define qt_BUILD
+ $(SED) -i 's,\(^QMAKE_CFLAGS_RELEASE\).*,\1 = -pipe -Os -fomit-frame-pointer -momit-leaf-frame-pointer -fdata-sections -ffunction-sections,g' '$(1)/mkspecs/win32-g++/qmake.conf'
+ cd '$(1)' && QTDIR='$(1)' ./bin/syncqt
+ cd '$(1)' && \
+ ./configure \
+ -opensource \
+ -confirm-license \
+ -fast \
+ -xplatform win32-g++-4.6 \
+ -device-option CROSS_COMPILE=$(TARGET)- \
+ -device-option PKG_CONFIG='$(TARGET)-pkg-config' \
+ -force-pkg-config \
+ -release \
+ -static \
+ -prefix '$(PREFIX)/$(TARGET)/qt' \
+ -prefix-install \
+ -make libs \
+ -nomake demos \
+ -nomake docs \
+ -nomake examples \
+ -nomake tools \
+ -nomake translations \
+ -no-accessibility \
+ -no-audio-backend \
+ -no-dbus \
+ -no-declarative \
+ -no-exceptions \
+ -no-gif \
+ -no-glib \
+ -no-gstreamer \
+ -no-iconv \
+ -no-libjpeg \
+ -no-libmng \
+ -no-libpng \
+ -no-libtiff \
+ -no-multimedia \
+ -no-opengl \
+ -no-openssl \
+ -no-phonon \
+ -no-phonon-backend \
+ -no-qt3support \
+ -no-reduce-exports \
+ -no-rpath \
+ -no-script \
+ -no-scripttools \
+ -no-sql-mysql \
+ -no-sql-odbc \
+ -no-sql-psql \
+ -no-sql-sqlite \
+ -no-sql-tds \
+ -no-stl \
+ -no-svg \
+ -no-webkit \
+ -no-xmlpatterns \
+ -qt-zlib \
+ -v
+
+ $(MAKE) -C '$(1)' -j '$(JOBS)'
+ rm -rf '$(PREFIX)/$(TARGET)/qt'
+ $(MAKE) -C '$(1)' -j 1 install
+
+ mkdir '$(1)/test-qt'
+ cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt/bin/qmake' '$(PWD)/$(2).pro'
+ $(MAKE) -C '$(1)/test-qt' -j '$(JOBS)'
+ $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/'
+
+endef