]> git.meshlink.io Git - catta/blob - avahi-daemon/Makefile.am
Drop private inotify code
[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_XML
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_HOSTS_FILE=\"$(pkgsysconfdir)/hosts\" \
38         -DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
39         -DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
40
41 sbin_PROGRAMS = \
42         avahi-daemon
43
44 if ENABLE_TESTS
45 noinst_PROGRAMS = \
46         ini-file-parser-test
47 endif
48
49 avahi_daemon_SOURCES = \
50         main.c main.h \
51         simple-protocol.c simple-protocol.h \
52         static-services.c static-services.h \
53         static-hosts.c static-hosts.h \
54         ini-file-parser.c ini-file-parser.h \
55         setproctitle.c setproctitle.h \
56         ../avahi-client/check-nss.c
57
58 avahi_daemon_CFLAGS = $(AM_CFLAGS) $(LIBDAEMON_CFLAGS) $(XML_CFLAGS)
59 avahi_daemon_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la $(LIBDAEMON_LIBS) $(XML_LIBS)
60
61 ini_file_parser_test_SOURCES = \
62         ini-file-parser.c ini-file-parser.h \
63         ini-file-parser-test.c
64
65 ini_file_parser_test_CFLAGS = $(AM_CFLAGS)
66 ini_file_parser_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-core/libavahi-core.la 
67
68 pkgsysconf_DATA = \
69         avahi-daemon.conf \
70         hosts
71
72 service_DATA = \
73         ssh.service \
74         sftp-ssh.service
75
76 pkgdata_DATA = \
77         avahi-service.dtd
78
79 if ENABLE_CHROOT
80
81 avahi_daemon_SOURCES += \
82         chroot.c chroot.h \
83         caps.c caps.h
84
85 avahi_daemon_LDADD += -lcap
86
87 endif
88
89 if HAVE_DLOPEN
90 avahi_daemon_LDADD += -ldl
91 endif
92
93 if HAVE_DBUS
94
95 dbusservicedir=$(DBUS_SYS_DIR)
96
97 avahi_daemon_SOURCES += \
98         dbus-protocol.c dbus-protocol.h \
99         dbus-util.c dbus-util.h \
100         dbus-internal.h \
101         dbus-async-address-resolver.c \
102         dbus-async-host-name-resolver.c \
103         dbus-async-service-resolver.c \
104         dbus-domain-browser.c \
105         dbus-entry-group.c \
106         dbus-service-browser.c \
107         dbus-service-type-browser.c \
108         dbus-sync-address-resolver.c \
109         dbus-sync-host-name-resolver.c \
110         dbus-sync-service-resolver.c \
111         dbus-record-browser.c  \
112         ../avahi-common/dbus.c ../avahi-common/dbus.h \
113         ../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
114
115 avahi_daemon_LDADD += \
116         $(DBUS_LIBS)
117
118 avahi_daemon_CFLAGS += $(DBUS_CFLAGS) -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"$(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)\"
119
120 dbusservice_DATA = avahi-dbus.conf
121
122 introspection_DATA = \
123         Server.introspect \
124         EntryGroup.introspect \
125         DomainBrowser.introspect \
126         ServiceTypeBrowser.introspect \
127         ServiceBrowser.introspect \
128         ServiceResolver.introspect \
129         AddressResolver.introspect \
130         HostNameResolver.introspect \
131         RecordBrowser.introspect
132
133 endif
134 endif
135 endif
136
137 EXTRA_DIST = \
138         avahi-service.dtd \
139         avahi-daemon.conf \
140         example.service \
141         avahi-dbus.conf \
142         Server.introspect \
143         EntryGroup.introspect \
144         DomainBrowser.introspect \
145         ServiceTypeBrowser.introspect \
146         ServiceBrowser.introspect \
147         ServiceResolver.introspect \
148         AddressResolver.introspect \
149         HostNameResolver.introspect \
150         RecordBrowser.introspect \
151         ssh.service \
152         sftp-ssh.service \
153         hosts \
154         example.service \
155         introspect.dtd \
156         introspect.xsl
157
158 xmllint:
159         xmllint --noout --valid example.service
160         for F in $(introspection_DATA) ; do \
161                 xmllint --noout --valid $$F ; \
162         done
163
164 install-data-local:
165         test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"