mirror of
https://github.com/tavo-wasd-gh/conex-builder.git
synced 2025-06-07 04:03:29 -06:00
30 lines
489 B
Makefile
30 lines
489 B
Makefile
BIN = builder
|
|
SRCDIR = server
|
|
SRC = ${SRCDIR}/main.go
|
|
GOFILES = ${SRCDIR}/go.sum ${SRCDIR}/go.mod
|
|
GOMODS = github.com/joho/godotenv github.com/lib/pq
|
|
|
|
all: ${BIN}
|
|
|
|
${BIN}: ${SRC} ${GOFILES}
|
|
(cd ${SRCDIR} && go build -o ../${BIN})
|
|
|
|
${GOFILES}:
|
|
(cd ${SRCDIR} && go mod init ${BIN})
|
|
(cd ${SRCDIR} && go get ${GOMODS})
|
|
|
|
start: ${BIN}
|
|
@./$< &
|
|
|
|
stop:
|
|
-@pkill -SIGTERM ${BIN} || true
|
|
|
|
restart: stop start
|
|
|
|
clean-all: clean clean-mods
|
|
|
|
clean:
|
|
rm -f ${BIN}
|
|
|
|
clean-mods:
|
|
rm -f ${SRCDIR}/go.*
|