5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-22 13:34:06 +03:00
qemu-server/qmeventd/Makefile
Thomas Lamprecht 654553a973 qmeventd: fix linker flags order
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-11 18:02:18 +01:00

33 lines
828 B
Makefile

DESTDIR=
PREFIX=/usr
SBINDIR=${PREFIX}/sbin
SERVICEDIR=/lib/systemd/system
MANDIR=${PREFIX}/share/man
export NOVIEW=1
include /usr/share/pve-doc-generator/pve-doc-generator.mk
CC ?= gcc
CFLAGS += -O2 -Werror -Wall -Wextra -Wpedantic -Wtype-limits -Wl,-z,relro -std=gnu11
CFLAGS += $(shell pkg-config --cflags json-c glib-2.0)
LDFLAGS += $(shell pkg-config --libs json-c glib-2.0)
qmeventd: qmeventd.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
docs: qmeventd.8
.PHONY: install
install: qmeventd docs
install -d ${DESTDIR}/${SBINDIR}
install -d ${DESTDIR}${SERVICEDIR}
install -d ${DESTDIR}${MANDIR}/man8
install -m 0644 qmeventd.service ${DESTDIR}${SERVICEDIR}
install -m 0755 qmeventd ${DESTDIR}${SBINDIR}
install -m 0644 qmeventd.8 ${DESTDIR}/${MANDIR}/man8
.PHONY: clean
clean:
$(MAKE) cleanup-docgen
rm -rf qmeventd