Adds standard clean target to remove binary, output files, and profile directory. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
27 lines
603 B
Makefile
27 lines
603 B
Makefile
BINARY_NAME=lambda
|
|
|
|
.PHONY: it run profile explain graph clean
|
|
|
|
it:
|
|
@ go build -o ${BINARY_NAME} ./cmd/lambda
|
|
|
|
TEST=simple
|
|
|
|
run: it
|
|
@ ./lambda - < ./samples/$(TEST).txt > program.out
|
|
|
|
profile: it
|
|
@ ./lambda -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
|
|
|
|
explain: it
|
|
@ ./lambda -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
|
|
@ echo "Profile graph saved to 'file://profile/cpu.svg'"
|
|
|
|
clean:
|
|
rm -f ${BINARY_NAME} program.out
|
|
rm -rf profile/
|