]> git.meshlink.io Git - catta/blob - avahi-core/Makefile.am
* Compile tests only when --enable-tests was specified on the configure command line
[catta] / avahi-core / Makefile.am
1 # $Id$
2 #
3 # This file is part of avahi.
4
5 # avahi is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation; either version 2 of the
8 # License, or (at your option) any later version.
9 #
10 # avahi is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 # License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with avahi; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA.
19
20 AM_CFLAGS=-I$(top_srcdir)
21
22 # This cool debug trap works on i386/gcc only
23 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
24
25 avahiincludedir=$(includedir)/avahi-core
26
27 avahiinclude_HEADERS = \
28         core.h \
29         log.h \
30         rr.h \
31         publish.h \
32         lookup.h
33
34 lib_LTLIBRARIES = \
35         libavahi-core.la 
36
37 if ENABLE_TESTS
38 noinst_PROGRAMS = \
39         prioq-test \
40         avahi-test \
41         conformance-test \
42         avahi-reflector \
43         dns-test \
44         timeeventq-test \
45         hashmap-test \
46         querier-test \
47         update-test
48 endif  
49
50 libavahi_core_la_SOURCES = \
51         timeeventq.c timeeventq.h\
52         iface.c iface.h \
53         server.c internal.h entry.c \
54         prioq.c prioq.h \
55         cache.c cache.h \
56         socket.c socket.h \
57         response-sched.c response-sched.h \
58         query-sched.c query-sched.h \
59         probe-sched.c probe-sched.h \
60         announce.c announce.h \
61         browse.c browse.h \
62         rrlist.c rrlist.h \
63         resolve-host-name.c \
64         resolve-address.c \
65         browse-domain.c \
66         browse-service-type.c \
67         browse-service.c \
68         resolve-service.c \
69         dns.c dns.h \
70         rr.c rr.h \
71         core.h lookup.h publish.h \
72         log.c log.h \
73         browse-dns-server.c \
74         fdutil.h fdutil.c \
75         util.c util.h \
76         hashmap.c hashmap.h \
77         wide-area.c wide-area.h \
78         multicast-lookup.c multicast-lookup.h \
79         querier.c querier.h
80
81 if HAVE_NETLINK
82 libavahi_core_la_SOURCES += \
83        iface-linux.c iface-linux.h \
84        netlink.c netlink.h
85 else
86 if HAVE_PF_ROUTE 
87 libavahi_core_la_SOURCES += \
88         iface-pfroute.c iface-pfroute.h
89 endif
90 endif
91
92 libavahi_core_la_CFLAGS = $(AM_CFLAGS)
93 libavahi_core_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
94 libavahi_core_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_CORE_VERSION_INFO)
95
96 prioq_test_SOURCES = \
97         prioq-test.c  \
98         prioq.c prioq.h
99 prioq_test_CFLAGS = $(AM_CFLAGS)
100 prioq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
101
102 avahi_test_SOURCES = \
103         avahi-test.c
104 avahi_test_CFLAGS = $(AM_CFLAGS)
105 avahi_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
106
107 update_test_SOURCES = \
108         update-test.c
109 update_test_CFLAGS = $(AM_CFLAGS)
110 update_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
111
112 querier_test_SOURCES = \
113         querier-test.c
114 querier_test_CFLAGS = $(AM_CFLAGS)
115 querier_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
116
117 conformance_test_SOURCES = \
118         conformance-test.c
119 conformance_test_CFLAGS = $(AM_CFLAGS)
120 conformance_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
121
122 avahi_reflector_SOURCES = \
123         avahi-reflector.c
124 avahi_reflector_CFLAGS = $(AM_CFLAGS)
125 avahi_reflector_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la libavahi-core.la
126
127 dns_test_SOURCES = \
128         dns.c dns.h \
129         dns-test.c \
130         log.c log.h \
131         util.c util.h \
132         rr.c rr.h \
133         hashmap.c hashmap.h
134 dns_test_CFLAGS = $(AM_CFLAGS)
135 dns_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
136
137 timeeventq_test_SOURCES = \
138         timeeventq-test.c \
139         timeeventq.h timeeventq.c \
140         prioq.h prioq.c \
141         log.c log.h
142 timeeventq_test_CFLAGS = $(AM_CFLAGS)
143 timeeventq_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
144
145 hashmap_test_SOURCES = \
146         hashmap-test.c \
147         hashmap.h hashmap.c \
148         util.h util.c
149 hashmap_test_CFLAGS = $(AM_CFLAGS)
150 hashmap_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
151
152 valgrind: avahi-test
153         libtool --mode=execute valgrind ./avahi-test
154
155 gdb: avahi-test
156         libtool --mode=execute gdb ./avahi-test