-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmakefile
More file actions
50 lines (36 loc) · 1.35 KB
/
makefile
File metadata and controls
50 lines (36 loc) · 1.35 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
all: test lint gofumpt buildme mkdocs
buildme:
go mod tidy
go build -tags=cli -o build/l2 -ldflags "-X main.version=`git tag --sort=-version:refname | head -n 1`" l2.go
debug:
go mod tidy
go build -tags=cli -gcflags=all="-N -l" -ldflags=-w -ldflags=-compressdwarf=false
echo "\033[31m(1) At localhost:8081, set gdbserver address as localhost:8082;\n(2) Also run "monitor exit" from gdb client to terminate the server\033[0m"
-pkill -9 gdbgui && true
gdbgui -p 8081&
gdbserver localhost:8082 ./lama2 -o blah.json -vvv elfparser/ElfTestSuite/n_0003_404.l2
getsnippet:
wget https://raw.githubusercontent.com/HexmosTech/httpsnippet/cdn/build/httpsnippet-bundle.js -O codegen/httpsnippet.js
lint:
golangci-lint run --disable-all -E revive ./...
gofumpt:
gofumpt -w .
test:
make buildme
go test -tags=cli ./tests/ -count=1 -v
benchmark:
go test -bench=. -count 1 -run=^# -benchmem ./tests/
mkdocs:
cd docs/Lama2; ./build.sh
serve:
cd docs/Lama2; ./serve.sh
rnotes:
./releasenotes.sh `git tag --sort=-version:refname | sed -n '2p'` `git tag --sort=-version:refname | head -n 1`
clean:
rm -rf build/*
setbuild:
# Use for clearing exising L2 and set built L2 as global
go mod tidy
go build -tags=cli -o build/l2 -ldflags "-X main.version=`git tag --sort=-version:refname | head -n 1`" l2.go
sudo rm -rf /usr/local/bin/l2
sudo cp build/l2 /usr/local/bin/l2