Files
lambda/Makefile
2026-01-10 18:28:18 -05:00

28 lines
697 B
Makefile

BINARY_NAME=lambda.exe
.PHONY: it run profile explain graph docs
it:
@ go build -o ${BINARY_NAME} ./cmd/lambda
@ chmod +x ${BINARY_NAME}
TEST=simple
run: it
@ ./lambda.exe - < ./samples/$(TEST).txt > program.out
profile: it
@ ./lambda.exe -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
explain: it
@ ./lambda.exe -x -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
graph:
@ go tool pprof -raw -output=profile/cpu.raw profile/cpu.prof
@ go tool pprof -svg profile/cpu.prof > profile/cpu.svg
@ open profile/cpu.svg
docs:
@ echo ">>> View at 'http://localhost:6060/pkg/git.maximhutz.com/max/lambda/'"
@ go run golang.org/x/tools/cmd/godoc@latest -http=:6060