blob: fcc7f48cedf78a01e4711eadf935200115cd866f [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#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19
20LIBIPROUTE_AR:=libiproute.a
21ifndef $(LIBIPROUTE_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +000022LIBIPROUTE_DIR:=$(top_builddir)/networking/libiproute/
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000023endif
Eric Andersen7daa0762004-10-08 07:46:08 +000024srcdir=$(top_srcdir)/networking/libiproute
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000025
Glenn L McGrath8ae75012002-11-10 10:20:45 +000026LIBIPROUTE-$(CONFIG_IP) += \
Glenn L McGrathf112daa2002-12-01 23:04:06 +000027 ip_parse_common_args.o \
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000028 ipaddress.o \
29 iplink.o \
30 iproute.o \
31 iptunnel.o \
32 libnetlink.o \
33 ll_addr.o \
34 ll_map.o \
35 ll_proto.o \
36 ll_types.o \
37 rt_names.o \
38 rtm_map.o \
39 utils.o
40
Glenn L McGrath36c74782004-04-12 02:22:39 +000041LIBIPROUTE-$(CONFIG_IPADDR) += \
42 ip_parse_common_args.o \
43 ipaddress.o \
44 libnetlink.o \
45 ll_addr.o \
46 ll_map.o \
47 ll_types.o \
48 rt_names.o \
49 utils.o
50
51LIBIPROUTE-$(CONFIG_IPLINK) += \
52 ip_parse_common_args.o \
53 ipaddress.o \
54 iplink.o \
55 libnetlink.o \
56 ll_addr.o \
57 ll_map.o \
58 ll_types.o \
59 rt_names.o \
60 utils.o
61
62LIBIPROUTE-$(CONFIG_IPROUTE) += \
63 ip_parse_common_args.o \
64 iproute.o \
65 libnetlink.o \
66 ll_map.o \
67 rt_names.o \
68 rtm_map.o \
69 utils.o
70
71LIBIPROUTE-$(CONFIG_IPTUNNEL) += \
72 ip_parse_common_args.o \
73 iptunnel.o \
74 rt_names.o \
75 utils.o
76
Glenn L McGrath9a2d2722002-11-10 01:33:55 +000077libraries-y+=$(LIBIPROUTE_DIR)$(LIBIPROUTE_AR)
78
79$(LIBIPROUTE_DIR)$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)%, $(LIBIPROUTE-y))
80 $(AR) -ro $@ $(patsubst %,$(LIBIPROUTE_DIR)%, $(LIBIPROUTE-y))
81
Eric Andersen7daa0762004-10-08 07:46:08 +000082$(LIBIPROUTE_DIR)%.o: $(srcdir)/%.c
83 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
84