summaryrefslogtreecommitdiffstats
path: root/rules/dhcp.make
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2003-12-23 10:48:08 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2003-12-23 10:48:08 +0000
commitc0dc87ff0d6da2dcb49e933ed0b718524d7418f6 (patch)
treefbbd95019abca6b8e4973b0bb9c16f7f1a2d8810 /rules/dhcp.make
parent18a8faf660a5866d1b5e50e94cbd23a3c2bb8be0 (diff)
downloadptxdist-c0dc87ff0d6da2dcb49e933ed0b718524d7418f6.tar.gz
ptxdist-c0dc87ff0d6da2dcb49e933ed0b718524d7418f6.tar.xz
Added DHCP support. [BSP]
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunk@942 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/dhcp.make')
-rw-r--r--rules/dhcp.make128
1 files changed, 128 insertions, 0 deletions
diff --git a/rules/dhcp.make b/rules/dhcp.make
new file mode 100644
index 000000000..76ffc2adf
--- /dev/null
+++ b/rules/dhcp.make
@@ -0,0 +1,128 @@
+# -*-makefile-*-
+# $Id: dhcp.make,v 1.2 2003/12/23 10:48:08 robert Exp $
+#
+# Copyright (C) 2003 by Benedikt Spranger
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+ifdef PTXCONF_DHCP
+PACKAGES += dhcp
+endif
+
+#
+# Paths and names
+#
+DHCP_VERSION = 3.0pl2
+DHCP = dhcp-$(DHCP_VERSION)
+DHCP_SUFFIX = tar.gz
+DHCP_URL = ftp://ftp.isc.org/isc/dhcp/$(DHCP).$(DHCP_SUFFIX)
+DHCP_SOURCE = $(SRCDIR)/$(DHCP).$(DHCP_SUFFIX)
+DHCP_DIR = $(BUILDDIR)/$(DHCP)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+dhcp_get: $(STATEDIR)/dhcp.get
+
+dhcp_get_deps = $(DHCP_SOURCE)
+
+$(STATEDIR)/dhcp.get: $(dhcp_get_deps)
+ @$(call targetinfo, $@)
+ touch $@
+
+$(DHCP_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, $(DHCP_URL))
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+dhcp_extract: $(STATEDIR)/dhcp.extract
+
+dhcp_extract_deps = $(STATEDIR)/dhcp.get
+
+$(STATEDIR)/dhcp.extract: $(dhcp_extract_deps)
+ @$(call targetinfo, $@)
+ @$(call clean, $(DHCP_DIR))
+ @$(call extract, $(DHCP_SOURCE))
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+dhcp_prepare: $(STATEDIR)/dhcp.prepare
+
+#
+# dependencies
+#
+dhcp_prepare_deps = \
+ $(STATEDIR)/dhcp.extract \
+ $(STATEDIR)/virtual-xchain.install
+
+DHCP_PATH = PATH=$(CROSS_PATH)
+DHCP_ENV = $(CROSS_ENV)
+#DHCP_ENV +=
+
+$(STATEDIR)/dhcp.prepare: $(dhcp_prepare_deps)
+ @$(call targetinfo, $@)
+ @$(call clean, $(DHCP_DIR)/config.cache)
+ cd $(DHCP_DIR) && \
+ $(DHCP_PATH) $(DHCP_ENV) \
+ ./configure $(PTXCONF_GNU_TARGET)
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+dhcp_compile: $(STATEDIR)/dhcp.compile
+
+dhcp_compile_deps = $(STATEDIR)/dhcp.prepare
+
+$(STATEDIR)/dhcp.compile: $(dhcp_compile_deps)
+ @$(call targetinfo, $@)
+ $(DHCP_PATH) make -C $(DHCP_DIR)
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+dhcp_install: $(STATEDIR)/dhcp.install
+
+$(STATEDIR)/dhcp.install: $(STATEDIR)/dhcp.compile
+ @$(call targetinfo, $@)
+ $(DHCP_PATH) make -C $(DHCP_DIR) install
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+dhcp_targetinstall: $(STATEDIR)/dhcp.targetinstall
+
+dhcp_targetinstall_deps = $(STATEDIR)/dhcp.compile
+
+$(STATEDIR)/dhcp.targetinstall: $(dhcp_targetinstall_deps)
+ @$(call targetinfo, $@)
+ touch $@
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+dhcp_clean:
+ rm -rf $(STATEDIR)/dhcp.*
+ rm -rf $(DHCP_DIR)
+
+# vim: syntax=make