]> git.meshlink.io Git - catta/blob - avahi/Makefile.am
combine avahi-core and avahi-common components into one library
[catta] / avahi / 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 AM_CFLAGS=-I$(top_srcdir)
19
20 # This cool debug trap works on i386/gcc only
21 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
22
23 avahiincludedir=$(includedir)/src
24
25 avahiinclude_HEADERS = \
26         strlst.h \
27         address.h \
28         alternative.h \
29         domain.h \
30         cdecl.h \
31         defs.h \
32         malloc.h \
33         watch.h \
34         timeval.h \
35         simple-watch.h \
36         thread-watch.h \
37         gccmacro.h \
38         error.h \
39         llist.h \
40         rlist.h \
41         core.h \
42         log.h \
43         rr.h \
44         publish.h \
45         lookup.h
46
47 lib_LTLIBRARIES = libavahi.la
48
49 if ENABLE_TESTS
50 noinst_PROGRAMS = \
51         strlst-test \
52         domain-test \
53         alternative-test \
54         timeval-test \
55         watch-test \
56         watch-test-thread \
57         utf8-test \
58         prioq-test \
59         avahi-test \
60         conformance-test \
61         avahi-reflector \
62         dns-test \
63         dns-spin-test \
64         timeeventq-test \
65         hashmap-test \
66         querier-test \
67         update-test
68
69 TESTS = \
70         dns-spin-test \
71         dns-test \
72         hashmap-test
73 endif
74
75 libavahi_la_SOURCES = \
76         malloc.c malloc.h \
77         address.c address.h \
78         alternative.c alternative.h \
79         error.c error.h \
80         strlst.c strlst.h \
81         domain.c domain.h \
82         timeval.c timeval.h \
83         simple-watch.c simple-watch.h \
84         thread-watch.c thread-watch.h \
85         watch.h gccmacro.h \
86         rlist.h rlist.c \
87         utf8.c utf8.h \
88         i18n.c i18n.h \
89         timeeventq.c timeeventq.h\
90         iface.c iface.h \
91         server.c internal.h entry.c \
92         prioq.c prioq.h \
93         cache.c cache.h \
94         socket.c socket.h \
95         response-sched.c response-sched.h \
96         query-sched.c query-sched.h \
97         probe-sched.c probe-sched.h \
98         announce.c announce.h \
99         browse.c browse.h \
100         rrlist.c rrlist.h \
101         resolve-host-name.c \
102         resolve-address.c \
103         browse-domain.c \
104         browse-service-type.c \
105         browse-service.c \
106         resolve-service.c \
107         dns.c dns.h \
108         rr.c rr.h rr-util.h \
109         core.h lookup.h publish.h \
110         log.c log.h \
111         browse-dns-server.c \
112         fdutil.h fdutil.c \
113         util.c util.h \
114         hashmap.c hashmap.h \
115         wide-area.c wide-area.h \
116         multicast-lookup.c multicast-lookup.h \
117         querier.c querier.h \
118         addr-util.h addr-util.c \
119         domain-util.h domain-util.c \
120         dns-srv-rr.h
121
122 if HAVE_NETLINK
123 libavahi_la_SOURCES += \
124        iface-linux.c iface-linux.h \
125        netlink.c netlink.h
126 else
127 if HAVE_PF_ROUTE
128 libavahi_la_SOURCES += \
129         iface-pfroute.c iface-pfroute.h
130 else
131 libavahi_la_SOURCES += \
132         iface-none.c
133 endif
134 endif
135
136 libavahi_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -DAVAHI_LOCALEDIR=\"$(avahilocaledir)\"
137 libavahi_la_LIBADD = $(AM_LDADD) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) $(INTLLIBS)
138 libavahi_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_VERSION_INFO)
139
140 strlst_test_SOURCES = strlst-test.c
141 strlst_test_CFLAGS = $(AM_CFLAGS)
142 strlst_test_LDADD = $(AM_LDADD) libavahi.la
143
144 alternative_test_SOURCES = alternative-test.c
145 alternative_test_CFLAGS = $(AM_CFLAGS)
146 alternative_test_LDADD = $(AM_LDADD) libavahi.la
147
148 domain_test_SOURCES = domain-test.c
149 domain_test_CFLAGS = $(AM_CFLAGS)
150 domain_test_LDADD = $(AM_LDADD) libavahi.la
151
152 watch_test_SOURCES = watch-test.c
153 watch_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
154 watch_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) libavahi.la
155
156 watch_test_thread_SOURCES = $(watch_test_SOURCES)
157 watch_test_thread_CFLAGS = $(watch_test_CFLAGS) -DUSE_THREAD
158 watch_test_thread_LDADD = $(watch_test_LDADD) libavahi.la
159
160 timeval_test_SOURCES = timeval-test.c
161 timeval_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
162 timeval_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) libavahi.la
163
164 utf8_test_SOURCES = utf8-test.c
165 utf8_test_CFLAGS = $(AM_CFLAGS)
166 utf8_test_LDADD = $(AM_LDADD) libavahi.la
167
168 prioq_test_SOURCES = prioq-test.c
169 prioq_test_CFLAGS = $(AM_CFLAGS)
170 prioq_test_LDADD = $(AM_LDADD) libavahi.la
171
172 avahi_test_SOURCES = avahi-test.c
173 avahi_test_CFLAGS = $(AM_CFLAGS)
174 avahi_test_LDADD = $(AM_LDADD) libavahi.la
175
176 update_test_SOURCES = update-test.c
177 update_test_CFLAGS = $(AM_CFLAGS)
178 update_test_LDADD = $(AM_LDADD) libavahi.la
179
180 querier_test_SOURCES = querier-test.c
181 querier_test_CFLAGS = $(AM_CFLAGS)
182 querier_test_LDADD = $(AM_LDADD) libavahi.la
183
184 conformance_test_SOURCES = conformance-test.c
185 conformance_test_CFLAGS = $(AM_CFLAGS)
186 conformance_test_LDADD = $(AM_LDADD) libavahi.la
187
188 avahi_reflector_SOURCES = avahi-reflector.c
189 avahi_reflector_CFLAGS = $(AM_CFLAGS)
190 avahi_reflector_LDADD = $(AM_LDADD) libavahi.la
191
192 dns_test_SOURCES = dns-test.c
193 dns_test_CFLAGS = $(AM_CFLAGS)
194 dns_test_LDADD = $(AM_LDADD) libavahi.la
195
196 dns_spin_test_SOURCES = dns-spin-test.c
197 dns_spin_test_CFLAGS = $(AM_CFLAGS)
198 dns_spin_test_LDADD = $(AM_LDADD) libavahi.la
199
200 timeeventq_test_SOURCES = timeeventq-test.c
201 timeeventq_test_CFLAGS = $(AM_CFLAGS)
202 timeeventq_test_LDADD = $(AM_LDADD) libavahi.la
203
204 hashmap_test_SOURCES = hashmap-test.c
205 hashmap_test_CFLAGS = $(AM_CFLAGS)
206 hashmap_test_LDADD = $(AM_LDADD) libavahi.la
207
208 valgrind: avahi-test
209         libtool --mode=execute valgrind ./avahi-test
210
211 gdb: avahi-test
212         libtool --mode=execute gdb ./avahi-test