Merge tag 'upstream/0.8' into tizen
[platform/upstream/avahi.git] / 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 ACLOCAL_AMFLAGS = -I common
19
20 include $(srcdir)/common/doxygen.mk
21
22 EXTRA_DIST = config.rpath  \
23         autogen.sh \
24         bootstrap.sh \
25         LICENSE \
26         $(DX_CONFIG) \
27         docs/INSTALL \
28         docs/TODO \
29         docs/NEWS \
30         docs/README \
31         docs/DBUS-API \
32         docs/AUTHORS \
33         docs/HACKING \
34         docs/API-CHANGES-0.6 \
35         docs/COMPAT-LAYERS \
36         docs/MALLOC \
37         docs/overview.dia \
38         docs/server-states.dia \
39         docs/avahi-poll.dia \
40         avahi-core.pc.in \
41         avahi-client.pc.in \
42         avahi-glib.pc.in \
43         avahi-libevent.pc.in \
44         avahi-gobject.pc.in \
45         avahi-qt3.pc.in \
46         avahi-qt4.pc.in \
47         avahi-qt5.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         avahi-ui-gtk3.pc.in \
54         doxygen_to_devhelp.xsl \
55         common/introspection.m4
56
57 SUBDIRS = \
58         common \
59         avahi-common \
60         avahi-core \
61         avahi-qt \
62         avahi-client \
63         avahi-glib \
64         avahi-gobject \
65         avahi-discover-standalone \
66         avahi-daemon \
67         avahi-sharp \
68         initscript \
69         avahi-dnsconfd \
70         avahi-utils \
71         avahi-python \
72         examples \
73         man \
74         tests \
75         service-type-database \
76         avahi-compat-libdns_sd \
77         avahi-compat-howl \
78         avahi-autoipd \
79         avahi-ui \
80         avahi-ui-sharp \
81         avahi-libevent \
82         po
83
84 DX_INPUT = \
85         $(srcdir)/avahi-common/address.h \
86         $(srcdir)/avahi-common/malloc.h \
87         $(srcdir)/avahi-common/strlst.h \
88         $(srcdir)/avahi-common/alternative.h \
89         $(srcdir)/avahi-common/defs.h \
90         $(srcdir)/avahi-common/error.h \
91         $(srcdir)/avahi-common/domain.h \
92         $(srcdir)/avahi-common/watch.h \
93         $(srcdir)/avahi-common/simple-watch.h \
94         $(srcdir)/avahi-common/thread-watch.h
95
96 DX_EXAMPLE_PATH = $(srcdir)/examples
97 DX_EXAMPLE_PATTERNS = *.c
98
99 if HAVE_QT3
100 DX_INPUT += \
101         $(srcdir)/avahi-qt/qt-watch.h
102 else
103 if HAVE_QT4
104 DX_INPUT += \
105         $(srcdir)/avahi-qt/qt-watch.h
106 endif
107 if HAVE_QT5
108 DX_INPUT += \
109         $(srcdir)/avahi-qt/qt-watch.h
110 endif
111 endif
112
113 if HAVE_GLIB
114 DX_INPUT += \
115         $(srcdir)/avahi-glib/glib-watch.h \
116         $(srcdir)/avahi-glib/glib-malloc.h
117
118 if HAVE_GOBJECT
119 if HAVE_DBUS
120 DX_INPUT += \
121         $(srcdir)/avahi-gobject/ga-client.h \
122         $(srcdir)/avahi-gobject/ga-entry-group.h \
123         $(srcdir)/avahi-gobject/ga-enums.h \
124         $(srcdir)/avahi-gobject/ga-error.h \
125         $(srcdir)/avahi-gobject/ga-record-browser.h \
126         $(srcdir)/avahi-gobject/ga-service-browser.h \
127         $(srcdir)/avahi-gobject/ga-service-resolver.h
128 endif
129 endif
130 endif
131
132 if HAVE_DBUS
133 DX_INPUT += \
134         $(srcdir)/avahi-client/client.h \
135         $(srcdir)/avahi-client/lookup.h \
136         $(srcdir)/avahi-client/publish.h
137 endif
138
139 if HAVE_DBUS
140 if HAVE_GTK
141 DX_INPUT += \
142         $(srcdir)/avahi-ui/avahi-ui.h
143 endif
144 endif
145
146 if ENABLE_CORE_DOCS
147 DX_INPUT += \
148         $(srcdir)/avahi-core/core.h \
149         $(srcdir)/avahi-core/lookup.h \
150         $(srcdir)/avahi-core/publish.h \
151         $(srcdir)/avahi-core/rr.h \
152         $(srcdir)/avahi-core/log.h
153 endif
154
155 if HAVE_GTK
156 DX_INPUT += \
157         $(srcdir)/avahi-ui/avahi-ui.h
158 endif
159
160 if HAVE_LIBEVENT
161 DX_INPUT += \
162         $(srcdir)/avahi-libevent/libevent-watch.h
163 endif
164
165 pkgconfigdir = $(libdir)/pkgconfig
166
167 %.pc: %.pc.in
168         $(AM_V_GEN)sed -e 's,@prefix\@,$(prefix),g' \
169             -e 's,@libdir\@,$(libdir),g' \
170             -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' \
171             -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
172
173 pkgconfig_DATA = avahi-core.pc
174 CLEANFILES = avahi-core.pc
175
176 if HAVE_DBUS
177 pkgconfig_DATA += avahi-client.pc
178 CLEANFILES += avahi-client.pc
179
180 if ENABLE_COMPAT_HOWL
181 pkgconfig_DATA += avahi-compat-howl.pc
182 CLEANFILES += avahi-compat-howl.pc
183 endif
184
185 if ENABLE_COMPAT_LIBDNS_SD
186 pkgconfig_DATA += avahi-compat-libdns_sd.pc
187 CLEANFILES += avahi-compat-libdns_sd.pc
188 endif
189
190 if HAVE_MONO
191 pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
192 CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
193 endif
194
195 endif
196
197 if HAVE_GLIB
198 pkgconfig_DATA += avahi-glib.pc
199 CLEANFILES += avahi-glib.pc
200
201 if HAVE_GOBJECT
202 pkgconfig_DATA += avahi-gobject.pc
203 CLEANFILES += avahi-gobject.pc
204 endif
205 endif
206
207 if HAVE_GTK
208 if HAVE_DBUS
209 pkgconfig_DATA += avahi-ui.pc
210 CLEANFILES += avahi-ui.pc
211 endif
212 endif
213
214 if HAVE_GTK3
215 if HAVE_DBUS
216 pkgconfig_DATA += avahi-ui-gtk3.pc
217 CLEANFILES += avahi-ui-gtk3.pc
218 endif
219 endif
220
221 if HAVE_QT3
222 pkgconfig_DATA += avahi-qt3.pc
223 CLEANFILES += avahi-qt3.pc
224 endif
225
226 if HAVE_QT4
227 pkgconfig_DATA += avahi-qt4.pc
228 CLEANFILES += avahi-qt4.pc
229 endif
230
231 if HAVE_QT5
232 pkgconfig_DATA += avahi-qt5.pc
233 CLEANFILES += avahi-qt5.pc
234 endif
235
236 if HAVE_LIBEVENT
237 pkgconfig_DATA += avahi-libevent.pc
238 CLEANFILES += avahi-libevent.pc
239 endif
240
241 CLEANFILES += avahi.devhelp
242
243 avahi.devhelp: doxygen-run
244         xsltproc -o $@ doxygen_to_devhelp.xsl doxygen/xml/index.xml
245
246 MOSTLYCLEANFILES = $(DX_CLEANFILES)
247
248 DISTCHECK_CONFIGURE_FLAGS = \
249         --disable-monodoc \
250         --enable-introspection \
251         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
252
253 homepage:
254         $(MAKE) -C man
255         scp avahi-daemon/*.xml avahi-daemon/introspect.dtd avahi-daemon/introspect.xsl\
256             man/*.xml man/xmltoman.dtd man/xmltoman.xsl \
257             tango:www/avahi.org/tree/download/
258         scp avahi-$(PACKAGE_VERSION).tar.gz tango:www/avahi.org/tree/download/
259         rm -rf doxygen
260         $(MAKE) doxygen-run
261         ssh tango rm -rf www/avahi.org/tree/download/doxygen
262         scp -r doxygen/html tango:www/avahi.org/tree/download/doxygen