blob: f713502b3a9bb1ec6f474ede3f6f72a140e3e2e0 [file] [log] [blame]
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00001# Makefile for busybox
2#
Eric Andersenc7bda1c2004-03-15 08:29:22 +00003# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00004#
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +00005# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00006#
Glenn L McGrath9a2d2722002-11-10 01:33:55 +00007
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00008LIBIPROUTE_AR:=libiproute.a
9ifndef $(LIBIPROUTE_DIR)
10LIBIPROUTE_DIR:=$(top_builddir)/networking/libiproute
11endif
12srcdir=$(top_srcdir)/networking/libiproute
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000013
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000014LIBIPROUTE-y:=
Glenn L McGrath8ae75012002-11-10 10:20:45 +000015LIBIPROUTE-$(CONFIG_IP) += \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000016 ip_parse_common_args.o \
17 ipaddress.o \
18 iplink.o \
19 iproute.o \
20 iptunnel.o \
21 libnetlink.o \
22 ll_addr.o \
23 ll_map.o \
24 ll_proto.o \
25 ll_types.o \
26 rt_names.o \
27 rtm_map.o \
28 utils.o
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000029
Glenn L McGrath36c74782004-04-12 02:22:39 +000030LIBIPROUTE-$(CONFIG_IPADDR) += \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000031 ip_parse_common_args.o \
32 ipaddress.o \
33 libnetlink.o \
34 ll_addr.o \
35 ll_map.o \
36 ll_types.o \
37 rt_names.o \
38 utils.o
Glenn L McGrath36c74782004-04-12 02:22:39 +000039
40LIBIPROUTE-$(CONFIG_IPLINK) += \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000041 ip_parse_common_args.o \
42 ipaddress.o \
43 iplink.o \
44 libnetlink.o \
45 ll_addr.o \
46 ll_map.o \
47 ll_types.o \
48 rt_names.o \
49 utils.o
Glenn L McGrath36c74782004-04-12 02:22:39 +000050
51LIBIPROUTE-$(CONFIG_IPROUTE) += \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000052 ip_parse_common_args.o \
53 iproute.o \
54 libnetlink.o \
55 ll_map.o \
56 rt_names.o \
57 rtm_map.o \
58 utils.o
Glenn L McGrath36c74782004-04-12 02:22:39 +000059
60LIBIPROUTE-$(CONFIG_IPTUNNEL) += \
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000061 ip_parse_common_args.o \
62 iptunnel.o \
63 rt_names.o \
64 utils.o
Glenn L McGrath36c74782004-04-12 02:22:39 +000065
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000066LIBIPROUTE-y:=$(sort $(LIBIPROUTE-y))
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000067
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000068LIBIPROUTE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBIPROUTE-y)))
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000069LIBIPROUTE_SRC-a:=$(wildcard $(srcdir)/*.c)
70LIBRARY_SRC-y+=$(LIBIPROUTE_SRC-y)
71LIBRARY_SRC-a+=$(LIBIPROUTE_SRC-a)
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000072
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000073LIBIPROUTE-obj:=$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000074
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000075ifneq ($(strip $(LIBIPROUTE-y)),)
76libraries-y+=$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR)
77endif
Bernhard Reutner-Fischer07a79e72006-03-09 09:03:37 +000078
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000079$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)/%,$(LIBIPROUTE-y))
80 $(do_ar)
81
82$(LIBIPROUTE_DIR)/%.o: $(srcdir)/%.c
83 $(compile.c)