A more sane variable names in Makefile.
This commit is contained in:
parent
4bff49fe2f
commit
4121ba9ad3
24
Makefile
24
Makefile
@ -1,5 +1,5 @@
|
||||
TARGET=justcaptcha
|
||||
DAEMON_NAME=${TARGET}d
|
||||
PACKAGE_NAME=justcaptcha
|
||||
TARGET=${PACKAGE_NAME}d
|
||||
|
||||
SYSCTL=${shell which systemctl}
|
||||
SYSDDIR_=${shell pkg-config systemd --variable=systemdsystemunitdir}
|
||||
@ -8,27 +8,27 @@ DESTDIR=/
|
||||
|
||||
LDFLAGS=-ldflags "-s -w" -tags osusergo,netgo
|
||||
|
||||
all: ${DAEMON_NAME}
|
||||
all: ${TARGET}
|
||||
|
||||
.PHONY: ${DAEMON_NAME}
|
||||
.PHONY: ${TARGET}
|
||||
|
||||
${DAEMON_NAME}:
|
||||
${TARGET}:
|
||||
go build -o bin/$@ ${LDFLAGS} cmd/$@/main.go
|
||||
|
||||
run-test:
|
||||
bin/${DAEMON_NAME} -expire 1m -listen 127.0.0.1:19134
|
||||
bin/${TARGET} -expire 1m -listen 127.0.0.1:19134
|
||||
|
||||
install:
|
||||
install -Dm 0755 bin/${DAEMON_NAME} ${DESTDIR}usr/bin/${DAEMON_NAME}
|
||||
install -Dm 0644 LICENSE ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE
|
||||
install -Dm 0755 bin/${TARGET} ${DESTDIR}usr/bin/${TARGET}
|
||||
install -Dm 0644 LICENSE ${DESTDIR}usr/share/licenses/${PACKAGE_NAME}/LICENSE
|
||||
|
||||
install -Dm 0644 init/systemd/${TARGET}.service ${DESTDIR}${SYSDDIR}/${TARGET}.service
|
||||
install -Dm 0644 init/systemd/${PACKAGE_NAME}.service ${DESTDIR}${SYSDDIR}/${PACKAGE_NAME}.service
|
||||
|
||||
uninstall:
|
||||
rm ${DESTDIR}usr/bin/${DAEMON_NAME}
|
||||
rm ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE
|
||||
rm ${DESTDIR}usr/bin/${TARGET}
|
||||
rm ${DESTDIR}usr/share/licenses/${PACKAGE_NAME}/LICENSE
|
||||
|
||||
rm ${DESTDIR}${SYSDDIR}/${TARGET}.service
|
||||
rm ${DESTDIR}${SYSDDIR}/${PACKAGE_NAME}.service
|
||||
|
||||
clean:
|
||||
go clean
|
||||
|
Loading…
Reference in New Issue
Block a user