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
23avahiincludedir=$(includedir)/avahi-core
24
25avahiinclude_HEADERS = \
26	core.h \
27	log.h \
28	rr.h \
29	publish.h \
30	lookup.h
31
32lib_LTLIBRARIES = \
33	libavahi-core.la
34
35if ENABLE_TESTS
36noinst_PROGRAMS = \
37	prioq-test \
38	avahi-test \
39	conformance-test \
40	avahi-reflector \
41	dns-test \
42	dns-spin-test \
43	timeeventq-test \
44	hashmap-test \
45	querier-test \
46	update-test
47
48TESTS = \
49	dns-spin-test \
50	dns-test \
51	hashmap-test
52endif
53
54libavahi_core_la_SOURCES = \
55	timeeventq.c timeeventq.h\
56	iface.c iface.h \
57	server.c internal.h entry.c \
58	prioq.c prioq.h \
59	cache.c cache.h \
60	socket.c socket.h \
61	response-sched.c response-sched.h \
62	query-sched.c query-sched.h \
63	probe-sched.c probe-sched.h \
64	announce.c announce.h \
65	browse.c browse.h \
66	rrlist.c rrlist.h \
67	resolve-host-name.c \
68	resolve-address.c \
69	browse-domain.c \
70	browse-service-type.c \
71	browse-service.c \
72	resolve-service.c \
73	dns.c dns.h \
74	rr.c rr.h rr-util.h \
75	core.h lookup.h publish.h \
76	log.c log.h \
77	browse-dns-server.c \
78	fdutil.h fdutil.c \
79	util.c util.h \
80	hashmap.c hashmap.h \
81	wide-area.c wide-area.h \
82	multicast-lookup.c multicast-lookup.h \
83	querier.c querier.h \
84	addr-util.h addr-util.c \
85	domain-util.h domain-util.c \
86	dns-srv-rr.h
87
88if HAVE_NETLINK
89libavahi_core_la_SOURCES += \
90       iface-linux.c iface-linux.h \
91       netlink.c netlink.h
92else
93if HAVE_PF_ROUTE
94libavahi_core_la_SOURCES += \
95	iface-pfroute.c iface-pfroute.h
96else
97libavahi_core_la_SOURCES += \
98	iface-none.c
99endif
100endif
101
102libavahi_core_la_CFLAGS = $(AM_CFLAGS)
103libavahi_core_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
104libavahi_core_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_CORE_VERSION_INFO)
105
106prioq_test_SOURCES = \
107	prioq-test.c  \
108	prioq.c prioq.h
109prioq_test_CFLAGS = $(AM_CFLAGS)
110prioq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
111
112avahi_test_SOURCES = \
113	avahi-test.c
114avahi_test_CFLAGS = $(AM_CFLAGS)
115avahi_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
116
117update_test_SOURCES = \
118	update-test.c
119update_test_CFLAGS = $(AM_CFLAGS)
120update_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
121
122querier_test_SOURCES = \
123	querier-test.c
124querier_test_CFLAGS = $(AM_CFLAGS)
125querier_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
126
127conformance_test_SOURCES = \
128	conformance-test.c
129conformance_test_CFLAGS = $(AM_CFLAGS)
130conformance_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
131
132avahi_reflector_SOURCES = \
133	avahi-reflector.c
134avahi_reflector_CFLAGS = $(AM_CFLAGS)
135avahi_reflector_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
136
137dns_test_SOURCES = \
138	dns.c dns.h \
139	dns-test.c \
140	log.c log.h \
141	util.c util.h \
142	rr.c rr.h \
143	hashmap.c hashmap.h \
144	domain-util.c domain-util.h \
145	addr-util.c addr-util.h
146dns_test_CFLAGS = $(AM_CFLAGS)
147dns_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
148
149dns_spin_test_SOURCES = \
150	dns-spin-test.c
151dns_spin_test_CFLAGS = $(AM_CFLAGS)
152dns_spin_test_LDADD = $(AM_LDADD) libavahi-core.la
153
154timeeventq_test_SOURCES = \
155	timeeventq-test.c \
156	timeeventq.h timeeventq.c \
157	prioq.h prioq.c \
158	log.c log.h
159timeeventq_test_CFLAGS = $(AM_CFLAGS)
160timeeventq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
161
162hashmap_test_SOURCES = \
163	hashmap-test.c \
164	hashmap.h hashmap.c \
165	util.h util.c
166hashmap_test_CFLAGS = $(AM_CFLAGS)
167hashmap_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
168
169valgrind: avahi-test
170	libtool --mode=execute valgrind ./avahi-test
171
172gdb: avahi-test
173	libtool --mode=execute gdb ./avahi-test
174