-
Notifications
You must be signed in to change notification settings - Fork 73
/
dl.mk
57 lines (46 loc) · 2.14 KB
/
dl.mk
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
Trojan_VERSION := 1.16.0
Trojan_SRC := trojan-$(Trojan_VERSION)
Trojan_URL := https://github.com/trojan-gfw/trojan/archive/v$(Trojan_VERSION).tar.gz
OpenSSL_VERSION := 1.1.1m
OpenSSL_SRC := openssl-$(OpenSSL_VERSION)
OpenSSL_URL := https://www.openssl.org/source/$(OpenSSL_SRC).tar.gz
Boost_VERSION_MAJOR := 1
Boost_VERSION_MINOR := 78
Boost_VERSION_PATCH := 0
Boost_SRC := boost_$(Boost_VERSION_MAJOR)_$(Boost_VERSION_MINOR)_$(Boost_VERSION_PATCH)
#Boost_URL := https://dl.bintray.com/boostorg/release/$(Boost_VERSION_MAJOR).$(Boost_VERSION_MINOR).$(Boost_VERSION_PATCH)/source/$(Boost_SRC).7z
Boost_URL := https://sourceforge.net/projects/boost/files/boost/$(Boost_VERSION_MAJOR).$(Boost_VERSION_MINOR).$(Boost_VERSION_PATCH)/$(Boost_SRC).7z
ifeq ($(ARCH),aarch64)
Toolchain_Archive := aarch64-linux-musl-cross.tgz
Toolchain_URL := https://more.musl.cc/10/x86_64-linux-musl/$(Toolchain_Archive)
TAR_EXT_ARGS = --strip-components 1
else
ifeq ($(ARCH),armhf)
Toolchain_Archive := armv7l-linux-musleabihf-cross.tgz
Toolchain_URL := https://more.musl.cc/10/x86_64-linux-musl/$(Toolchain_Archive)
TAR_EXT_ARGS = --strip-components 1
else
ifeq ($(ARCH),x86_64)
Toolchain_Archive := x86_64-linux-musl-cross.tgz
Toolchain_URL := https://more.musl.cc/10/x86_64-linux-musl/$(Toolchain_Archive)
TAR_EXT_ARGS = --strip-components 1
else
#Toolchain_Archive := mipsel-linux-uclibc.tar.xz
#Toolchain_URL := https://github.com/hanwckf/padavan-toolchain/releases/download/v1.1/$(Toolchain_Archive)
Toolchain_Archive := mipsel-linux-musl-cross.tgz
Toolchain_URL := https://more.musl.cc/10/x86_64-linux-musl/$(Toolchain_Archive)
TAR_EXT_ARGS = --strip-components 1
endif
endif
endif
.PHONY : dl
CURL = curl --create-dirs -L
dl: $(DL_DIR)/$(Trojan_SRC).tar.gz $(DL_DIR)/$(OpenSSL_SRC).tar.gz $(DL_DIR)/$(Boost_SRC).7z $(DL_DIR)/$(Toolchain_Archive)
$(DL_DIR)/$(Trojan_SRC).tar.gz:
$(CURL) $(Trojan_URL) -o $(DL_DIR)/$(Trojan_SRC).tar.gz
$(DL_DIR)/$(OpenSSL_SRC).tar.gz:
$(CURL) $(OpenSSL_URL) -o $(DL_DIR)/$(OpenSSL_SRC).tar.gz
$(DL_DIR)/$(Boost_SRC).7z:
$(CURL) $(Boost_URL) -o $(DL_DIR)/$(Boost_SRC).7z
$(DL_DIR)/$(Toolchain_Archive):
$(CURL) $(Toolchain_URL) -o $(DL_DIR)/$(Toolchain_Archive)