diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..277c00f --- /dev/null +++ b/Makefile @@ -0,0 +1,78 @@ + +TOP = $(shell readlink -f .) +ARCH = x86-linux64 + +LOCAL_BUILD_PATH = $(TOP)/build.$(ARCH) +LOCAL_INST_PATH = $(TOP)/install.$(ARCH) + +VERSION=5.9.1 +PACKAGE_NAME = qt-$(VERSION) +GCC_PATH = /opt/gcc-suite/1.0.0/x86-linux64/gcc-7.1.0 +CROSS_PATH = /opt/gcc-suite/1.0.0/x86-linux64/mingw64 +CROSS_PREFIX = x86_64-w64-mingw32 + +CC = "gcc -m64 -static-libgcc -nodefaultlibs" +CXX = "g++ -m64 -static-libgcc -static-libstdc++ -nodefaultlibs" + +all: download qt + +qt: qt.$(ARCH) + +download: + $(MAKE) -C $(TOP)/SOURCE + +qt.x86-linux64: + rm -Rf $(LOCAL_BUILD_PATH) + mkdir -p $(LOCAL_BUILD_PATH) + cd $(LOCAL_BUILD_PATH) && \ + unzip $(TOP)/SOURCE/qt-everywhere-opensource-src-$(VERSION).zip + cd $(LOCAL_BUILD_PATH)/qt-everywhere-opensource-src-$(VERSION) && \ + export PATH=$(GCC_PATH)/bin/:$(PATH) && \ + export LD_LIBRARY_PATH=$(GCC_PATH)/lib64 && \ + gcc --version && \ + ./configure \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION) \ + -opensource \ + -confirm-license \ + -optimized-tools \ + -strip \ + -shared \ + -release \ + && \ + make -j4 + +qt.x86-mingw64: + rm -Rf $(LOCAL_BUILD_PATH) + mkdir -p $(LOCAL_BUILD_PATH) + cd $(LOCAL_BUILD_PATH) && \ + unzip $(TOP)/SOURCE/qt-everywhere-opensource-src-$(VERSION).zip + cp -f $(TOP)/SOURCE/win32-g++.qmake.conf \ + $(LOCAL_BUILD_PATH)/qt-everywhere-opensource-src-$(VERSION)/qtbase/mkspecs/win32-g++/qmake.conf + cd $(LOCAL_BUILD_PATH)/qt-everywhere-opensource-src-$(VERSION) && \ + export PATH=$(GCC_PATH)/bin/:$(PATH) && \ + gcc --version && \ + $(CROSS_PATH)/bin/$(CROSS_PREFIX)-gcc --version && \ + ./configure \ + -prefix $(LOCAL_INST_PATH)/qt-$(VERSION) \ + -release \ + -opensource \ + -confirm-license \ + -optimized-tools \ + -strip \ + -shared \ + -no-compile-examples \ + -platform linux-g++-64 \ + -xplatform win32-g++ \ + -device-option CROSS_COMPILE=$(CROSS_PATH)/bin/$(CROSS_PREFIX)- \ + -device-option CROSS_CXX_LINK_FLAGS="-static-libgcc -static-libstdc++" \ + -device-option CROSS_CC_LINK_FLAGS="-static-libgcc" \ + -skip qtactiveqt \ + -skip qtlocation \ + -skip qtwinextras \ + -nomake tests \ + -opengl desktop \ + && \ + make && \ + make install + + |