| 1 | # $Id: Makefile 3139 2006-02-05 17:30:49Z florian $
|
|---|
| 2 |
|
|---|
| 3 | include $(TOPDIR)/rules.mk
|
|---|
| 4 |
|
|---|
| 5 | PKG_NAME:= libpcap
|
|---|
| 6 | PKG_VERSION:= 0.9.4
|
|---|
| 7 | PKG_RELEASE:= 1
|
|---|
| 8 | PKG_MD5SUM:= 79025766e8027df154cb1f32de8a7974
|
|---|
| 9 |
|
|---|
| 10 | PKG_SOURCE_URL:= http://www.tcpdump.org/release/
|
|---|
| 11 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 12 |
|
|---|
| 13 | include $(TOPDIR)/package/rules.mk
|
|---|
| 14 |
|
|---|
| 15 | $(eval $(call PKG_template,LIBPCAP,libpcap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 16 |
|
|---|
| 17 | $(WRKBUILD)/.configured:
|
|---|
| 18 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 19 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 20 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 21 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 22 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 23 | ac_cv_linux_vers=$(FWRT_DEFAULT_KERNEL_HEADERS) \
|
|---|
| 24 | ./configure \
|
|---|
| 25 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 26 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 27 | --build=$(GNU_HOST_NAME) \
|
|---|
| 28 | --program-prefix="" \
|
|---|
| 29 | --program-suffix="" \
|
|---|
| 30 | --prefix=/usr \
|
|---|
| 31 | --exec-prefix=/usr \
|
|---|
| 32 | --bindir=/usr/bin \
|
|---|
| 33 | --datadir=/usr/share \
|
|---|
| 34 | --includedir=/usr/include \
|
|---|
| 35 | --infodir=/usr/share/info \
|
|---|
| 36 | --libdir=/usr/lib \
|
|---|
| 37 | --libexecdir=/usr/lib \
|
|---|
| 38 | --localstatedir=/var \
|
|---|
| 39 | --mandir=/usr/share/man \
|
|---|
| 40 | --sbindir=/usr/sbin \
|
|---|
| 41 | --sysconfdir=/etc \
|
|---|
| 42 | --disable-nls \
|
|---|
| 43 | --enable-largefile \
|
|---|
| 44 | --enable-shared \
|
|---|
| 45 | --enable-static \
|
|---|
| 46 | --disable-yydebug \
|
|---|
| 47 | --enable-ipv6 \
|
|---|
| 48 | --with-build-cc=$(HOSTCC) \
|
|---|
| 49 | --with-pcap=linux \
|
|---|
| 50 | );
|
|---|
| 51 | touch $@
|
|---|
| 52 |
|
|---|
| 53 | $(WRKBUILD)/.built:
|
|---|
| 54 | rm -rf $(WRKINST)
|
|---|
| 55 | mkdir -p $(WRKINST)
|
|---|
| 56 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 57 | CCOPT="$(TARGET_CFLAGS) -I${WRKDIR}/linux/include" \
|
|---|
| 58 | DESTDIR="$(WRKINST)" \
|
|---|
| 59 | all install
|
|---|
| 60 | touch $@
|
|---|
| 61 |
|
|---|
| 62 | $(IPKG_LIBPCAP):
|
|---|
| 63 | install -m0755 -d $(IDIR_LIBPCAP)/usr/lib
|
|---|
| 64 | $(CP) $(WRKINST)/usr/lib/libpcap.so.* $(IDIR_LIBPCAP)/usr/lib/
|
|---|
| 65 | $(RSTRIP) $(IDIR_LIBPCAP)
|
|---|
| 66 | $(IPKG_BUILD) $(IDIR_LIBPCAP) $(PACKAGE_DIR)
|
|---|
| 67 |
|
|---|
| 68 | $(STAGING_DIR)/usr/lib/libpcap.so: $(WRKBUILD)/.built
|
|---|
| 69 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 70 | $(CP) $(WRKINST)/usr/include/pcap* $(STAGING_DIR)/usr/include/
|
|---|
| 71 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 72 | $(CP) $(WRKINST)/usr/lib/libpcap.{a,so*} $(STAGING_DIR)/usr/lib/
|
|---|
| 73 | touch $(STAGING_DIR)/usr/lib/libpcap.so
|
|---|
| 74 |
|
|---|
| 75 | install-dev: $(STAGING_DIR)/usr/lib/libpcap.so
|
|---|
| 76 |
|
|---|
| 77 | uninstall-dev:
|
|---|
| 78 | rm -rf $(STAGING_DIR)/usr/include/pcap*
|
|---|
| 79 | rm -rf $(STAGING_DIR)/usr/lib/libpcap.{a,so*}
|
|---|
| 80 |
|
|---|
| 81 | compile-targets: install-dev
|
|---|
| 82 | clean-targets: uninstall-dev
|
|---|