blob: 2263acc00bfdf63133c8ce7e467963817c1f6fe2 [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
15NETWORKING-$(CONFIG_ETHER_WAKE) += ether-wake.o
16NETWORKING-$(CONFIG_FAKEIDENTD) += fakeidentd.o
17NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o
18NETWORKING-$(CONFIG_FTPPUT) += ftpgetput.o
19NETWORKING-$(CONFIG_HOSTNAME) += hostname.o
20NETWORKING-$(CONFIG_HTTPD) += httpd.o
Rob Landleyb4c82322005-11-22 07:52:54 +000021NETWORKING-$(CONFIG_IFCONFIG) += ifconfig.o interface.o
Mike Frysingerb662f0d2005-05-11 03:59:53 +000022NETWORKING-$(CONFIG_IFUPDOWN) += ifupdown.o
23NETWORKING-$(CONFIG_INETD) += inetd.o
24NETWORKING-$(CONFIG_IP) += ip.o
25NETWORKING-$(CONFIG_IPCALC) += ipcalc.o
26NETWORKING-$(CONFIG_IPADDR) += ipaddr.o
27NETWORKING-$(CONFIG_IPLINK) += iplink.o
28NETWORKING-$(CONFIG_IPROUTE) += iproute.o
29NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
30NETWORKING-$(CONFIG_NAMEIF) += nameif.o
31NETWORKING-$(CONFIG_NC) += nc.o
32NETWORKING-$(CONFIG_NETSTAT) += netstat.o
33NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
34NETWORKING-$(CONFIG_PING) += ping.o
35NETWORKING-$(CONFIG_PING6) += ping6.o
36NETWORKING-$(CONFIG_ROUTE) += route.o
37NETWORKING-$(CONFIG_TELNET) += telnet.o
38NETWORKING-$(CONFIG_TELNETD) += telnetd.o
39NETWORKING-$(CONFIG_TFTP) += tftp.o
40NETWORKING-$(CONFIG_TRACEROUTE) += traceroute.o
41NETWORKING-$(CONFIG_VCONFIG) += vconfig.o
42NETWORKING-$(CONFIG_WGET) += wget.o
43NETWORKING-$(CONFIG_ZCIP) += zcip.o
Eric Andersen85208e22002-04-12 12:05:57 +000044
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000045NETWORKING-y:=$(sort $(NETWORKING-y))
Eric Andersen85208e22002-04-12 12:05:57 +000046libraries-y+=$(NETWORKING_DIR)$(NETWORKING_AR)
47
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000048NETWORKING_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(NETWORKING-y))
49NETWORKING_SRC-a:=$(wildcard $(srcdir)/*.c)
50APPLET_SRC-y+=$(NETWORKING_SRC-y)
51APPLET_SRC-a+=$(NETWORKING_SRC-a)
52
53LIBRARY_DEFINE-y+= -I$(top_srcdir)/networking
54LIBRARY_DEFINE-a+= -I$(top_srcdir)/networking
55
Eric Andersen35e643b2003-07-28 07:40:39 +000056needcrypt-y:=
57needcrypt-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) := y
58
59ifeq ($(needcrypt-y),y)
Bernhard Reutner-Fischer7ca61b62006-01-15 14:04:57 +000060 LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES))
Eric Andersen35e643b2003-07-28 07:40:39 +000061endif
62
Eric Andersen85208e22002-04-12 12:05:57 +000063$(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
Mike Frysinger4d008962005-07-27 01:09:24 +000064 $(AR) $(ARFLAGS) $@ $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y))
Eric Andersen85208e22002-04-12 12:05:57 +000065
Eric Andersen7daa0762004-10-08 07:46:08 +000066$(NETWORKING_DIR)%.o: $(srcdir)/%.c
67 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<