From cdb75d3fcbc9339b897f8c6ff4d69a577f017393 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Tue, 8 Jul 2025 23:26:05 +0100 Subject: Rewrite in Go --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2a9c96b --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +BINARY_NAME=scrapbook +SYS_CONF_DIR=/etc/scrapbook +SYS_CONF_DIR=/var/lib/scrapbook + +all: build + +build: + go build -ldflags "-X 'github.com/LMBishop/scrapbook/pkg/constants.SysConfDir=${SYS_CONF_DIR}' -X 'github.com/LMBishop/scrapbook/pkg/constants.SysDataDir=${SYS_DATA_DIR}'" -o ${BINARY_NAME} main.go + +runlocal: + PWD=$(shell pwd) + mkdir -p out + go build -ldflags "-X 'github.com/LMBishop/scrapbook/pkg/constants.SysConfDir=${PWD}/out/config' -X 'github.com/LMBishop/scrapbook/pkg/constants.SysDataDir=${PWD}/out/data'" -o out/${BINARY_NAME} main.go + cd out; ./${BINARY_NAME} + +clean: + go clean + rm ${BINARY_NAME} \ No newline at end of file -- cgit v1.2.3-70-g09d2