fix some dropbear client issues
[openwrt.git] / package / libpcap / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := libpcap
6 PKG_VERSION := 0.8.3
7 PKG_RELEASE := 1
8 PKG_MD5SUM := 56a9d4615d8354fcfe8cff8c8443c77b
9
10 PKG_SOURCE_SITE := http://www.tcpdump.org/release
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_CAT := zcat
13 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
15
16 $(DL_DIR)/$(PKG_SOURCE_FILE):
17 mkdir -p $(DL_DIR)
18 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
19
20 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
21 mkdir -p $(TOOL_BUILD_DIR)
22 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
23 $(PATCH) $(PKG_BUILD_DIR) . ./patches
24 touch $(PKG_BUILD_DIR)/.patched
25
26 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
27 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
28 ac_cv_linux_vers=$(BR2_DEFAULT_KERNEL_HEADERS) \
29 BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
30 $(TARGET_CONFIGURE_OPTS) \
31 CFLAGS="$(TARGET_CFLAGS)" \
32 ./configure \
33 --target=$(GNU_TARGET_NAME) \
34 --host=$(GNU_TARGET_NAME) \
35 --build=$(GNU_HOST_NAME) \
36 --with-build-cc=$(HOSTCC) \
37 --disable-yydebug \
38 --prefix=/usr \
39 --with-pcap=linux \
40 );
41 touch $(PKG_BUILD_DIR)/.configured
42
43 $(PKG_BUILD_DIR)/libpcap.a: $(PKG_BUILD_DIR)/.configured
44 $(MAKE) AR="$(TARGET_CROSS)ar" -C $(PKG_BUILD_DIR)
45
46 $(STAGING_DIR)/lib/libpcap.a: $(PKG_BUILD_DIR)/libpcap.a
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 prefix=$(STAGING_DIR) \
49 exec_prefix=$(STAGING_DIR) \
50 bindir=$(STAGING_DIR)/bin \
51 datadir=$(STAGING_DIR)/share \
52 install
53
54 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
55 prepare: $(PKG_BUILD_DIR)/.patched
56 compile: $(STAGING_DIR)/lib/libpcap.a
57 install:
58
59 clean:
60 rm -rf $(PKG_BUILD_DIR)
61 rm -f $(STAGING_DIR)/lib/libpcap*
This page took 0.070756 seconds and 5 git commands to generate.