-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (56 loc) · 1.66 KB
/
Makefile
File metadata and controls
66 lines (56 loc) · 1.66 KB
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
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_wasm:
@echo 'building wasm binary'
GOOS=js GOARCH=wasm go build -o nuru.wasm
@echo 'zipping build...'
tar -zcvf nuru_wasm_v${VERSION}.tar.gz nuru.wasm
@echo 'cleaning up...'
rm nuru.wasm
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