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