From 59ea41ed74c9a5c329c5ad5944e40de9a3b590f3 Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Sun, 18 Aug 2024 01:22:28 -0600 Subject: [PATCH] pimp makefile --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dcb34cf..8f2d9da 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,17 @@ BIN = builder SRC = main.go +GOFILES = go.sum go.mod GOMODS = github.com/joho/godotenv all: ${BIN} -${BIN}: ${SRC} +${BIN}: ${SRC} ${GOFILES} go build -o $@ +${GOFILES}: + go mod init ${BIN} + go get ${GOMODS} + run: ${BIN} @./$< & @@ -15,9 +20,7 @@ stop: restart: stop run -bootstrap: - go mod init ${BIN} - go get ${GOMODS} +clean-all: clean clean-mods clean: rm -f ${BIN}