3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= 56a9d4615d8354fcfe8cff8c8443c77b
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
)
16 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
18 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
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
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)" \
33 --target
=$(GNU_TARGET_NAME
) \
34 --host
=$(GNU_TARGET_NAME
) \
35 --build
=$(GNU_HOST_NAME
) \
36 --with-build-cc
=$(HOSTCC
) \
41 touch
$(PKG_BUILD_DIR
)/.configured
43 $(PKG_BUILD_DIR
)/libpcap.a
: $(PKG_BUILD_DIR
)/.configured
44 $(MAKE
) AR
="$(TARGET_CROSS)ar" -C
$(PKG_BUILD_DIR
)
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 \
54 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
55 prepare
: $(PKG_BUILD_DIR
)/.patched
56 compile
: $(STAGING_DIR
)/lib
/libpcap.a
60 rm -rf
$(PKG_BUILD_DIR
)
61 rm -f
$(STAGING_DIR
)/lib
/libpcap
*