diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2003-09-09 00:12:42 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2003-09-09 00:12:42 +0000 |
commit | cf158c59a09e08122eb6c7e274dfb414c223f607 (patch) | |
tree | 3ee34dd8787efae3cacb99ff6176e22480ab1636 /rules/libpcap.make | |
parent | e9b53ac86d9a120b872b757e44525061bf2b75e4 (diff) | |
download | ptxdist-cf158c59a09e08122eb6c7e274dfb414c223f607.tar.gz ptxdist-cf158c59a09e08122eb6c7e274dfb414c223f607.tar.xz |
* initial import
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunk@283 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/libpcap.make')
-rw-r--r-- | rules/libpcap.make | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/rules/libpcap.make b/rules/libpcap.make new file mode 100644 index 000000000..9a7bed28d --- /dev/null +++ b/rules/libpcap.make @@ -0,0 +1,137 @@ +# -*-makefile-*- +# $Id: libpcap.make,v 1.1 2003/09/09 00:12:42 mkl Exp $ +# +# (c) 2003 by Marc Kleine-Budde +# +# 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_LIBPCAP +PACKAGES += libpcap +endif + +# +# Paths and names +# +LIBPCAP_VERSION = 0.7.2 +LIBPCAP = libpcap-$(LIBPCAP_VERSION) +LIBPCAP_SUFFIX = tar.gz +LIBPCAP_URL = http://www.tcpdump.org/release/$(LIBPCAP).$(LIBPCAP_SUFFIX) +LIBPCAP_SOURCE = $(SRCDIR)/$(LIBPCAP).$(LIBPCAP_SUFFIX) +LIBPCAP_DIR = $(BUILDDIR)/$(LIBPCAP) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +libpcap_get: $(STATEDIR)/libpcap.get + +libpcap_get_deps = $(LIBPCAP_SOURCE) + +$(STATEDIR)/libpcap.get: $(libpcap_get_deps) + @$(call targetinfo, libpcap.get) + touch $@ + +$(LIBPCAP_SOURCE): + @$(call targetinfo, $(LIBPCAP_SOURCE)) + @$(call get, $(LIBPCAP_URL)) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +libpcap_extract: $(STATEDIR)/libpcap.extract + +libpcap_extract_deps = $(STATEDIR)/libpcap.get + +$(STATEDIR)/libpcap.extract: $(libpcap_extract_deps) + @$(call targetinfo, libpcap.extract) + @$(call clean, $(LIBPCAP_DIR)) + @$(call extract, $(LIBPCAP_SOURCE)) + touch $@ + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +libpcap_prepare: $(STATEDIR)/libpcap.prepare + +# +# dependencies +# +libpcap_prepare_deps = \ + $(STATEDIR)/libpcap.extract \ + $(STATEDIR)/virtual-xchain.install + +LIBPCAP_PATH = PATH=$(CROSS_PATH) +LIBPCAP_ENV = $(CROSS_ENV) +LIBPCAP_ENV += ac_cv_linux_vers=2 + + +# +# autoconf +# +LIBPCAP_AUTOCONF = --prefix=$(PTXCONF_PREFIX)/$(PTXCONF_GNU_TARGET) +LIBPCAP_AUTOCONF += --build=$(GNU_HOST) +LIBPCAP_AUTOCONF += --host=$(PTXCONF_GNU_TARGET) +LIBPCAP_AUTOCONF += --with-pcap=linux + +$(STATEDIR)/libpcap.prepare: $(libpcap_prepare_deps) + @$(call targetinfo, libpcap.prepare) + @$(call clean, $(LIBPCAP_BUILDDIR)) + cd $(LIBPCAP_DIR) && \ + $(LIBPCAP_PATH) $(LIBPCAP_ENV) \ + ./configure $(LIBPCAP_AUTOCONF) + touch $@ + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +libpcap_compile: $(STATEDIR)/libpcap.compile + +libpcap_compile_deps = $(STATEDIR)/libpcap.prepare + +$(STATEDIR)/libpcap.compile: $(libpcap_compile_deps) + @$(call targetinfo, libpcap.compile) + $(LIBPCAP_PATH) make -C $(LIBPCAP_DIR) + touch $@ + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +libpcap_install: $(STATEDIR)/libpcap.install + +$(STATEDIR)/libpcap.install: $(STATEDIR)/libpcap.compile + @$(call targetinfo, libpcap.install) + $(LIBPCAP_PATH) make -C $(LIBPCAP_DIR) install + touch $@ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +libpcap_targetinstall: $(STATEDIR)/libpcap.targetinstall + +libpcap_targetinstall_deps = + +$(STATEDIR)/libpcap.targetinstall: $(libpcap_targetinstall_deps) + @$(call targetinfo, libpcap.targetinstall) + touch $@ + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +libpcap_clean: + rm -rf $(STATEDIR)/libpcap.* + rm -rf $(LIBPCAP_DIR) + +# vim: syntax=make |