-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
63 lines (48 loc) · 1.8 KB
/
Makefile
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
# (Default) build the Recovery Tool to run on this system.
build:
mkdir -p bin
echo "Building recovery tool"
go build -a -trimpath -o "bin/recovery-tool"
echo "Success! Built to bin/recovery-tool"
# Cross-compile and checksum the Recovery Tool for a range of OS/archs.
build-checksum-all: export DOCKER_BUILDKIT=1
build-checksum-all:
# Get vendor dependencies:
go mod vendor -v
# Linux 32-bit:
docker build . -o bin \
--build-arg os=linux \
--build-arg arch=386 \
--build-arg out=recovery-tool-linux32
/bin/echo -n '✓ Linux 32-bit ' && sha256sum "bin/recovery-tool-linux32"
# Linux 64-bit:
docker build . -o bin \
--build-arg os=linux \
--build-arg arch=amd64 \
--build-arg out=recovery-tool-linux64
/bin/echo -n '✓ Linux 64-bit ' && sha256sum "bin/recovery-tool-linux64"
# Windows 32-bit:
docker build . -o bin \
--build-arg os=windows \
--build-arg arch=386 \
--build-arg cc=i686-w64-mingw32-gcc \
--build-arg out=recovery-tool-windows32.exe
/bin/echo -n '✓ Windows 32-bit ' && sha256sum "bin/recovery-tool-windows32.exe"
# Windows 64-bit:
docker build . -o bin \
--build-arg os=windows \
--build-arg arch=amd64 \
--build-arg cc=x86_64-w64-mingw32-gcc \
--build-arg out=recovery-tool-windows64.exe
/bin/echo -n '✓ Windows 64-bit ' && sha256sum "bin/recovery-tool-windows64.exe"
# NOTE:
# Darwin reproducible builds are disabled for now, since the inclusion of C code in the latest
# release made building the tool inside a Linux container extremely difficult. We'll be moving the
# process to GitHub actions, where we can build on MacOS.
# Darwin 64-bit:
# docker build . -o bin \
# --build-arg os=darwin \
# --build-arg arch=amd64 \
# --build-arg out=recovery-tool-macos64
# /bin/echo -n '✓ MacOS 64-bit ' && sha256sum "bin/recovery-tool-macos64"
.SILENT: