You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
705 B
Makefile
41 lines
705 B
Makefile
.PHONY: dev build install image release profile bench test clean
|
|
|
|
CGO_ENABLED=0
|
|
COMMIT=$(shell git rev-parse --short HEAD)
|
|
|
|
all: dev
|
|
|
|
dev: build
|
|
@./monkey-lang -d
|
|
|
|
build: clean
|
|
@go build \
|
|
-tags "netgo static_build" -installsuffix netgo \
|
|
-ldflags "-w -X $(shell go list)/version/.GitCommit=$(COMMIT)" \
|
|
.
|
|
|
|
install: build
|
|
@go install
|
|
|
|
image:
|
|
@docker build -t prologic/monkey-lang .
|
|
|
|
release:
|
|
@./tools/release.sh
|
|
|
|
profile:
|
|
@go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench ./...
|
|
|
|
bench:
|
|
@go test -v -benchmem -bench=. ./...
|
|
|
|
test: build
|
|
@go test -v \
|
|
-cover -coverprofile=coverage.txt -covermode=atomic \
|
|
-coverpkg=$(shell go list) \
|
|
-race \
|
|
.
|
|
|
|
clean:
|
|
@git clean -f -d -X
|