]> git.meshlink.io Git - catta/blob - avahi-common/Makefile.am
* Compile tests only when --enable-tests was specified on the configure command line
[catta] / avahi-common / Makefile.am
1 # $Id: Makefile.am 90 2005-05-23 16:15:12Z lennart $
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 avahi_commonincludedir=$(includedir)/avahi-common
26
27 avahi_commoninclude_HEADERS = \
28         strlst.h \
29         address.h \
30         alternative.h \
31         domain.h \
32         cdecl.h \
33         defs.h \
34         malloc.h \
35         watch.h \
36         timeval.h \
37         simple-watch.h \
38         gccmacro.h \
39         error.h \
40         llist.h \
41         rlist.h
42
43 if ENABLE_TESTS
44 noinst_PROGRAMS = \
45         strlst-test \
46         domain-test \
47         alternative-test \
48         timeval-test \
49         watch-test
50 endif
51
52 lib_LTLIBRARIES = \
53         libavahi-common.la 
54
55 libavahi_common_la_SOURCES = \
56         malloc.c malloc.h \
57         address.c address.h \
58         alternative.c alternative.h \
59         error.c error.h \
60         strlst.c strlst.h \
61         domain.c domain.h \
62         timeval.c timeval.h \
63         simple-watch.c simple-watch.h \
64         watch.h gccmacro.h \
65         rlist.h rlist.c
66
67 libavahi_common_la_CFLAGS = $(AM_CFLAGS)
68 libavahi_common_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_COMMON_VERSION_INFO)
69
70 strlst_test_SOURCES = \
71         strlst.c strlst.h \
72         malloc.c malloc.h \
73         strlst-test.c
74 strlst_test_CFLAGS = $(AM_CFLAGS)
75
76 alternative_test_SOURCES = \
77         alternative.c alternative.h \
78         malloc.c malloc.h \
79         domain.c domain.h \
80         alternative-test.c
81 alternative_test_CFLAGS = $(AM_CFLAGS)
82
83 domain_test_SOURCES = \
84         domain.c domain.h \
85         malloc.c malloc.h \
86         domain-test.c
87 domain_test_CFLAGS = $(AM_CFLAGS)
88
89 watch_test_SOURCES = \
90         timeval.c timeval.h \
91         simple-watch.c simple-watch.h \
92         watch.h \
93         malloc.c malloc.h \
94         watch-test.c
95 watch_test_CFLAGS = $(AM_CFLAGS)
96
97 timeval_test_SOURCES = \
98         timeval.c timeval.h \
99         timeval-test.c
100 timeval_test_CFLAGS = $(AM_CFLAGS)
101
102 if HAVE_DBUS
103
104 noinst_HEADERS = \
105         dbus.h \
106         dbus-watch-glue.h
107
108 noinst_LTLIBRARIES = \
109         libdbus-common.la \
110         libdbus-common-pic.la
111
112 libdbus_common_la_SOURCES = \
113         dbus-watch-glue.h dbus-watch-glue.c \
114         dbus.h dbus.c
115 libdbus_common_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
116 libdbus_common_la_LDFLAGS = $(AM_LDFLAGS) -all-static
117
118 libdbus_common_pic_la_SOURCES = $(libdbus_common_la_SOURCES)
119 libdbus_common_pic_la_CFLAGS = $(libdbus_common_la_CFLAGS) -fPIC
120 libdbus_common_pic_la_LDFLAGS = $(libdbus_common_la_LDFLAGS)
121
122 endif
123