remove unused header
[poetteringd.git] / Makefile
blob655f74c4eaec2d347f373f75f57ffd3cffa5e977
1 PREFIX?= /usr/local
2 BINDIR= ${PREFIX}/libexec
3 SHAREDIR= ${PREFIX}/share
4 EXAMPLEDIR= ${SHAREDIR}/examples/poetteringd
5 POLKITDIR= ${SHAREDIR}/polkit-1/actions
6 DBUSDIR= ${SHAREDIR}/dbus-1/system-services
8 PROG= poetteringd
9 SRCS= hostnamed.c main.c timedated.c utils.c rc.c \
10 hostname1-generated.c timedate1-generated.c \
11 systemd1-generated.c systemd.c
13 CLEANFILES+= hostname1-generated.c \
14 hostname1-generated.h \
15 timedate1-generated.c \
16 timedate1-generated.h \
17 systemd1-generated.c \
18 systemd1-generated.h
19 NOMAN= 1
21 VERSION= 0.1
23 CFLAGS+= -g -Wall
24 CFLAGS+= -DVERSION="\"${VERSION}\""
25 CFLAGS+= -DSYSCONFDIR="\"/etc\""
26 CFLAGS+= -DPIDFILE="\"/var/run/poetteringd.pid\""
27 CFLAGS+= -I${.OBJDIR}
28 CFLAGS+= `pkg-config --cflags glib-2.0 polkit-gobject-1 polkit-agent-1 dbus-1 gio-unix-2.0 libdaemon`
30 LDADD+= `pkg-config --libs glib-2.0 polkit-gobject-1 polkit-agent-1 dbus-1 libdaemon`
32 GDBUS_CODEGEN= /usr/local/bin/gdbus-codegen
34 INSTALL_DIR= install -d -o root -g wheel -m 755
35 INSTALL_DATA= install -c -S -o root -g wheel -m 644
37 hostname1-generated.h: data/org.freedesktop.hostname1.xml
38 $(GDBUS_CODEGEN) \
39 --interface-prefix org.freedesktop. \
40 --c-namespace PoetteringdHostnamed \
41 --generate-c-code hostname1-generated \
42 ${.CURDIR}/data/org.freedesktop.hostname1.xml
44 timedate1-generated.h: data/org.freedesktop.timedate1.xml
45 $(GDBUS_CODEGEN) \
46 --interface-prefix org.freedesktop. \
47 --c-namespace PoetteringdTimedated \
48 --generate-c-code timedate1-generated \
49 ${.CURDIR}/data/org.freedesktop.timedate1.xml
51 systemd1-generated.h: data/org.freedesktop.systemd1.xml
52 $(GDBUS_CODEGEN) \
53 --interface-prefix org.freedesktop. \
54 --c-namespace PoetteringdSystemd \
55 --generate-c-code systemd1-generated \
56 ${.CURDIR}/data/org.freedesktop.systemd1.xml
58 hostname1-generated.c: hostname1-generated.h
59 timedate1-generated.c: timedate1-generated.h
60 systemd1-generated.c: systemd1-generated.h
62 hostnamed.o: hostname1-generated.h
63 timedated.o: timedate1-generated.h
65 afterinstall:
66 ${INSTALL_DIR} -d ${DESTDIR}${DBUSDIR} ${DESTDIR}${EXAMPLEDIR} \
67 ${DESTDIR}${POLKITDIR}
68 .for _p in hostname1 timedate1 systemd1
69 ${INSTALL_DATA} ${.CURDIR}/data/org.freedesktop.${_p}.policy \
70 ${DESTDIR}${POLKITDIR}
72 sed -e 's,@libexecdir@,${BINDIR},g' ${.CURDIR}/data/org.freedesktop.${_p}.service.in > \
73 ${DESTDIR}${DBUSDIR}/org.freedesktop.${_p}.service
74 .endfor
75 ${INSTALL_DATA} ${.CURDIR}/data/poetteringd.conf \
76 ${DESTDIR}${EXAMPLEDIR}
78 .include <bsd.prog.mk>