Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 1 | # Makefile for busybox |
| 2 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 4 | # |
Mike Frysinger | 0d4ee68 | 2005-09-24 06:01:57 +0000 | [diff] [blame] | 5 | # Licensed under the GPL v2, see the file LICENSE in this tarball. |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 6 | |
| 7 | NETWORKING_AR:=networking.a |
| 8 | ifndef $(NETWORKING_DIR) |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 9 | NETWORKING_DIR:=$(top_builddir)/networking/ |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 10 | endif |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 11 | srcdir=$(top_srcdir)/networking |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 12 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 13 | NETWORKING-y:= |
Mike Frysinger | b662f0d | 2005-05-11 03:59:53 +0000 | [diff] [blame] | 14 | NETWORKING-$(CONFIG_ARPING) += arping.o |
"Vladimir N. Oleynik" | 7b4aa6f | 2006-01-25 14:19:11 +0000 | [diff] [blame^] | 15 | NETWORKING-$(CONFIG_DNSD) += dnsd.o |
Mike Frysinger | b662f0d | 2005-05-11 03:59:53 +0000 | [diff] [blame] | 16 | NETWORKING-$(CONFIG_ETHER_WAKE) += ether-wake.o |
| 17 | NETWORKING-$(CONFIG_FAKEIDENTD) += fakeidentd.o |
| 18 | NETWORKING-$(CONFIG_FTPGET) += ftpgetput.o |
| 19 | NETWORKING-$(CONFIG_FTPPUT) += ftpgetput.o |
| 20 | NETWORKING-$(CONFIG_HOSTNAME) += hostname.o |
| 21 | NETWORKING-$(CONFIG_HTTPD) += httpd.o |
Rob Landley | b4c8232 | 2005-11-22 07:52:54 +0000 | [diff] [blame] | 22 | NETWORKING-$(CONFIG_IFCONFIG) += ifconfig.o interface.o |
Mike Frysinger | b662f0d | 2005-05-11 03:59:53 +0000 | [diff] [blame] | 23 | NETWORKING-$(CONFIG_IFUPDOWN) += ifupdown.o |
| 24 | NETWORKING-$(CONFIG_INETD) += inetd.o |
| 25 | NETWORKING-$(CONFIG_IP) += ip.o |
| 26 | NETWORKING-$(CONFIG_IPCALC) += ipcalc.o |
| 27 | NETWORKING-$(CONFIG_IPADDR) += ipaddr.o |
| 28 | NETWORKING-$(CONFIG_IPLINK) += iplink.o |
| 29 | NETWORKING-$(CONFIG_IPROUTE) += iproute.o |
| 30 | NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o |
| 31 | NETWORKING-$(CONFIG_NAMEIF) += nameif.o |
| 32 | NETWORKING-$(CONFIG_NC) += nc.o |
| 33 | NETWORKING-$(CONFIG_NETSTAT) += netstat.o |
| 34 | NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o |
| 35 | NETWORKING-$(CONFIG_PING) += ping.o |
| 36 | NETWORKING-$(CONFIG_PING6) += ping6.o |
| 37 | NETWORKING-$(CONFIG_ROUTE) += route.o |
| 38 | NETWORKING-$(CONFIG_TELNET) += telnet.o |
| 39 | NETWORKING-$(CONFIG_TELNETD) += telnetd.o |
| 40 | NETWORKING-$(CONFIG_TFTP) += tftp.o |
| 41 | NETWORKING-$(CONFIG_TRACEROUTE) += traceroute.o |
| 42 | NETWORKING-$(CONFIG_VCONFIG) += vconfig.o |
| 43 | NETWORKING-$(CONFIG_WGET) += wget.o |
| 44 | NETWORKING-$(CONFIG_ZCIP) += zcip.o |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 45 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 46 | NETWORKING-y:=$(sort $(NETWORKING-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 47 | libraries-y+=$(NETWORKING_DIR)$(NETWORKING_AR) |
| 48 | |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 49 | NETWORKING_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(NETWORKING-y)) |
| 50 | NETWORKING_SRC-a:=$(wildcard $(srcdir)/*.c) |
| 51 | APPLET_SRC-y+=$(NETWORKING_SRC-y) |
| 52 | APPLET_SRC-a+=$(NETWORKING_SRC-a) |
| 53 | |
| 54 | LIBRARY_DEFINE-y+= -I$(top_srcdir)/networking |
| 55 | LIBRARY_DEFINE-a+= -I$(top_srcdir)/networking |
| 56 | |
Eric Andersen | 35e643b | 2003-07-28 07:40:39 +0000 | [diff] [blame] | 57 | needcrypt-y:= |
| 58 | needcrypt-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) := y |
| 59 | |
| 60 | ifeq ($(needcrypt-y),y) |
Bernhard Reutner-Fischer | 7ca61b6 | 2006-01-15 14:04:57 +0000 | [diff] [blame] | 61 | LIBRARIES := -lcrypt $(filter-out -lcrypt,$(LIBRARIES)) |
Eric Andersen | 35e643b | 2003-07-28 07:40:39 +0000 | [diff] [blame] | 62 | endif |
| 63 | |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 64 | $(NETWORKING_DIR)$(NETWORKING_AR): $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) |
Mike Frysinger | 4d00896 | 2005-07-27 01:09:24 +0000 | [diff] [blame] | 65 | $(AR) $(ARFLAGS) $@ $(patsubst %,$(NETWORKING_DIR)%, $(NETWORKING-y)) |
Eric Andersen | 85208e2 | 2002-04-12 12:05:57 +0000 | [diff] [blame] | 66 | |
Eric Andersen | 7daa076 | 2004-10-08 07:46:08 +0000 | [diff] [blame] | 67 | $(NETWORKING_DIR)%.o: $(srcdir)/%.c |
| 68 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< |