1 #############################################################
5 #############################################################
6 # Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
7 # Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
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.
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.
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
25 LIBPCAP_DIR
:=$(BUILD_DIR
)/libpcap-
$(LIBPCAP_VER
)
26 LIBPCAP_SITE
:=http
://www.tcpdump.org
/release
27 LIBPCAP_SOURCE
:=libpcap-
$(LIBPCAP_VER
).
tar.gz
30 $(DL_DIR
)/$(LIBPCAP_SOURCE
):
31 $(WGET
) -P
$(DL_DIR
) $(LIBPCAP_SITE
)/$(LIBPCAP_SOURCE
)
33 libpcap-source
: $(DL_DIR
)/$(LIBPCAP_SOURCE
)
35 $(LIBPCAP_DIR
)/.unpacked
: $(DL_DIR
)/$(LIBPCAP_SOURCE
)
36 $(LIBPCAP_CAT
) $(DL_DIR
)/$(LIBPCAP_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
37 toolchain
/patch-kernel.sh
$(LIBPCAP_DIR
) package
/libpcap
/ *.patch
38 touch
$(LIBPCAP_DIR
)/.unpacked
40 $(LIBPCAP_DIR
)/.configured
: $(LIBPCAP_DIR
)/.unpacked
43 ac_cv_linux_vers
=$(BR2_DEFAULT_KERNEL_HEADERS
) \
44 BUILD_CC
=$(TARGET_CC
) HOSTCC
="$(HOSTCC)" \
45 $(TARGET_CONFIGURE_OPTS
) \
46 CFLAGS
="$(TARGET_CFLAGS)" \
48 --target
=$(GNU_TARGET_NAME
) \
49 --host
=$(GNU_TARGET_NAME
) \
50 --build
=$(GNU_HOST_NAME
) \
51 --with-build-cc
="$(HOSTCC)" \
56 touch
$(LIBPCAP_DIR
)/.configured
58 $(LIBPCAP_DIR
)/libpcap.a
: $(LIBPCAP_DIR
)/.configured
61 AR
="$(TARGET_CROSS)ar" \
64 $(STAGING_DIR
)/lib
/libpcap.a
: $(LIBPCAP_DIR
)/libpcap.a
67 prefix=$(STAGING_DIR
) \
68 exec_prefix=$(STAGING_DIR
) \
69 bindir=$(STAGING_DIR
)/bin \
70 datadir=$(STAGING_DIR
)/share \
73 libpcap
: uclibc zlib
$(STAGING_DIR
)/lib
/libpcap.a
76 rm -f
$(STAGING_DIR
)/include/pcap
*.h
$(STAGING_DIR
)/lib
/libpcap.a
77 -$(MAKE
) -C
$(LIBPCAP_DIR
) clean
81 #############################################################
83 # Toplevel Makefile options
85 #############################################################
86 ifeq ($(strip $(BR2_PACKAGE_LIBPCAP
)),y
)