-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (54 loc) · 1.55 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
VERSION=0.0.1
build:
make build_android
make build_linux
make build_mac
make build_windows
build_linux:
@echo 'building linux binary...'
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o vintpm
@echo 'shrinking binary...'
./upx --brute vintpm
@echo 'zipping build...'
tar -zcvf binaries/vintpm_linux_amd64.tar.gz vintpm
@echo 'cleaning up...'
rm vintpm
build_windows:
@echo 'building windows executable...'
env GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o vintpm_windows_amd64.exe
@echo 'shrinking build...'
./upx --brute binaries/vintpm_windows_amd64.exe
build_mac:
@echo 'building mac binary...'
env GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o vintpm
@echo 'shrinking binary...'
./upx --brute vintpm
@echo 'zipping build...'
tar -zcvf binaries/vintpm_mac_amd64.tar.gz vintpm
@echo 'cleaning up...'
rm vintpm
build_android:
@echo 'building android binary'
env GOOS=android GOARCH=arm64 go build -ldflags="-s -w" -o vintpm
@echo 'zipping build...'
tar -zcvf binaries/vintpm_android_arm64.tar.gz vintpm
@echo 'cleaning up...'
rm vintpm
build_test:
go build -ldflags="-s -w" -o vintpm
dependencies:
@echo 'checking dependencies...'
go mod tidy
test:
@echo -e '\nTesting Lexer...'
@./gotest --format testname ./lexer/
@echo -e '\nTesting Parser...'
@./gotest --format testname ./parser/
@echo -e '\nTesting AST...'
@./gotest --format testname ./ast/
@echo -e '\nTesting Object...'
@./gotest --format testname ./object/
@echo -e '\nTesting Evaluator...'
@./gotest --format testname ./evaluator/
clean:
go clean