forked from arr-ai/arrai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (27 loc) · 784 Bytes
/
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
include VersionReport.mk
.PHONY: all
all: lint test wasm
.PHONY: parser
parser: syntax/parser.go
syntax/parser.go: tools/parser/generate_parser.go syntax/arrai.wbnf
go run $^ $@
build: parser
go build -ldflags=$(LDFLAGS) ./cmd/arrai
wasm: parser
GOOS=js GOARCH=wasm go build -o /tmp/arrai.wasm ./cmd/arrai
install: parser
go install -ldflags=$(LDFLAGS) ./cmd/arrai
[ -f $$(dirname $$(which arrai))/ai ] || ln -s arrai $$(dirname $$(which arrai))/ai
[ -f $$(dirname $$(which arrai))/ax ] || ln -s arrai $$(dirname $$(which arrai))/ax
tidy:
go mod tidy
gofmt -s -w .
goimports -w .
lint: parser
golangci-lint run
test: parser
go test $(GOTESTFLAGS) -tags timingsensitive ./...
GOARCH=386 go build ./...
make build && ./arrai test
docker:
docker build . -t arrai