6 initdir ?
= /etc
/rc.d
/init.d
7 xdgautostartdir ?
= /etc
/xdg
/autostart
8 gdmautostartdir ?
= /usr
/share
/gdm
/autostart
/LoginWindow
9 socketdir ?
= /var
/run
/spice-vdagentd
10 logdir ?
= /var
/log
/spice-vdagentd
12 CFLAGS ?
= -O2
-g
-Wall
13 CPPFLAGS
= $(shell pkg-config
--cflags spice-protocol
)
14 CPPFLAGS
+= $(shell pkg-config
--cflags dbus-1
)
15 CPPFLAGS
+= -D_GNU_SOURCE
17 TARGETS
:= spice-vdagentd spice-vdagent
22 install -d
$(DESTDIR
)$(bindir)
23 install -d
$(DESTDIR
)$(sbindir
)
24 install -d
$(DESTDIR
)$(socketdir
)
25 install -d
$(DESTDIR
)$(logdir
)
26 install -p
-m
755 spice-vdagent
$(DESTDIR
)$(bindir)
27 install -p
-m
755 spice-vdagentd
$(DESTDIR
)$(sbindir
)
28 install -d
$(DESTDIR
)$(initdir
)
29 install -p
-m
755 spice-vdagentd.sh
$(DESTDIR
)$(initdir
)/spice-vdagentd
30 install -d
$(DESTDIR
)$(xdgautostartdir
)
31 install -d
$(DESTDIR
)$(gdmautostartdir
)
32 desktop-file-install
--dir=$(DESTDIR
)$(xdgautostartdir
) \
34 desktop-file-install
--dir=$(DESTDIR
)$(gdmautostartdir
) \
38 rm -f
$(TARGETS
) *.o
*~
40 spice-vdagentd
: vdagentd.o vdagentd-uinput.o udscs.o vdagent-virtio-port.o console-kit.o
41 $(CC
) -o
$@
$^
$(shell pkg-config
--libs dbus-1
)
43 spice-vdagent
: vdagent.o vdagent-x11.o udscs.o
44 $(CC
) -o
$@
$^
-lX11
-lXrandr
-lXfixes
47 @git tag
-a
-m
"Tag as spice-vdagent-$(VERSION)" spice-vdagent-
$(VERSION
)
48 @echo
"Tagged as spice-vdagent-$(VERSION)"
51 @git archive
--format
=tar --prefix=spice-vdagent-
$(VERSION
)/ spice-vdagent-
$(VERSION
) > spice-vdagent-
$(VERSION
).
tar
52 @bzip2
-f spice-vdagent-
$(VERSION
).
tar
54 archive
: clean tag archive-no-tag