1 #############################################################
5 #############################################################
7 QUAGGA_SOURCE
:=quagga-
$(QUAGGA_VERSION
).
tar.gz
8 QUAGGA_SITE
:=http
://www.quagga.net
/download
9 QUAGGA_DIR
:=$(BUILD_DIR
)/quagga-
$(QUAGGA_VERSION
)
13 ifeq ($(BR2_PACKAGE_QUAGGA_ZEBRA
),y
)
14 QUAGGA_CONFIGURE
+=--enable-zebra
15 ifndef QUAGGA_TARGET_BINARY
16 QUAGGA_TARGET_BINARY
=zebra
17 QUAGGA_BINARY
=$(QUAGGA_DIR
)/zebra
/.libs
/zebra
20 QUAGGA_CONFIGURE
+=--disable-zebra
22 ifeq ($(BR2_PACKAGE_QUAGGA_BGPD
),y
)
23 QUAGGA_CONFIGURE
+=--enable-bgpd
24 ifndef QUAGGA_TARGET_BINARY
25 QUAGGA_TARGET_BINARY
=bgpd
26 QUAGGA_BINARY
=$(QUAGGA_DIR
)/bgpd
/.libs
/bgpd
29 QUAGGA_CONFIGURE
+=--disable-bgpd
31 ifeq ($(BR2_PACKAGE_QUAGGA_RIPD
),y
)
32 QUAGGA_CONFIGURE
+=--enable-ripd
33 ifndef QUAGGA_TARGET_BINARY
34 QUAGGA_TARGET_BINARY
=ripd
35 QUAGGA_BINARY
=$(QUAGGA_DIR
)/ripd
/.libs
/ripd
38 QUAGGA_CONFIGURE
+=--disable-ripd
40 ifeq ($(BR2_PACKAGE_QUAGGA_RIPNGD
),y
)
41 QUAGGA_CONFIGURE
+=--enable-ripngd
42 ifndef QUAGGA_TARGET_BINARY
43 QUAGGA_TARGET_BINARY
=ripngd
44 QUAGGA_BINARY
=$(QUAGGA_DIR
)/ripngd
/.libs
/ripngd
47 QUAGGA_CONFIGURE
+=--disable-ripngd
49 ifeq ($(BR2_PACKAGE_QUAGGA_OSPFD
),y
)
50 QUAGGA_CONFIGURE
+=--enable-ospfd
51 ifndef QUAGGA_TARGET_BINARY
52 QUAGGA_TARGET_BINARY
=ospfd
53 QUAGGA_BINARY
=$(QUAGGA_DIR
)/ospfd
/.libs
/ospfd
56 QUAGGA_CONFIGURE
+=--disable-ospfd
58 ifeq ($(BR2_PACKAGE_QUAGGA_OSPF6D
),y
)
59 QUAGGA_CONFIGURE
+=--enable-ospf6d
60 ifndef QUAGGA_TARGET_BINARY
61 QUAGGA_TARGET_BINARY
=ospf6d
62 QUAGGA_BINARY
=$(QUAGGA_DIR
)/ospf6d
/.libs
/ospf6d
65 QUAGGA_CONFIGURE
+=--disable-ospf6d
67 ifeq ($(BR2_PACKAGE_QUAGGA_WATCHQUAGGA
),y
)
68 QUAGGA_CONFIGURE
+=--enable-watchquagga
69 ifndef QUAGGA_TARGET_BINARY
70 QUAGGA_TARGET_BINARY
=watchquagga
71 QUAGGA_BINARY
=$(QUAGGA_DIR
)/watchquagga
/.libs
/watchquagga
74 QUAGGA_CONFIGURE
+=--disable-watchquagga
76 ifeq ($(BR2_PACKAGE_QUAGGA_ISISD
),y
)
77 QUAGGA_CONFIGURE
+=--enable-isisd
78 ifndef QUAGGA_TARGET_BINARY
79 QUAGGA_TARGET_BINARY
=isisd
80 QUAGGA_BINARY
=$(QUAGGA_DIR
)/isisd
/.libs
/isisd
83 QUAGGA_CONFIGURE
+=--disable-isisd
87 ifeq ($(BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE
),y
)
88 QUAGGA_CONFIGURE
+=--enable-bgp-announce
90 QUAGGA_CONFIGURE
+=--disable-bgp-announce
92 ifeq ($(BR2_PACKAGE_QUAGGA_NETLINK
),y
)
93 QUAGGA_CONFIGURE
+=--enable-netlink
95 QUAGGA_CONFIGURE
+=--disable-netlink
97 ifeq ($(BR2_PACKAGE_QUAGGA_SNMP
),y
)
98 QUAGGA_CONFIGURE
+=--enable-snmp
100 QUAGGA_CONFIGURE
+=--disable-snmp
102 ifeq ($(BR2_PACKAGE_QUAGGA_TCP_ZEBRA
),y
)
103 QUAGGA_CONFIGURE
+=--enable-tcp-zebra
105 QUAGGA_CONFIGURE
+=--disable-tcp-zebra
107 ifeq ($(BR2_PACKAGE_QUAGGA_OPAGUE_LSA
),y
)
108 QUAGGA_CONFIGURE
+=--enable-opaque-lsa
110 QUAGGA_CONFIGURE
+=--disable-opaque-lsa
113 QUAGGA_CONFIGURE
+=$(subst ",,$(BR2_PACKAGE_QUAGGA_CONFIGURE))
116 $(DL_DIR
)/$(QUAGGA_SOURCE
):
117 $(WGET
) -P
$(DL_DIR
) $(QUAGGA_SITE
)/$(QUAGGA_SOURCE
)
119 ifneq ($(QUAGGA_PATCH
),)
120 QUAGGA_PATCH_FILE
=$(DL_DIR
)/$(QUAGGA_PATCH
)
121 $(DL_DIR
)/$(QUAGGA_PATCH
):
122 $(WGET
) -P
$(DL_DIR
) $(QUAGGA_SITE
)/$(QUAGGA_PATCH
)
124 quagga-source
: $(DL_DIR
)/$(QUAGGA_SOURCE
) $(QUAGGA_PATCH_FILE
)
126 $(QUAGGA_DIR
)/.unpacked
: $(DL_DIR
)/$(QUAGGA_SOURCE
) $(DL_DIR
)/$(QUAGGA_PATCH
)
127 $(QUAGGA_CAT
) $(DL_DIR
)/$(QUAGGA_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
128 toolchain
/patch-kernel.sh
$(QUAGGA_DIR
) package
/quagga
/ quagga\
*.patch
129 ifneq ($(QUAGGA_PATCH
),)
130 (cd
$(QUAGGA_DIR
) && $(QUAGGA_CAT
) $(DL_DIR
)/$(QUAGGA_PATCH
) | patch
-p1
)
131 if
[ -d
$(QUAGGA_DIR
)/debian
/patches
]; then \
132 toolchain
/patch-kernel.sh
$(QUAGGA_DIR
) $(QUAGGA_DIR
)/debian
/patches \
*.patch
; \
137 $(QUAGGA_DIR
)/.configured
: $(QUAGGA_DIR
)/.unpacked
138 (cd
$(QUAGGA_DIR
); rm -rf config.cache
; \
139 $(TARGET_CONFIGURE_OPTS
) \
140 $(TARGET_CONFIGURE_ARGS
) \
142 --target
=$(GNU_TARGET_NAME
) \
143 --host
=$(GNU_TARGET_NAME
) \
144 --build
=$(GNU_HOST_NAME
) \
147 $(DISABLE_LARGEFILE
) \
149 $(QUAGGA_CONFIGURE
) \
150 --program-transform-name
='' \
154 $(QUAGGA_BINARY
): $(QUAGGA_DIR
)/.configured
155 $(MAKE
) $(TARGET_CONFIGURE_OPTS
) -C
$(QUAGGA_DIR
)
157 $(TARGET_DIR
)/usr
/sbin
/$(QUAGGA_TARGET_BINARY
): $(QUAGGA_BINARY
)
158 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(QUAGGA_DIR
) install
159 ifneq ($(BR2_PACKAGE_QUAGGA_HEADERS
),y
)
160 rm -rf
$(TARGET_DIR
)/usr
/include/quagga
162 ifneq ($(BR2_HAVE_MANPAGES
),y
)
163 rm -rf
$(TARGET_DIR
)/usr
/share
/man
165 ifneq ($(BR2_HAVE_INFOPAGES
),y
)
166 rm -rf
$(TARGET_DIR
)/usr
/share
/info
169 quagga
: $(TARGET_DIR
)/usr
/sbin
/$(QUAGGA_TARGET_BINARY
)
172 -$(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(QUAGGA_DIR
) uninstall
173 -$(MAKE
) -C
$(QUAGGA_DIR
) clean
177 #############################################################
179 # Toplevel Makefile options
181 #############################################################
182 ifeq ($(BR2_PACKAGE_QUAGGA
),y
)