]> git.meshlink.io Git - catta/blob - avahi-utils/Makefile.am
build-sys: fix previous commit for recent automake
[catta] / avahi-utils / 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 pkglibdatadir=$(libdir)/avahi
24
25 if HAVE_DBUS
26
27 bin_PROGRAMS = avahi-browse avahi-resolve avahi-publish avahi-set-host-name
28
29 avahi_browse_SOURCES = avahi-browse.c sigint.c sigint.h
30 avahi_browse_CFLAGS = $(AM_CFLAGS)
31 avahi_browse_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
32
33 if HAVE_GDBM
34 avahi_browse_SOURCES += stdb.h stdb.c
35 avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
36 avahi_browse_LDADD += -lgdbm
37 endif
38
39 if HAVE_DBM
40 avahi_browse_SOURCES += stdb.h stdb.c
41 avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
42 endif
43
44 avahi_resolve_SOURCES = avahi-resolve.c sigint.c sigint.h
45 avahi_resolve_CFLAGS = $(AM_CFLAGS)
46 avahi_resolve_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
47
48 avahi_publish_SOURCES = avahi-publish.c sigint.c sigint.h
49 avahi_publish_CFLAGS = $(AM_CFLAGS)
50 avahi_publish_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
51
52 avahi_set_host_name_SOURCES = avahi-set-host-name.c sigint.c sigint.h
53 avahi_set_host_name_CFLAGS = $(AM_CFLAGS)
54 avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
55
56 install-exec-local:
57         $(MKDIR_P) $(DESTDIR)/$(bindir) && \
58                 cd $(DESTDIR)/$(bindir) && \
59                 rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
60                 $(LN_S) avahi-resolve avahi-resolve-host-name && \
61                 $(LN_S) avahi-resolve avahi-resolve-address && \
62                 $(LN_S) avahi-browse avahi-browse-domains && \
63                 $(LN_S) avahi-publish avahi-publish-address && \
64                 $(LN_S) avahi-publish avahi-publish-service
65
66 endif