Update README
[vd_agent/hramrach.git] / Makefile
blobdc48046f9875be4b275189aebf406d95b1808a9a
2 DESTDIR ?=
3 sbindir ?= /sbin
4 bindir ?= /usr/bin
5 udevdir ?= /lib/udev/rules.d
6 xdgautostartdir ?= /etc/xdg/autostart
7 gdmautostartdir ?= /usr/share/gdm/autostart/LoginWindow
9 CFLAGS ?= -O2 -g -Wall
10 CPPFLAGS = $(shell pkg-config --cflags spice-protocol)
11 CPPFLAGS += $(shell pkg-config --cflags dbus-1)
12 CPPFLAGS += -D_GNU_SOURCE
14 TARGETS := spice-vdagentd spice-vdagent
16 build: $(TARGETS)
18 install: build
19 install -d $(DESTDIR)$(bindir)
20 install -d $(DESTDIR)$(sbindir)
21 install -p -m 755 spice-vdagent $(DESTDIR)$(bindir)
22 install -p -m 755 spice-vdagentd $(DESTDIR)$(sbindir)
23 install -d $(DESTDIR)$(udevdir)
24 install -p -m 644 *.rules $(DESTDIR)$(udevdir)
25 install -d $(DESTDIR)$(xdgautostartdir)
26 install -d $(DESTDIR)$(gdmautostartdir)
27 desktop-file-install --dir=$(DESTDIR)$(xdgautostartdir) \
28 spice-vdagent.desktop
29 desktop-file-install --dir=$(DESTDIR)$(gdmautostartdir) \
30 spice-vdagent.desktop
32 clean:
33 rm -f $(TARGETS) *.o *~
35 spice-vdagentd: vdagentd.o vdagentd-uinput.o udscs.o vdagent-virtio-port.o console-kit.o
36 $(CC) -o $@ $^ $(shell pkg-config --libs dbus-1)
38 spice-vdagent: vdagent.o vdagent-x11.o udscs.o
39 $(CC) -o $@ $^ -lX11 -lXrandr -lXfixes