]> git.meshlink.io Git - catta/blob - avahi-daemon/Makefile.am
* only create DBUS_SYS_DIR if HAVE_DBUS
[catta] / avahi-daemon / Makefile.am
1 # $Id$
2 #
3 # This file is part of avahi.
4
5 # avahi is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation; either version 2 of the
8 # License, or (at your option) any later version.
9 #
10 # avahi is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 # License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with avahi; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA.
19
20 AM_CFLAGS=-I$(top_srcdir)
21
22 # This cool debug trap works on i386/gcc only
23 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
24
25 if HAVE_LIBDAEMON
26 if HAVE_EXPAT
27
28 pkgsysconfdir=$(sysconfdir)/avahi
29 servicedir=$(pkgsysconfdir)/services
30 introspectiondir=$(pkgdatadir)/introspection
31
32 AM_CFLAGS+= \
33         -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
34         -DAVAHI_SOCKET=\"$(avahi_socket)\" \
35         -DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
36         -DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
37         -DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
38         -DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
39
40 sbin_PROGRAMS = \
41         avahi-daemon
42
43 if ENABLE_TESTS
44 noinst_PROGRAMS = \
45         ini-file-parser-test
46 endif
47
48 avahi_daemon_SOURCES = \
49         main.c main.h \
50         simple-protocol.c simple-protocol.h \
51         static-services.c static-services.h \
52         ini-file-parser.c ini-file-parser.h \
53         setproctitle.c setproctitle.h
54
55 avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS)
56 avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) -lexpat
57
58 ini_file_parser_test_SOURCES = \
59         ini-file-parser.c ini-file-parser.h \
60         ini-file-parser-test.c
61
62 ini_file_parser_test_CFLAGS = $(AM_CFLAGS)
63 ini_file_parser_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la 
64
65 pkgsysconf_DATA = \
66         avahi-daemon.conf
67
68 service_DATA = \
69         ssh.service
70
71 pkgdata_DATA = \
72         avahi-service.dtd
73
74 if ENABLE_CHROOT
75
76 avahi_daemon_SOURCES += \
77         chroot.c chroot.h \
78         caps.c caps.h
79
80 avahi_daemon_LDADD += -lcap
81
82 endif
83
84 if HAVE_DBUS
85
86 dbusservicedir=$(DBUS_SYS_DIR)
87
88 avahi_daemon_SOURCES += \
89         dbus-protocol.c dbus-protocol.h \
90         dbus-util.c dbus-util.h \
91         dbus-internal.h \
92         dbus-async-address-resolver.c \
93         dbus-async-host-name-resolver.c \
94         dbus-async-service-resolver.c \
95         dbus-domain-browser.c \
96         dbus-entry-group.c \
97         dbus-service-browser.c \
98         dbus-service-type-browser.c \
99         dbus-sync-address-resolver.c \
100         dbus-sync-host-name-resolver.c \
101         dbus-sync-service-resolver.c \
102         dbus-record-browser.c  \
103         ../avahi-common/dbus.c ../avahi-common/dbus.h \
104         ../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
105
106 avahi_daemon_LDADD += \
107         $(DBUS_LIBS)
108
109 avahi_daemon_CFLAGS += $(DBUS_CFLAGS)
110
111 dbusservice_DATA = avahi-dbus.conf
112
113 introspection_DATA = \
114         Server.introspect \
115         EntryGroup.introspect \
116         DomainBrowser.introspect \
117         ServiceTypeBrowser.introspect \
118         ServiceBrowser.introspect \
119         ServiceResolver.introspect \
120         AddressResolver.introspect \
121         HostNameResolver.introspect \
122         RecordBrowser.introspect
123
124 endif
125 endif
126 endif
127
128 EXTRA_DIST = \
129         avahi-service.dtd \
130         avahi-daemon.conf \
131         example.service \
132         avahi-dbus.conf \
133         Server.introspect \
134         EntryGroup.introspect \
135         DomainBrowser.introspect \
136         ServiceTypeBrowser.introspect \
137         ServiceBrowser.introspect \
138         ServiceResolver.introspect \
139         AddressResolver.introspect \
140         HostNameResolver.introspect \
141         RecordBrowser.introspect \
142         ssh.service \
143         example.service \
144         introspect.dtd \
145         introspect.xsl
146
147 xmllint:
148         xmllint --noout --valid example.service
149         for F in $(introspection_DATA) ; do \
150                 xmllint --noout --valid $$F ; \
151         done