Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 4 | # |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 6 | # |
Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 7 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 8 | LIBIPROUTE_AR:=libiproute.a |
| 9 | ifndef $(LIBIPROUTE_DIR) |
| 10 | LIBIPROUTE_DIR:=$(top_builddir)/networking/libiproute |
| 11 | endif |
| 12 | srcdir=$(top_srcdir)/networking/libiproute |
Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 13 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 14 | LIBIPROUTE-y:= |
Glenn L McGrath | 8ae7501 | 2002-11-10 10:20:45 +0000 | [diff] [blame] | 15 | LIBIPROUTE-$(CONFIG_IP) += \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 16 | 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 McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 29 | |
Glenn L McGrath | 36c7478 | 2004-04-12 02:22:39 +0000 | [diff] [blame] | 30 | LIBIPROUTE-$(CONFIG_IPADDR) += \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 31 | 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 McGrath | 36c7478 | 2004-04-12 02:22:39 +0000 | [diff] [blame] | 39 | |
| 40 | LIBIPROUTE-$(CONFIG_IPLINK) += \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 41 | 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 McGrath | 36c7478 | 2004-04-12 02:22:39 +0000 | [diff] [blame] | 50 | |
| 51 | LIBIPROUTE-$(CONFIG_IPROUTE) += \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 52 | 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 McGrath | 36c7478 | 2004-04-12 02:22:39 +0000 | [diff] [blame] | 59 | |
| 60 | LIBIPROUTE-$(CONFIG_IPTUNNEL) += \ |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 61 | ip_parse_common_args.o \ |
| 62 | iptunnel.o \ |
| 63 | rt_names.o \ |
| 64 | utils.o |
Glenn L McGrath | 36c7478 | 2004-04-12 02:22:39 +0000 | [diff] [blame] | 65 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 66 | LIBIPROUTE-y:=$(sort $(LIBIPROUTE-y)) |
Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 67 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 68 | LIBIPROUTE_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBIPROUTE-y))) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 69 | LIBIPROUTE_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 70 | LIBRARY_SRC-y+=$(LIBIPROUTE_SRC-y) |
| 71 | LIBRARY_SRC-a+=$(LIBIPROUTE_SRC-a) |
Glenn L McGrath | 9a2d272 | 2002-11-10 01:33:55 +0000 | [diff] [blame] | 72 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 73 | LIBIPROUTE-obj:=$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 74 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 75 | ifneq ($(strip $(LIBIPROUTE-y)),) |
| 76 | libraries-y+=$(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR) |
| 77 | endif |
Bernhard Reutner-Fischer | 07a79e7 | 2006-03-09 09:03:37 +0000 | [diff] [blame] | 78 | |
Bernhard Reutner-Fischer | df10094 | 2006-03-13 19:04:00 +0000 | [diff] [blame] | 79 | $(LIBIPROUTE_DIR)/$(LIBIPROUTE_AR): $(patsubst %,$(LIBIPROUTE_DIR)/%,$(LIBIPROUTE-y)) |
| 80 | $(do_ar) |
| 81 | |
| 82 | $(LIBIPROUTE_DIR)/%.o: $(srcdir)/%.c |
| 83 | $(compile.c) |