blob: 7d5fdbd9da093ed513186eabe41317dce6cd7977 (
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
|
#
# Makefile to compile QT-Creator
#
TOP = $(shell readlink -f .)
VERSION = 4.12
RELEASE = 2
QT_VERSION = 5.15
QT_RELEASE = 0
TARURL = https://download.qt.io/official_releases/qtcreator/$(VERSION)/$(VERSION).$(RELEASE)/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz
ZIPURL = https://download.qt.io/official_releases/qtcreator/$(VERSION)/$(VERSION).$(RELEASE)/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip
7ZIP = $(TOP)/wintools/7za.exe
ifeq ($(ARCH),)
$(error ARCH is not set)
endif
ifeq ($(GCC_PATH),)
$(error GCC_PATH is not set)
endif
ifeq ($(BUILD_NUMBER),)
BUILD = unsupported
else
BUILD = $(BUILD_NUMBER)
endif
BUILD_OS = $(shell uname -s)
QTDIR = $(PWD)/install.$(ARCH)/qt-5.15.0-shared
BUILDDIR = $(PWD)/build-qtcreator.$(ARCH)
INSTDIR = $(PWD)/inst-qtcreator.$(ARCH)
MY_PATH = $(PATH)
ifneq ($(BUILD_OS),Linux)
MY_PATH = $(shell cygpath -p -C ANSI "$(PATH)")
endif
ifeq ($(ARCH),x86-linux64)
MKSPEC = linux-g++-64
CROSS_COMPILE =
else
MKSPEC = win32-g++
ifeq ($(BUILD_OS),Linux)
CROSS_COMPILE = x86_64-w64-mingw32-
endif
endif
PKGNAME = qtcreator-$(VERSION)-$(RELEASE)-$(BUILD)-$(ARCH)
# ---------------------------------------------------------------------------
#
all: download unpack patchit build install pack.$(ARCH)
ifeq ($(BUILD_OS),Linux)
download: $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz
else
download: $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip
endif
unpack:
mkdir -p $(BUILDDIR)
ifeq ($(BUILD_OS),Linux)
tar -zxf $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz \
-C $(BUILDDIR)
else
cd $(BUILDDIR) && \
$(7ZIP) x $(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip
endif
patchit:
cd $(BUILDDIR)/qt-creator-opensource-src-$(VERSION).$(RELEASE) && \
patch -p1 < $(PWD)/SOURCE/qt-creator-dllexport.patch
$(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).tar.gz:
cd $(PWD)/SOURCE && \
wget -c "$(TARURL)"
$(PWD)/SOURCE/qt-creator-opensource-src-$(VERSION).$(RELEASE).zip:
cd $(PWD)/SOURCE && \
wget -c "$(ZIPURL)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
build:
cd $(BUILDDIR)/qt-creator-opensource-src-$(VERSION).$(RELEASE) && \
export PATH="$(GCC_PATH):$(QTDIR)/bin:$(MY_PATH)" && \
CROSS_COMPILE=$(CROSS_COMPILE) \
$(QTDIR)/bin/qmake -o Makefile -spec $(MKSPEC) && \
make
install:
cd $(BUILDDIR)/qt-creator-opensource-src-$(VERSION).$(RELEASE) && \
make INSTALL_ROOT=$(INSTDIR) install
pack.x86-linux64:
cd $(INSTDIR) && \
tar -zcf $(PWD)/$(PKGNAME).tgz .
pack.x86-mingw64:
cd $(INSTDIR) && \
$(7ZIP) a -r $(PWD)/$(PKGNAME).zip .
clean:
rm -Rf $(BUILDDIR)
|