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
7NETWORKING_AR:=networking.a
8ifndef $(NETWORKING_DIR)
Eric Andersen7daa0762004-10-08 07:46:08 +00009NETWORKING_DIR:=$(top_builddir)/networking/
Eric Andersen85208e22002-04-12 12:05:57 +000010endif
Eric Andersen7daa0762004-10-08 07:46:08 +000011srcdir=$(top_srcdir)/networking
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000012
Eric Andersen85208e22002-04-12 12:05:57 +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))
Rob Landleyd6e14d82006-02-21 19:11:35 +000047ifneq ($(strip $(NETWORKING-y)),)
Eric Andersen85208e22002-04-12 12:05:57 +000048libraries-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
Eric Andersen35e643b2003-07-28 07:40:39 +000059needcrypt-y:=
60needcrypt-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) := y
61
62ifeq ($(needcrypt-y),y)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000063 LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
Eric Andersen35e643b2003-07-28 07:40:39 +000064endif
65
Eric Andersen85208e22002-04-12 12:05:57 +000066$(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
Mike Frysingerb38673f2006-02-02 01:41:53 +000067 $(do_ar)
Eric Andersen85208e22002-04-12 12:05:57 +000068
Eric Andersen7daa0762004-10-08 07:46:08 +000069$(NETWORKING_DIR)%.o: $(srcdir)/%.c
Mike Frysingerb38673f2006-02-02 01:41:53 +000070 $(compile.c)