[Makefile] Updated.
This commit is contained in:
parent
7f9e3bbc66
commit
5ef2d85eac
20
Makefile
20
Makefile
@ -1,13 +1,9 @@
|
|||||||
TARGET=httpprocwatchd
|
TARGET=httpprocwatchd
|
||||||
|
|
||||||
SYSCTL=${shell which systemctl}
|
SYSCTL=${shell which systemctl}
|
||||||
|
SYSDDIR=${shell pkg-config systemd --variable=systemdsystemunitdir}
|
||||||
DESTDIR=/
|
DESTDIR=/
|
||||||
|
|
||||||
INSTALL_BINDIR=${DESTDIR}usr/bin
|
|
||||||
INSTALL_CONFIGDIR=${DESTDIR}etc/${TARGET}
|
|
||||||
INSTALL_SYSDSERVICEDIR=${DESTDIR}${shell pkg-config systemd --variable=systemdsystemunitdir}
|
|
||||||
INSTALL_LICENSEDIR=${DESTDIR}usr/share/licenses/${TARGET}
|
|
||||||
|
|
||||||
LDFLAGS=-ldflags "-s -w"
|
LDFLAGS=-ldflags "-s -w"
|
||||||
|
|
||||||
SOURCES := ${wildcard *.go}
|
SOURCES := ${wildcard *.go}
|
||||||
@ -18,21 +14,21 @@ ${TARGET}: ${SOURCES}
|
|||||||
go build ${LDFLAGS}
|
go build ${LDFLAGS}
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -Dm 0755 ${TARGET} ${INSTALL_BINDIR}/${TARGET}
|
install -Dm 0755 ${TARGET} ${DESTDIR}usr/bin/${TARGET}
|
||||||
install -Dm 0644 contrib/config.example.conf ${INSTALL_CONFIGDIR}/config.conf
|
install -Dm 0644 contrib/config.example.conf ${DESTDIR}etc/${TARGET}/config.conf
|
||||||
install -Dm 0644 LICENSE ${INSTALL_LICENSEDIR}/LICENSE
|
install -Dm 0644 LICENSE ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE
|
||||||
|
|
||||||
install-service:
|
install-service:
|
||||||
install -Dm 0644 contrib/systemd/${TARGET}.service ${INSTALL_SYSDSERVICEDIR}/${TARGET}.service
|
install -Dm 0644 contrib/systemd/${TARGET}.service ${DESTDIR}${SYSDDIR}/${TARGET}.service
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm ${INSTALL_BINDIR}/${TARGET}
|
rm ${DESTDIR}usr/bin/${TARGET}
|
||||||
rm ${INSTALL_LICENSEDIR}/LICENSE
|
rm ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE
|
||||||
|
|
||||||
uninstall-service:
|
uninstall-service:
|
||||||
${SYSCTL} stop ${TARGET}.service
|
${SYSCTL} stop ${TARGET}.service
|
||||||
${SYSCTL} disable ${TARGET}.service
|
${SYSCTL} disable ${TARGET}.service
|
||||||
rm ${INSTALL_SYSDSERVICEDIR}/${TARGET}.service
|
rm ${DESTDIR}${SYSDDIR}/${TARGET}.service
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean
|
go clean
|
Loading…
Reference in New Issue
Block a user