5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-03 01:17:58 +03:00
qemu-server/qmeventd/Makefile
Thomas Lamprecht 8752e5a3ec move qmeventd to own directory
It's really not nice if such many files, source code, meta-files, …
linger around in the top level directory..

Also, cleanup the build a bit, i.e., use LDFLAGS as dpkg-buildpackage
can set some LDFLAGS so it'd be nice if both CFLAFGS and LDFLAGS have
the same (related) ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-09-24 18:57:54 +02:00

32 lines
773 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)
LDFLAGS += $(shell pkg-config --libs json-c)
qmeventd: qmeventd.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
docs: qmeventd.8
.PHONY: install
install: qmeventd docs
install -d ${DESTDIR}/${SBINDIR}
install -d ${DESTDIR}${SERVICEDIR}
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