summaryrefslogtreecommitdiffstats
path: root/hcid/Makefile.am
blob: 3a5e766ab212d575ad3b10857f32f075c8459b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
#  $Id$
#

sbin_PROGRAMS = hcid

if DBUS
dbus_hcid_sources = dbus.c
dbus_hcid_ldflags = @DBUS_LIBS@
else
dbus_hcid_sources =
dbus_hcid_ldflags =
endif

hcid_SOURCES = main.c security.c hcid.h lib.c lib.h parser.h parser.y lexer.l kword.h kword.c glib-ectomy.h glib-ectomy.c $(dbus_hcid_sources)
hcid_CONFIG  = hcid.conf

LDFLAGS = $(dbus_hcid_ldflags) @BLUEZ_LIBS@

INCLUDES = @BLUEZ_INCLUDES@ @DBUS_INCLUDES@

man_MANS = hcid.8 hcid.conf.5

YFLAGS   = -d

CLEANFILES = lexer.c parser.c parser.h

EXTRA_DIST = $(hcid_CONFIG) $(man_MANS) dbus.c

#
# Install configuration files
# 
confdir   = $(sysconfdir)/bluetooth
conf_FILE = $(confdir)/$(hcid_CONFIG)
pin_FILE  = $(confdir)/pin

install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(confdir)
	[ -f $(DESTDIR)$(conf_FILE) ] || \
		$(INSTALL_DATA) $(srcdir)/$(hcid_CONFIG) $(DESTDIR)$(conf_FILE)
	[ -f $(DESTDIR)$(pin_FILE) ]  || \
		echo "BlueZ" > $(DESTDIR)$(pin_FILE); \
		chmod 600 $(DESTDIR)$(pin_FILE)