1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE_SITE
:= http
://www.tcpdump.org
/release
8 PKG_SOURCE_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
10 PKG_SOURCE_DIR
:= $(PKG_NAME
)-$(PKG_VERSION
)
11 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
14 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
16 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) x
$(PKG_SOURCE_SITE
)
18 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
19 mkdir
-p
$(TOOL_BUILD_DIR
)
20 $(PKG_SOURCE_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
21 $(PATCH
) $(PKG_BUILD_DIR
) . .
/patches
22 touch
$(PKG_BUILD_DIR
)/.patched
24 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
25 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
26 ac_cv_linux_vers
=$(BR2_DEFAULT_KERNEL_HEADERS
) \
27 BUILD_CC
=$(TARGET_CC
) HOSTCC
=$(HOSTCC
) \
28 $(TARGET_CONFIGURE_OPTS
) \
29 CFLAGS
="$(TARGET_CFLAGS)" \
31 --target
=$(GNU_TARGET_NAME
) \
32 --host
=$(GNU_TARGET_NAME
) \
33 --build
=$(GNU_HOST_NAME
) \
34 --with-build-cc
=$(HOSTCC
) \
39 touch
$(PKG_BUILD_DIR
)/.configured
41 $(PKG_BUILD_DIR
)/libpcap.a
: $(PKG_BUILD_DIR
)/.configured
42 $(MAKE
) AR
="$(TARGET_CROSS)ar" -C
$(PKG_BUILD_DIR
)
44 $(STAGING_DIR
)/lib
/libpcap.a
: $(PKG_BUILD_DIR
)/libpcap.a
45 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
46 prefix=$(STAGING_DIR
) \
47 exec_prefix=$(STAGING_DIR
) \
48 bindir=$(STAGING_DIR
)/bin \
49 datadir=$(STAGING_DIR
)/share \
52 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
53 prepare
: $(PKG_BUILD_DIR
)/.patched
54 compile
: $(STAGING_DIR
)/lib
/libpcap.a
58 rm -rf
$(PKG_BUILD_DIR
)
59 rm -f
$(STAGING_DIR
)/lib
/libpcap
*