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
18AM_CFLAGS=-I$(top_srcdir)
19
20# This cool debug trap works on i386/gcc only
21AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
22
23if HAVE_LIBEVENT
24
25avahilibeventincludedir=$(includedir)/avahi-libevent
26
27avahilibeventinclude_HEADERS = \
28	libevent-watch.h
29
30lib_LTLIBRARIES = \
31	libavahi-libevent.la
32
33if ENABLE_TESTS
34noinst_PROGRAMS = \
35	libevent-watch-test
36endif
37
38libavahi_libevent_la_SOURCES = \
39	libevent-watch.c libevent-watch.h
40
41libavahi_libevent_la_CFLAGS = $(AM_CFLAGS) $(LIBEVENT_CFLAGS)
42libavahi_libevent_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(LIBEVENT_LIBS)
43libavahi_libevent_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_LIBEVENT_VERSION_INFO)
44
45libevent_watch_test_SOURCES = \
46	libevent-watch.c libevent-watch.h \
47	libevent-watch-test.c
48libevent_watch_test_CFLAGS = $(AM_CFLAGS) $(LIBEVENT_CFLAGS)
49libevent_watch_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(LIBEVENT_LIBS)
50
51endif
52