diff options
author | Koenig, Joerg <Joerg.Koenig@techsat.com> | 2020-04-23 12:17:31 (GMT) |
---|---|---|
committer | Koenig, Joerg <Joerg.Koenig@techsat.com> | 2020-04-23 12:17:31 (GMT) |
commit | e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd (patch) | |
tree | 41eb6237aeb586cdfdf2ebc9ac47264f347d3710 /Makefile.xmingw64 | |
parent | 65f96f24f243372c9828847c00390e3b2b860851 (diff) | |
download | Qt-e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd.zip Qt-e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd.tar.gz Qt-e7802dbdf4fe42665dce2bd1259b7d7c7bfffecd.tar.bz2 |
Merged changes from Branch QT_5_14_0refs/changes/34/11034/1
Change-Id: Iabfa3d407e26b80d9a4d2875c0e1e202b4902482
Diffstat (limited to 'Makefile.xmingw64')
-rw-r--r-- | Makefile.xmingw64 | 174 |
1 files changed, 174 insertions, 0 deletions
diff --git a/Makefile.xmingw64 b/Makefile.xmingw64 new file mode 100644 index 0000000..68c1416 --- /dev/null +++ b/Makefile.xmingw64 @@ -0,0 +1,174 @@ + +TOP = $(shell readlink -f .) +ARCH = x86-mingw64 + +JOBS = 1 + +LOCAL_BUILD_PATH = $(TOP)/build.$(ARCH) +LOCAL_INST_PATH = $(TOP)/install.$(ARCH) + +VERSION_SHORT=5.14 +VERSION_RELEASE=2 +VERSION=$(VERSION_SHORT).$(VERSION_RELEASE) + +SSL_VERSION=1.0.2r +SSL_ARCHIVE=openssl-$(SSL_VERSION).tar.gz + +PACKAGE_NAME = qt-$(VERSION) + +GCC_PATH ?= /opt/dev-tools/gcc-suite/1.6.0/x86-linux64/gcc +CROSS_COMPILE ?= /opt/dev-tools/gcc-suite/1.6.0/x86-linux64/mingw64/bin/x86_64-w64-mingw32- + +CC ?= $(GCC_PATH)/bin/gcc +CXX ?= $(GCC_PATH)/bin/g++ + +#CC_LDFLAGS = "-m64 -shared -fpic -static-libgcc" +#CXX_LDFLAGS = "-m64 -shared -fpic -static-libgcc -static-libstdc++" + +QT_STATIC_FLAGS = -static -static-runtime -no-shared + +all: download qt + +qt: ssl.$(ARCH) qt.$(ARCH) + +download: + $(MAKE) -C $(TOP)/SOURCE + +ssl.$(ARCH): + # static + rm -Rf $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) + mkdir -p $(LOCAL_BUILD_PATH)/ + cd $(LOCAL_BUILD_PATH) && \ + tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE) + cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \ + export CFLAGS= && \ + export LDFLAGS="-static-libgcc -static-libstdc++" && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + ./Configure -static-libgcc -static-libstdc++ \ + --cross-compile-prefix=$(CROSS_COMPILE) \ + --prefix=$(LOCAL_INST_PATH)/openssl mingw64 && \ + pwd && \ + make clean && \ + make -j$(JOBS) && \ + make install + # shared + rm -Rf $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) + mkdir -p $(LOCAL_BUILD_PATH)/ + cd $(LOCAL_BUILD_PATH) && \ + tar -xzf $(TOP)/SOURCE/$(SSL_ARCHIVE) + cd $(LOCAL_BUILD_PATH)/openssl-$(SSL_VERSION) && \ + export CFLAGS=-fpic && \ + export LDFLAGS="-static-libgcc -static-libstdc++" && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + ./Configure -static-libgcc -static-libstdc++ shared \ + --cross-compile-prefix=$(CROSS_COMPILE) \ + --prefix=$(LOCAL_INST_PATH)/openssl mingw64 && \ + pwd && \ + make clean && \ + make -j$(JOBS) && \ + make install + +qt.x86-mingw64: qt.x86-mingw64.unpack qt.x86-mingw64.shared qt.x86-mingw64.static + +qt.x86-mingw64.unpack: + # shared + mkdir -p $(LOCAL_BUILD_PATH) + rm -Rf $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) + cd $(LOCAL_BUILD_PATH) && \ + tar -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz + cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \ + patch -p1 < $(TOP)/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch + +qt.x86-mingw64.shared: + # shared + cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \ + rm -f config.cache && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + gcc --version && \ + bash ./configure \ + -platform linux-g++-64 \ + -xplatform win32-g++ \ + -device-option CROSS_COMPILE=$(CROSS_COMPILE) \ + -opengl desktop \ + -recheck-all \ + -shared \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-shared \ + -release \ + -opensource \ + -no-rpath \ + -strip \ + -ssl \ + -openssl \ + -I$(LOCAL_INST_PATH)/openssl/include \ + -I/opt/dev-tools/gcc-suite/1.6.0/x86-linux64/mingw64/x86_64-w64-mingw32/include \ + -L$(LOCAL_INST_PATH)/openssl/lib \ + -nomake examples \ + -nomake tests \ + -skip qtwebengine \ + -skip activeqt \ + -qt-zlib \ + -qt-libjpeg \ + -qt-libpng \ + -qt-pcre \ + -confirm-license && \ + make QMAKE_LFLAGS="-m64 -static-libgcc -static-libstdc++" -j$(JOBS) && \ + make -j$(JOBS) install + cp -f $(TOP)/qt.conf $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/bin/ + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/bin && chmod -f a+x *.exe + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared && \ + tar -zcf $(TOP)/qt-$(VERSION)-shared-$(ARCH).tgz ./ + +qt.x86-mingw64.static: + # static + mkdir -p $(LOCAL_BUILD_PATH) + rm -Rf $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) + cd $(LOCAL_BUILD_PATH) && \ + tar -xJf $(TOP)/SOURCE/qt-everywhere-src-$(VERSION).tar.xz + cd $(LOCAL_BUILD_PATH)/qt-everywhere-src-$(VERSION) && \ + patch -p1 < $(TOP)/SOURCE/qt-5.12.3-cross-static-gcc-libs.patch && \ + rm -f config.cache && \ + export PATH=$(GCC_PATH)/bin:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64:$(LD_LIBRARY_PATH) && \ + gcc --version && \ + ./configure \ + -xplatform win32-g++ \ + -device-option CROSS_COMPILE=$(CROSS_COMPILE) \ + -opengl desktop \ + -recheck-all \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION)-static \ + -static \ + -release \ + -opensource \ + -strip \ + -ssl \ + -openssl \ + -no-rpath \ + -I$(LOCAL_INST_PATH)/openssl/include \ + -L$(LOCAL_INST_PATH)/opensll/lib \ + -nomake examples \ + -nomake tests \ + -skip qtwebengine \ + -skip activeqt \ + -qt-zlib \ + -qt-libjpeg \ + -qt-libpng \ + -qt-pcre \ + -confirm-license && \ + make QMAKE_LFLAGS="-m64 -static-libgcc -static-libstdc++" -j$(JOBS) && \ + make -j$(JOBS) install + cp -f $(TOP)/qt.conf $(LOCAL_INST_PATH)/qt-$(VERSION)-static/bin/ + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-shared/bin && chmod -f a+x *.exe + cd $(LOCAL_INST_PATH)/qt-$(VERSION)-static && \ + tar -zcf $(TOP)/qt-$(VERSION)-static-$(ARCH).tgz ./ + +clean: + rm -Rf build.$(ARCH) + rm -Rf install.$(ARCH) + +dll2a: + for d in $(DLL_DIR)/*.dll; do \ + $(GCC_PATH)/bin/$(XPREFIX)dll2a $$d -l $(LIBDIR) ; \ + done; |