2
1

udhcp.mk 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #############################################################
  2. #
  3. # uchdp DHCP client and/or server
  4. #
  5. #############################################################
  6. # Copyright (C) 2001-2005 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. UDHCP_SOURCE:=udhcp-0.9.8.tar.gz
  24. UDHCP_SITE:=http://udhcp.busybox.net/downloads/
  25. UDHCP_DIR:=$(BUILD_DIR)/udhcp-0.9.8
  26. $(DL_DIR)/$(UDHCP_SOURCE):
  27. $(WGET) -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE)
  28. udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE)
  29. $(UDHCP_DIR)/.unpacked: $(DL_DIR)/$(UDHCP_SOURCE)
  30. zcat $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  31. $(SED) 's/-Os -fomit-frame-pointer/$(TARGET_CFLAGS)/' $(UDHCP_DIR)/Makefile
  32. touch $(UDHCP_DIR)/.unpacked
  33. #$(UDHCP_DIR)/.unpacked:
  34. # (cd $(BUILD_DIR); \
  35. # CVS_PASSFILE=$(CVS_PASSFILE) \
  36. # cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp )
  37. # touch $(UDHCP_DIR)/.unpacked
  38. $(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/.unpacked
  39. $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR)
  40. $(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc
  41. -$(SED) 's/pump/udhcpc/' $(TARGET_DIR)/etc/pcmcia/network*
  42. -$(SED) 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network*
  43. -$(SED) 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network*
  44. mkdir -p $(TARGET_DIR)/sbin
  45. rm -f $(TARGET_DIR)/sbin/udhcpc
  46. cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/
  47. mkdir -p $(TARGET_DIR)/usr/share/udhcpc
  48. cp $(UDHCP_DIR)/samples/simple.script $(TARGET_DIR)/usr/share/udhcpc/default.script
  49. chmod a+x $(TARGET_DIR)/sbin/udhcpc $(TARGET_DIR)/usr/share/udhcpc/default.script
  50. udhcp: uclibc $(TARGET_DIR)/sbin/udhcpc
  51. udhcp-clean:
  52. rm -f $(TARGET_DIR)/sbin/udhcpc
  53. -$(MAKE) -C $(UDHCP_DIR) clean
  54. udhcp-dirclean:
  55. rm -rf $(UDHCP_DIR)
  56. #############################################################
  57. #
  58. # Toplevel Makefile options
  59. #
  60. #############################################################
  61. ifeq ($(strip $(BR2_PACKAGE_UDHCP)),y)
  62. TARGETS+=udhcp
  63. endif