]> git.meshlink.io Git - catta/blob - avahi-daemon/Makefile.am
0dadede2d2981ad81adad3193579a95b0d95c008
[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 dbusservicedir=$(DBUS_SYS_DIR)
32
33 AM_CFLAGS+= \
34         -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
35         -DAVAHI_SOCKET=\"$(avahi_socket)\" \
36         -DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
37         -DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
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         ini-file-parser.c ini-file-parser.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 avahi_daemon_SOURCES += \
87         dbus-protocol.c dbus-protocol.h \
88         dbus-util.c dbus-util.h \
89         dbus-internal.h \
90         dbus-async-address-resolver.c \
91         dbus-async-host-name-resolver.c \
92         dbus-async-service-resolver.c \
93         dbus-domain-browser.c \
94         dbus-entry-group.c \
95         dbus-service-browser.c \
96         dbus-service-type-browser.c \
97         dbus-sync-address-resolver.c \
98         dbus-sync-host-name-resolver.c \
99         dbus-sync-service-resolver.c    
100
101 avahi_daemon_LDADD += \
102         ../avahi-common/libdbus-common.la \
103         $(DBUS_LIBS)
104
105 avahi_daemon_CFLAGS += $(DBUS_CFLAGS)
106
107 dbusservice_DATA = avahi-dbus.conf
108
109 introspection_DATA = \
110         Server.introspect \
111         EntryGroup.introspect \
112         DomainBrowser.introspect \
113         ServiceTypeBrowser.introspect \
114         ServiceBrowser.introspect \
115         ServiceResolver.introspect \
116         AddressResolver.introspect \
117         HostNameResolver.introspect
118
119 endif
120 endif
121 endif
122
123 EXTRA_DIST = \
124         avahi-service.dtd \
125         avahi-daemon.conf \
126         example.service \
127         dbus-test.py \
128         avahi-dbus.conf \
129         Server.introspect \
130         EntryGroup.introspect \
131         DomainBrowser.introspect \
132         ServiceTypeBrowser.introspect \
133         ServiceBrowser.introspect \
134         ServiceResolver.introspect \
135         AddressResolver.introspect \
136         HostNameResolver.introspect \
137         ssh.service \
138         example.service \
139         introspect.dtd \
140         introspect.xsl
141
142 xmllint:
143         xmllint --noout --valid example.service
144         for F in $(introspection_DATA) ; do \
145                 xmllint --noout --valid $$F ; \
146         done