-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
67 lines (66 loc) · 1.84 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
64
65
66
67
all:
go build -i \
-gcflags="-N" \
-gcflags="-nolocalimports" \
-gcflags="-pack" \
-gcflags="-trimpath=." \
-asmflags="-trimpath=." \
-gcflags="-trimpath=$$GOPATH/src/" \
-asmflags="-trimpath=$$GOPATH/src/" \
-ldflags="-X github.com/89luca89/pakkero/internal/pakkero.LauncherStub=$$(base64 -w0 data/launcher.go) -s" \
-o dist/pakkero;
strip \
-sxX \
--remove-section=.bss \
--remove-section=.comment \
--remove-section=.eh_frame \
--remove-section=.eh_frame_hdr \
--remove-section=.fini \
--remove-section=.fini_array \
--remove-section=.gnu.build.attributes \
--remove-section=.gnu.hash \
--remove-section=.gnu.version \
--remove-section=.got \
--remove-section=.note.ABI-tag \
--remove-section=.note.gnu.build-id \
--remove-section=.shstrtab \
--remove-section=.typelink \
dist/pakkero;
clean:
rm -rf dist/;
go build -i \
-gcflags="-N" \
-gcflags="-nolocalimports" \
-gcflags="-pack" \
-gcflags="-trimpath=." \
-asmflags="-trimpath=." \
-gcflags="-trimpath=$$GOPATH/src/" \
-asmflags="-trimpath=$$GOPATH/src/" \
-ldflags="-X github.com/89luca89/pakkero/internal/pakkero.LauncherStub=$$(base64 -w0 data/launcher.go) -s" \
-o dist/pakkero;
strip \
-sxXwSgd \
--remove-section=.bss \
--remove-section=.comment \
--remove-section=.eh_frame \
--remove-section=.eh_frame_hdr \
--remove-section=.fini \
--remove-section=.fini_array \
--remove-section=.gnu.build.attributes \
--remove-section=.gnu.hash \
--remove-section=.gnu.version \
--remove-section=.got \
--remove-section=.note.ABI-tag \
--remove-section=.note.gnu.build-id \
--remove-section=.shstrtab \
--remove-section=.typelink \
dist/pakkero
test: clean
dist/pakkero \
-file /usr/bin/echo -c \
-o /tmp/test.enc \
-offset 2850000 \
-enable-stdout \
-register-dep /usr/bin/bash;
sync;
sh -c "/tmp/test.enc test"