-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathMakefile
57 lines (49 loc) · 1.46 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
VERSION=0.5.1
build_linux:
@echo 'building linux binary...'
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o nuru
@echo 'shrinking binary...'
./upx --brute nuru
@echo 'zipping build....'
tar -zcvf nuru_linux_amd64_v${VERSION}.tar.gz nuru
@echo 'cleaning up...'
rm nuru
build_windows:
@echo 'building windows executable...'
env GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o nuru_windows_amd64_v${VERSION}.exe
@echo 'shrinking build...'
./upx --brute nuru_windows_amd64_v${VERSION}.exe
build_mac:
@echo 'building mac binary...'
env GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o nuru
@echo 'shrinking binary...'
./upx --brute nuru
@echo 'zipping build...'
tar -zcvf nuru_mac_amd64_v${VERSION}.tar.gz nuru
@echo 'cleaning up...'
rm nuru
build_android:
@echo 'building android binary'
env GOOS=android GOARCH=arm64 go build -ldflags="-s -w" -o nuru
@echo 'zipping build...'
tar -zcvf nuru_android_arm64_v${VERSION}.tar.gz nuru
@echo 'cleaning up...'
rm nuru
build_test:
go build -ldflags="-s -w" -o nuru
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