Import Upstream version 1.2.2
[quagga-debian.git] / zebra / Makefile.am
1 include ../common.am
2
3 ## Process this file with automake to produce Makefile.in.
4
5 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
6 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
7 INSTALL_SDATA=@INSTALL@ -m 600
8
9 LIBCAP = @LIBCAP@
10
11 ipforward = @IPFORWARD@
12 if_method = @IF_METHOD@
13 rt_method = @RT_METHOD@
14 rtread_method = @RTREAD_METHOD@
15 kernel_method = @KERNEL_METHOD@
16 ioctl_method = @IOCTL_METHOD@
17
18 otherobj = $(ioctl_method) $(ipforward) $(if_method) \
19         $(rt_method) $(rtread_method) $(kernel_method)
20
21 if HAVE_NETLINK
22 othersrc = zebra_fpm_netlink.c
23 endif
24
25 if HAVE_PROTOBUF
26 protobuf_srcs = zebra_fpm_protobuf.c
27 endif
28
29 if DEV_BUILD
30 dev_srcs = zebra_fpm_dt.c
31 endif
32
33 AM_CFLAGS = $(WERROR)
34
35 sbin_PROGRAMS = zebra
36
37 noinst_PROGRAMS = testzebra
38
39 zebra_SOURCES = \
40         zserv.c main.c interface.c connected.c zebra_rib.c zebra_routemap.c \
41         redistribute.c debug.c rtadv.c zebra_snmp.c zebra_vty.c \
42         irdp_main.c irdp_interface.c irdp_packet.c router-id.c zebra_fpm.c \
43         zebra_rnh.c \
44         $(othersrc) $(protobuf_srcs) $(dev_srcs)
45
46 testzebra_SOURCES = test_main.c zebra_rib.c interface.c connected.c debug.c \
47         zebra_vty.c \
48         kernel_null.c  redistribute_null.c ioctl_null.c misc_null.c zebra_rnh_null.c
49
50 noinst_HEADERS = \
51         connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
52         interface.h ipforward.h irdp.h router-id.h kernel_socket.h \
53         rt_netlink.h zebra_fpm.h zebra_fpm_private.h \
54         ioctl_solaris.h zebra_rnh.h
55
56 zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIBCAP) $(Q_FPM_PB_CLIENT_LDOPTS)
57
58 testzebra_LDADD = ../lib/libzebra.la $(LIBCAP)
59
60 zebra_DEPENDENCIES = $(otherobj)
61
62 EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c \
63         if_sysctl.c ipforward_proc.c \
64         ipforward_solaris.c ipforward_sysctl.c rt_netlink.c \
65         rt_socket.c rtread_netlink.c rtread_sysctl.c \
66         rtread_getmsg.c kernel_socket.c kernel_netlink.c \
67         ioctl.c ioctl_solaris.c \
68         GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB
69
70 client : client_main.o ../lib/libzebra.la
71         $(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6)
72
73 quaggaconfdir = $(sysconfdir)
74
75 examplesdir = $(exampledir)
76 dist_examples_DATA = zebra.conf.sample