forked from jhead/phantom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.3 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
SHELL=/bin/bash
.PHONY: prep
OUT=bin/phantom-windows.exe bin/phantom-windows-32bit.exe bin/phantom-macos bin/phantom-linux bin/phantom-linux-arm5 bin/phantom-linux-arm6 bin/phantom-linux-arm7 bin/phantom-linux-arm8
CMDSRC=phantom.go
build: prep ${OUT}
bin/phantom-windows.exe:
pushd cmd && \
GOOS=windows GOARCH=amd64 go build -o ../bin/phantom-windows.exe ${CMDSRC} && \
popd
bin/phantom-windows-32bit.exe:
pushd cmd && \
GOOS=windows GOARCH=386 go build -o ../bin/phantom-windows-32bit.exe ${CMDSRC} && \
popd
bin/phantom-macos:
pushd cmd && \
GOOS=darwin GOARCH=amd64 go build -o ../bin/phantom-macos ${CMDSRC} && \
popd
bin/phantom-linux:
pushd cmd && \
GOOS=linux GOARCH=amd64 go build -o ../bin/phantom-linux ${CMDSRC} && \
popd
bin/phantom-linux-arm5:
pushd cmd && \
GOOS=linux GOARCH=arm GOARM=5 go build -o ../bin/phantom-linux-arm5 ${CMDSRC} && \
popd
bin/phantom-linux-arm6:
pushd cmd && \
GOOS=linux GOARCH=arm GOARM=6 go build -o ../bin/phantom-linux-arm6 ${CMDSRC} && \
popd
bin/phantom-linux-arm7:
pushd cmd && \
GOOS=linux GOARCH=arm GOARM=7 go build -o ../bin/phantom-linux-arm7 ${CMDSRC} && \
popd
bin/phantom-linux-arm8:
pushd cmd && \
GOOS=linux GOARCH=arm64 go build -o ../bin/phantom-linux-arm8 ${CMDSRC} && \
popd
prep:
mkdir -p bin
clean:
rm -rf bin
test:
go test ./...