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
20ACLOCAL_AMFLAGS = -I common
21
22include $(srcdir)/common/doxygen.mk
23
24EXTRA_DIST = \
25	autogen.sh \
26	bootstrap.sh \
27	LICENSE \
28	$(DX_CONFIG) \
29	docs/INSTALL \
30	docs/TODO \
31	docs/NEWS \
32	docs/README \
33	docs/DBUS-API \
34	docs/AUTHORS \
35	docs/HACKING \
36	docs/API-CHANGES-0.6 \
37	docs/COMPAT-LAYERS \
38	docs/MALLOC \
39	docs/overview.dia \
40	docs/server-states.dia \
41	docs/avahi-poll.dia \
42	avahi-core.pc.in \
43	avahi-client.pc.in \
44	avahi-glib.pc.in \
45	avahi-gobject.pc.in \
46	avahi-qt3.pc.in \
47	avahi-qt4.pc.in \
48	avahi-sharp.pc.in \
49	avahi-ui-sharp.pc.in \
50	avahi-compat-libdns_sd.pc.in \
51	avahi-compat-howl.pc.in \
52	avahi-ui.pc.in \
53	doxygen_to_devhelp.xsl
54
55SUBDIRS = \
56	common \
57	avahi-common \
58	avahi-core \
59	avahi-qt \
60	avahi-client \
61	avahi-glib \
62	avahi-gobject \
63	avahi-discover-standalone \
64	avahi-daemon \
65	avahi-sharp \
66	initscript \
67	avahi-dnsconfd \
68	avahi-utils \
69	avahi-python \
70	examples \
71	man \
72	tests \
73	service-type-database \
74	avahi-compat-libdns_sd \
75	avahi-compat-howl \
76	avahi-autoipd \
77	avahi-ui \
78	avahi-ui-sharp
79
80DX_INPUT = \
81	$(srcdir)/avahi-common/address.h \
82	$(srcdir)/avahi-common/malloc.h \
83	$(srcdir)/avahi-common/strlst.h \
84	$(srcdir)/avahi-common/alternative.h \
85	$(srcdir)/avahi-common/defs.h \
86	$(srcdir)/avahi-common/error.h \
87	$(srcdir)/avahi-common/domain.h \
88	$(srcdir)/avahi-common/watch.h \
89	$(srcdir)/avahi-common/simple-watch.h \
90	$(srcdir)/avahi-common/thread-watch.h
91
92DX_EXAMPLE_PATH = $(srcdir)/examples
93DX_EXAMPLE_PATTERNS = *.c
94
95if HAVE_QT3
96DX_INPUT += \
97	$(srcdir)/avahi-qt/qt-watch.h
98else
99if HAVE_QT4
100DX_INPUT += \
101	$(srcdir)/avahi-qt/qt-watch.h
102endif
103endif
104
105if HAVE_GLIB
106DX_INPUT += \
107	$(srcdir)/avahi-glib/glib-watch.h \
108	$(srcdir)/avahi-glib/glib-malloc.h
109
110if HAVE_GOBJECT
111if HAVE_DBUS
112DX_INPUT += \
113	$(srcdir)/avahi-gobject/ga-client.h \
114	$(srcdir)/avahi-gobject/ga-entry-group.h \
115	$(srcdir)/avahi-gobject/ga-enums.h \
116	$(srcdir)/avahi-gobject/ga-error.h \
117	$(srcdir)/avahi-gobject/ga-record-browser.h \
118	$(srcdir)/avahi-gobject/ga-service-browser.h \
119	$(srcdir)/avahi-gobject/ga-service-resolver.h
120endif
121endif
122endif
123
124if HAVE_DBUS
125DX_INPUT += \
126	$(srcdir)/avahi-client/client.h \
127	$(srcdir)/avahi-client/lookup.h \
128	$(srcdir)/avahi-client/publish.h
129endif
130
131if HAVE_DBUS
132if HAVE_GTK
133DX_INPUT += \
134	$(srcdir)/avahi-ui/avahi-ui.h
135endif
136endif
137
138if ENABLE_CORE_DOCS
139DX_INPUT += \
140	$(srcdir)/avahi-core/core.h \
141	$(srcdir)/avahi-core/lookup.h \
142	$(srcdir)/avahi-core/publish.h \
143	$(srcdir)/avahi-core/rr.h \
144	$(srcdir)/avahi-core/log.h
145endif
146
147if HAVE_GTK
148DX_INPUT += \
149	$(srcdir)/avahi-ui/avahi-ui.h
150endif
151
152pkgconfigdir = $(libdir)/pkgconfig
153pkgconfig_DATA = avahi-core.pc
154
155avahi-core.pc: avahi-core.pc.in
156	sed -e 's,@prefix\@,$(prefix),g' \
157	    -e 's,@libdir\@,$(libdir),g' \
158	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
159
160CLEANFILES = avahi-core.pc
161
162if HAVE_DBUS
163
164pkgconfig_DATA += avahi-client.pc
165
166avahi-client.pc: avahi-client.pc.in
167	sed -e 's,@prefix\@,$(prefix),g' \
168	    -e 's,@libdir\@,$(libdir),g' \
169	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
170
171CLEANFILES += avahi-client.pc
172
173if ENABLE_COMPAT_HOWL
174
175pkgconfig_DATA += avahi-compat-howl.pc
176
177avahi-compat-howl.pc: avahi-compat-howl.pc.in
178	sed -e 's,@prefix\@,$(prefix),g' \
179	    -e 's,@libdir\@,$(libdir),g' \
180	    -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' $< > $@
181
182CLEANFILES += avahi-compat-howl.pc
183
184endif
185
186if ENABLE_COMPAT_LIBDNS_SD
187
188pkgconfig_DATA += avahi-compat-libdns_sd.pc
189
190avahi-compat-libdns_sd.pc: avahi-compat-libdns_sd.pc.in
191	sed -e 's,@prefix\@,$(prefix),g' \
192	    -e 's,@libdir\@,$(libdir),g' \
193	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
194
195CLEANFILES += avahi-compat-libdns_sd.pc
196
197endif
198
199if HAVE_MONO
200
201pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
202
203avahi-sharp.pc: avahi-sharp.pc.in
204	sed -e 's,@prefix\@,$(prefix),g' \
205	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
206	    -e 's,@libdir\@,$(libdir),g' $< > $@
207
208avahi-ui-sharp.pc: avahi-ui-sharp.pc.in
209	sed -e 's,@prefix\@,$(prefix),g' \
210	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
211	    -e 's,@libdir\@,$(libdir),g' $< > $@
212
213CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
214
215endif
216
217endif
218
219if HAVE_GLIB
220
221pkgconfig_DATA += avahi-glib.pc
222
223avahi-glib.pc: avahi-glib.pc.in
224	sed -e 's,@prefix\@,$(prefix),g' \
225	    -e 's,@libdir\@,$(libdir),g' \
226	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
227
228CLEANFILES += avahi-glib.pc
229
230if HAVE_GOBJECT
231
232pkgconfig_DATA += avahi-gobject.pc
233
234avahi-gobject.pc: avahi-gobject.pc.in
235	sed -e 's,@prefix\@,$(prefix),g' \
236	    -e 's,@libdir\@,$(libdir),g' \
237	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
238
239CLEANFILES += avahi-gobject.pc
240
241endif
242endif
243
244if HAVE_GTK
245if HAVE_DBUS
246
247pkgconfig_DATA += avahi-ui.pc
248
249avahi-ui.pc: avahi-ui.pc.in
250	sed -e 's,@prefix\@,$(prefix),g' \
251	    -e 's,@libdir\@,$(libdir),g' \
252	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
253
254CLEANFILES += avahi-ui.pc
255
256endif
257endif
258
259if HAVE_QT3
260
261pkgconfig_DATA += avahi-qt3.pc
262
263avahi-qt3.pc: avahi-qt3.pc.in
264	sed -e 's,@prefix\@,$(prefix),g' \
265	    -e 's,@libdir\@,$(libdir),g' \
266	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
267
268CLEANFILES += avahi-qt3.pc
269
270endif
271
272if HAVE_QT4
273
274pkgconfig_DATA += avahi-qt4.pc
275
276avahi-qt4.pc: avahi-qt4.pc.in
277	sed -e 's,@prefix\@,$(prefix),g' \
278	    -e 's,@libdir\@,$(libdir),g' \
279	    -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
280
281CLEANFILES += avahi-qt4.pc
282
283endif
284
285CLEANFILES += avahi.devhelp
286
287avahi.devhelp: doxygen-run
288	xsltproc -o $@ doxygen_to_devhelp.xsl doxygen/xml/index.xml
289
290MOSTLYCLEANFILES = $(DX_CLEANFILES)
291
292DISTCHECK_CONFIGURE_FLAGS = \
293	--disable-monodoc
294
295homepage:
296	$(MAKE) -C man
297	scp avahi-daemon/*.introspect avahi-daemon/introspect.dtd avahi-daemon/introspect.xsl\
298	    man/*.xml man/xmltoman.dtd man/xmltoman.xsl \
299	    tango:www/avahi.org/tree/download/
300	scp avahi-$(PACKAGE_VERSION).tar.gz tango:www/avahi.org/tree/download/
301	rm -rf doxygen
302	$(MAKE) doxygen-run
303	ssh tango rm -rf www/avahi.org/tree/download/doxygen
304	scp -r doxygen/html tango:www/avahi.org/tree/download/doxygen
305
306dist-hook:
307	if test -d .svn ; then \
308		svn update ; \
309		chmod u+w ${distdir}/ChangeLog || true ; \
310		svn2cl -o ${distdir}/ChangeLog ; \
311	fi
312
313DISTCLEANFILES = \
314	po/.intltool-merge-cache
315