2005-01-18 01:28:09 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
2007-08-12 00:26:56 +02:00
|
|
|
# tcpdump
|
2005-01-18 01:28:09 +01:00
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
|
|
|
|
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
|
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
TCPDUMP_VERSION:=3.9.5
|
|
|
|
TCPDUMP_DIR:=$(BUILD_DIR)/tcpdump-$(TCPDUMP_VERSION)
|
2005-01-18 01:28:09 +01:00
|
|
|
TCPDUMP_SITE:=http://www.tcpdump.org/release
|
2007-07-11 16:06:06 +02:00
|
|
|
TCPDUMP_SOURCE:=tcpdump-$(TCPDUMP_VERSION).tar.gz
|
2006-10-01 17:17:52 +02:00
|
|
|
TCPDUMP_CAT:=$(ZCAT)
|
2005-01-18 01:28:09 +01:00
|
|
|
|
2007-09-01 21:42:11 +02:00
|
|
|
ifneq ($(BR2_PACKAGE_TCPDUMP_SMB),y)
|
|
|
|
TCPDUMP_ENABLE_SMB:=--disable-smb
|
|
|
|
else
|
|
|
|
TCPDUMP_ENABLE_SMB:=--enable-smb
|
|
|
|
endif
|
|
|
|
|
2005-01-18 01:28:09 +01:00
|
|
|
$(DL_DIR)/$(TCPDUMP_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(TCPDUMP_SITE)/$(TCPDUMP_SOURCE)
|
|
|
|
|
|
|
|
tcpdump-source: $(DL_DIR)/$(TCPDUMP_SOURCE)
|
|
|
|
|
|
|
|
$(TCPDUMP_DIR)/.unpacked: $(DL_DIR)/$(TCPDUMP_SOURCE)
|
|
|
|
$(TCPDUMP_CAT) $(DL_DIR)/$(TCPDUMP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-08-22 11:44:25 +02:00
|
|
|
toolchain/patch-kernel.sh $(TCPDUMP_DIR) package/tcpdump tcpdump\*.patch
|
2007-10-14 01:12:05 +02:00
|
|
|
$(CONFIG_UPDATE) $(TCPDUMP_DIR)
|
2007-05-15 13:24:27 +02:00
|
|
|
touch $@
|
2005-01-18 01:28:09 +01:00
|
|
|
|
|
|
|
$(TCPDUMP_DIR)/.configured: $(TCPDUMP_DIR)/.unpacked
|
2007-09-25 14:34:09 +02:00
|
|
|
(cd $(TCPDUMP_DIR); rm -f config.cache; \
|
2005-01-18 01:28:09 +01:00
|
|
|
ac_cv_linux_vers=$(BR2_DEFAULT_KERNEL_HEADERS) \
|
2005-12-21 09:17:34 +01:00
|
|
|
BUILD_CC=$(TARGET_CC) HOSTCC="$(HOSTCC)" \
|
2005-01-18 01:28:09 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-01-18 01:28:09 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2007-01-14 04:52:21 +01:00
|
|
|
--prefix=/usr \
|
2007-08-19 23:17:48 +02:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
2005-09-24 07:40:28 +02:00
|
|
|
--without-crypto \
|
2007-09-01 21:42:11 +02:00
|
|
|
$(TCPDUMP_ENABLE_SMB) \
|
|
|
|
$(DISABLE_IPV6) \
|
2005-01-18 01:28:09 +01:00
|
|
|
)
|
|
|
|
$(SED) '/HAVE_PCAP_DEBUG/d' $(TCPDUMP_DIR)/config.h
|
2007-05-15 13:24:27 +02:00
|
|
|
touch $@
|
2005-01-18 01:28:09 +01:00
|
|
|
|
|
|
|
$(TCPDUMP_DIR)/tcpdump: $(TCPDUMP_DIR)/.configured
|
2007-01-14 04:52:21 +01:00
|
|
|
$(MAKE) CC="$(TARGET_CC)" \
|
2007-08-19 23:17:48 +02:00
|
|
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
2005-01-18 01:28:09 +01:00
|
|
|
LIBS="-lpcap" \
|
2007-08-12 00:26:56 +02:00
|
|
|
INCLS="-I. -I$(STAGING_DIR)/usr/include" \
|
2005-01-18 01:28:09 +01:00
|
|
|
-C $(TCPDUMP_DIR)
|
2007-01-14 04:52:21 +01:00
|
|
|
|
2007-08-19 23:17:48 +02:00
|
|
|
$(TARGET_DIR)/usr/sbin/tcpdump: $(TCPDUMP_DIR)/tcpdump
|
2007-05-15 13:24:27 +02:00
|
|
|
cp -f $< $@
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $@
|
2005-01-18 01:28:09 +01:00
|
|
|
|
2007-08-19 23:17:48 +02:00
|
|
|
tcpdump: uclibc zlib libpcap $(TARGET_DIR)/usr/sbin/tcpdump
|
2005-01-18 01:28:09 +01:00
|
|
|
|
|
|
|
tcpdump-clean:
|
2007-08-19 23:17:48 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/tcpdump
|
2005-01-18 01:28:09 +01:00
|
|
|
-$(MAKE) -C $(TCPDUMP_DIR) clean
|
|
|
|
|
|
|
|
tcpdump-dirclean:
|
|
|
|
rm -rf $(TCPDUMP_DIR)
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_TCPDUMP)),y)
|
|
|
|
TARGETS+=tcpdump
|
|
|
|
endif
|