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