add mac partition support
[openwrt.git] / obsolete-buildroot / make / udhcp.mk
1 #############################################################
2 #
3 # uchdp DHCP client and/or server
4 #
5 #############################################################
6 # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
7 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU Library General Public License as
11 # published by the Free Software Foundation; either version 2 of the
12 # License, or (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Library General Public License for more details.
18 #
19 # You should have received a copy of the GNU Library General Public
20 # License along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 # USA
23
24 UDHCP_SOURCE:=udhcp-0.9.8.tar.gz
25 UDHCP_SITE:=http://udhcp.busybox.net/downloads/
26 UDHCP_DIR:=$(BUILD_DIR)/udhcp-0.9.8
27
28 $(DL_DIR)/$(UDHCP_SOURCE):
29 $(WGET) -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE)
30
31 udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE)
32
33 $(UDHCP_DIR)/.unpacked: $(DL_DIR)/$(UDHCP_SOURCE)
34 zcat $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
35 touch $(UDHCP_DIR)/.unpacked
36
37 #$(UDHCP_DIR)/.unpacked:
38 # (cd $(BUILD_DIR); \
39 # CVS_PASSFILE=$(CVS_PASSFILE) \
40 # cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp )
41 # touch $(UDHCP_DIR)/.unpacked
42
43 $(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/.unpacked
44 $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR)
45
46 $(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc
47 $(SED) 's/pump/udhcpc/' $(TARGET_DIR)/etc/pcmcia/network*
48 $(SED) 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network*
49 $(SED) 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network*
50 mkdir -p $(TARGET_DIR)/sbin
51 rm -f $(TARGET_DIR)/sbin/udhcpc
52 cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/
53 mkdir -p $(TARGET_DIR)/usr/share/udhcpc
54 cp $(UDHCP_DIR)/samples/simple.script $(TARGET_DIR)/usr/share/udhcpc/default.script
55 chmod a+x $(TARGET_DIR)/sbin/udhcpc $(TARGET_DIR)/usr/share/udhcpc/default.script
56
57 udhcp: uclibc $(TARGET_DIR)/sbin/udhcpc
58
59 udhcp-clean:
60 rm -f $(TARGET_DIR)/sbin/udhcpc
61 -$(MAKE) -C $(UDHCP_DIR) clean
62
63 udhcp-dirclean:
64 rm -rf $(UDHCP_DIR)
This page took 0.045264 seconds and 5 git commands to generate.