blob: 650fc1a4ad20f6f0c67857a2b997829eb729af85 [file] [log] [blame]
Eric Andersen85208e22002-04-12 12:05:57 +00001# Makefile for busybox
2#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00003# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
Eric Andersen85208e22002-04-12 12:05:57 +00004#
Mike Frysinger0d4ee682005-09-24 06:01:57 +00005# Licensed under the GPL v2, see the file LICENSE in this tarball.
Eric Andersen85208e22002-04-12 12:05:57 +00006
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +00007NETWORKING_AR:=networking.a
8ifndef $(NETWORKING_DIR)
9NETWORKING_DIR:=$(top_builddir)/networking/
10endif
11srcdir=$(top_srcdir)/networking
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000012
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000013NETWORKING-y:=
Mike Frysingerb662f0d2005-05-11 03:59:53 +000014NETWORKING-$(CONFIG_ARPING) += arping.o
"Vladimir N. Oleynik"7b4aa6f2006-01-25 14:19:11 +000015NETWORKING-$(CONFIG_DNSD) += dnsd.o
Mike Frysingerb662f0d2005-05-11 03:59:53 +000016NETWORKING-$(CONFIG_ETHER_WAKE) += ether-wake.o
17NETWORKING-$(CONFIG_FAKEIDENTD) += fakeidentd.o
18NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o
19NETWORKING-$(CONFIG_FTPPUT) += ftpgetput.o
20NETWORKING-$(CONFIG_HOSTNAME) += hostname.o
21NETWORKING-$(CONFIG_HTTPD) += httpd.o
Rob Landleyb4c82322005-11-22 07:52:54 +000022NETWORKING-$(CONFIG_IFCONFIG) += ifconfig.o interface.o
Mike Frysingerb662f0d2005-05-11 03:59:53 +000023NETWORKING-$(CONFIG_IFUPDOWN) += ifupdown.o
24NETWORKING-$(CONFIG_INETD) += inetd.o
25NETWORKING-$(CONFIG_IP) += ip.o
26NETWORKING-$(CONFIG_IPCALC) += ipcalc.o
27NETWORKING-$(CONFIG_IPADDR) += ipaddr.o
28NETWORKING-$(CONFIG_IPLINK) += iplink.o
29NETWORKING-$(CONFIG_IPROUTE) += iproute.o
30NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
31NETWORKING-$(CONFIG_NAMEIF) += nameif.o
32NETWORKING-$(CONFIG_NC) += nc.o
33NETWORKING-$(CONFIG_NETSTAT) += netstat.o
34NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
35NETWORKING-$(CONFIG_PING) += ping.o
36NETWORKING-$(CONFIG_PING6) += ping6.o
37NETWORKING-$(CONFIG_ROUTE) += route.o
38NETWORKING-$(CONFIG_TELNET) += telnet.o
39NETWORKING-$(CONFIG_TELNETD) += telnetd.o
40NETWORKING-$(CONFIG_TFTP) += tftp.o
41NETWORKING-$(CONFIG_TRACEROUTE) += traceroute.o
42NETWORKING-$(CONFIG_VCONFIG) += vconfig.o
43NETWORKING-$(CONFIG_WGET) += wget.o
44NETWORKING-$(CONFIG_ZCIP) += zcip.o
Eric Andersen85208e22002-04-12 12:05:57 +000045
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000046NETWORKING-y:=$(sort $(NETWORKING-y))
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000047ifneq ($(strip $(NETWORKING-y)),)
48libraries-y+=$(NETWORKING_DIR)$(NETWORKING_AR)
Rob Landleyd6e14d82006-02-21 19:11:35 +000049endif
Eric Andersen85208e22002-04-12 12:05:57 +000050
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000051NETWORKING_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(NETWORKING-y))
52NETWORKING_SRC-a:=$(wildcard $(srcdir)/*.c)
53APPLET_SRC-y+=$(NETWORKING_SRC-y)
54APPLET_SRC-a+=$(NETWORKING_SRC-a)
55
56LIBRARY_DEFINE-y+= -I$(top_srcdir)/networking
57LIBRARY_DEFINE-a+= -I$(top_srcdir)/networking
58
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000059needcrypt-y:=
60needcrypt-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) := y
Eric Andersen35e643b2003-07-28 07:40:39 +000061
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000062ifeq ($(needcrypt-y),y)
63 LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
64endif
Bernhard Reutner-Fischer07a79e72006-03-09 09:03:37 +000065
Bernhard Reutner-Fischerdf100942006-03-13 19:04:00 +000066$(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
67 $(do_ar)
68
69$(NETWORKING_DIR)%.o: $(srcdir)/%.c
70 $(compile.c)