]> git.meshlink.io Git - catta/blob - avahi-core/Makefile.am
2f095967718e8ffa26655157a39b0dec52525ed6
[catta] / avahi-core / 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)/avahi-core
24
25 avahiinclude_HEADERS = \
26         core.h \
27         log.h \
28         rr.h \
29         publish.h \
30         lookup.h
31
32 lib_LTLIBRARIES = \
33         libavahi-core.la
34
35 if ENABLE_TESTS
36 noinst_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
48 TESTS = \
49         dns-spin-test \
50         dns-test \
51         hashmap-test
52 endif
53
54 libavahi_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
88 if HAVE_NETLINK
89 libavahi_core_la_SOURCES += \
90        iface-linux.c iface-linux.h \
91        netlink.c netlink.h
92 else
93 if HAVE_PF_ROUTE
94 libavahi_core_la_SOURCES += \
95         iface-pfroute.c iface-pfroute.h
96 else
97 libavahi_core_la_SOURCES += \
98         iface-none.c
99 endif
100 endif
101
102 libavahi_core_la_CFLAGS = $(AM_CFLAGS)
103 libavahi_core_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
104 libavahi_core_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_CORE_VERSION_INFO)
105
106 prioq_test_SOURCES = \
107         prioq-test.c  \
108         prioq.c prioq.h
109 prioq_test_CFLAGS = $(AM_CFLAGS)
110 prioq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
111
112 avahi_test_SOURCES = \
113         avahi-test.c
114 avahi_test_CFLAGS = $(AM_CFLAGS)
115 avahi_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
116
117 update_test_SOURCES = \
118         update-test.c
119 update_test_CFLAGS = $(AM_CFLAGS)
120 update_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
121
122 querier_test_SOURCES = \
123         querier-test.c
124 querier_test_CFLAGS = $(AM_CFLAGS)
125 querier_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
126
127 conformance_test_SOURCES = \
128         conformance-test.c
129 conformance_test_CFLAGS = $(AM_CFLAGS)
130 conformance_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
131
132 avahi_reflector_SOURCES = \
133         avahi-reflector.c
134 avahi_reflector_CFLAGS = $(AM_CFLAGS)
135 avahi_reflector_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
136
137 dns_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
146 dns_test_CFLAGS = $(AM_CFLAGS)
147 dns_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
148
149 dns_spin_test_SOURCES = \
150         dns-spin-test.c
151 dns_spin_test_CFLAGS = $(AM_CFLAGS)
152 dns_spin_test_LDADD = $(AM_LDADD) libavahi-core.la
153
154 timeeventq_test_SOURCES = \
155         timeeventq-test.c \
156         timeeventq.h timeeventq.c \
157         prioq.h prioq.c \
158         log.c log.h
159 timeeventq_test_CFLAGS = $(AM_CFLAGS)
160 timeeventq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
161
162 hashmap_test_SOURCES = \
163         hashmap-test.c \
164         hashmap.h hashmap.c \
165         util.h util.c
166 hashmap_test_CFLAGS = $(AM_CFLAGS)
167 hashmap_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
168
169 valgrind: avahi-test
170         libtool --mode=execute valgrind ./avahi-test
171
172 gdb: avahi-test
173         libtool --mode=execute gdb ./avahi-test