1 # This file is part of avahi.
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.
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.
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
18 AM_CFLAGS=-I$(top_srcdir)
20 # This cool debug trap works on i386/gcc only
21 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
26 pkgsysconfdir=$(sysconfdir)/avahi
27 servicedir=$(pkgsysconfdir)/services
28 introspectiondir=$(datadir)/dbus-1/interfaces
29 dbussystemservicesdir=$(datadir)/dbus-1/system-services
32 -DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
33 -DAVAHI_SOCKET=\"$(avahi_socket)\" \
34 -DAVAHI_SERVICE_DIR=\"$(servicedir)\" \
35 -DAVAHI_CONFIG_FILE=\"$(pkgsysconfdir)/avahi-daemon.conf\" \
36 -DAVAHI_HOSTS_FILE=\"$(pkgsysconfdir)/hosts\" \
37 -DAVAHI_DBUS_INTROSPECTION_DIR=\"$(introspectiondir)\" \
38 -DAVAHI_CONFIG_DIR=\"$(pkgsysconfdir)\"
48 avahi_daemon_SOURCES = \
50 simple-protocol.c simple-protocol.h \
51 static-services.c static-services.h \
52 static-hosts.c static-hosts.h \
53 ini-file-parser.c ini-file-parser.h \
54 setproctitle.c setproctitle.h \
55 sd-daemon.h sd-daemon.c \
56 ../avahi-client/check-nss.c
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)
61 ini_file_parser_test_SOURCES = \
62 ini-file-parser.c ini-file-parser.h \
63 ini-file-parser-test.c
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
79 %.service: %.service.in
80 $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
83 $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' \
84 -e 's,@avahi_runtime_dir\@,$(avahi_runtime_dir),g' $< > $@
87 systemdsystemunit_DATA = \
88 avahi-daemon.service \
91 dist_dbussystemservices_DATA = \
92 org.freedesktop.Avahi.service
95 CLEANFILES = $(systemdsystemunit_DATA)
99 avahi_daemon_SOURCES += \
103 avahi_daemon_LDADD += -lcap
108 avahi_daemon_LDADD += -ldl
113 dbusservicedir=$(DBUS_SYS_DIR)
115 avahi_daemon_SOURCES += \
116 dbus-protocol.c dbus-protocol.h \
117 dbus-util.c dbus-util.h \
119 dbus-async-address-resolver.c \
120 dbus-async-host-name-resolver.c \
121 dbus-async-service-resolver.c \
122 dbus-domain-browser.c \
124 dbus-service-browser.c \
125 dbus-service-type-browser.c \
126 dbus-sync-address-resolver.c \
127 dbus-sync-host-name-resolver.c \
128 dbus-sync-service-resolver.c \
129 dbus-record-browser.c \
130 ../avahi-common/dbus.c ../avahi-common/dbus.h \
131 ../avahi-common/dbus-watch-glue.c ../avahi-common/dbus-watch-glue.h
133 avahi_daemon_LDADD += \
136 avahi_daemon_CFLAGS += $(DBUS_CFLAGS) -DDBUS_SYSTEM_BUS_DEFAULT_ADDRESS=\"$(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)\"
138 dist_dbusservice_DATA = avahi-dbus.conf
140 dist_introspection_DATA = \
141 org.freedesktop.Avahi.Server.xml \
142 org.freedesktop.Avahi.EntryGroup.xml \
143 org.freedesktop.Avahi.DomainBrowser.xml \
144 org.freedesktop.Avahi.ServiceTypeBrowser.xml \
145 org.freedesktop.Avahi.ServiceBrowser.xml \
146 org.freedesktop.Avahi.ServiceResolver.xml \
147 org.freedesktop.Avahi.AddressResolver.xml \
148 org.freedesktop.Avahi.HostNameResolver.xml \
149 org.freedesktop.Avahi.RecordBrowser.xml
162 avahi-daemon.service.in \
163 avahi-daemon.socket.in
166 xmllint --noout --valid example.service
167 for F in $(introspection_DATA) ; do \
168 xmllint --noout --valid $$F ; \
172 test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
175 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
176 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h