view src/winpcap.mk @ 6215:d18a5545df0d release

build-gettext: Don't build emacs bindings. * src/build-gettext.mk: The `emacs` installed on the build system might be incompatible with the STL built by build-gcc. We probably don't need the emacs bindings for the `gettext` build tool anyway. So skip building those bindings.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 07 May 2022 12:01:10 +0200
parents 13be64f9f16d
children
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := winpcap
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 4_1_2
$(PKG)_CHECKSUM := 9155687ab23dbb2348e7cf93caf8a84f51e94795
$(PKG)_SUBDIR   := winpcap
$(PKG)_FILE     := WpcapSrc_$($(PKG)_VERSION).zip
$(PKG)_URL      := http://www.winpcap.org/install/bin/$($(PKG)_FILE)
$(PKG)_DEPS     :=

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://www.winpcap.org/devel.htm' | \
    $(SED) -n 's,.*WpcapSrc_\([0-9][^>]*\)\.zip.*,\1,p' | \
    head -1
endef

define $(PKG)_BUILD
    # build
    cd '$(1)' && $(MXE_CC) -ICommon -IpacketNtx/Dll -O -c '$(1)/packetNtx/Dll/Packet32.c'
    $(MXE_AR) rc '$(1)/libpacket.a' '$(1)/Packet32.o'
    $(MXE_RANLIB) '$(1)/libpacket.a'
    $(INSTALL) -d '$(HOST_INCDIR)'
    $(INSTALL) -m644 '$(1)/Common'/*.h '$(HOST_INCDIR)'
    $(INSTALL) -d '$(HOST_LIBDIR)'
    $(INSTALL) -m644 '$(1)/libpacket.a' '$(HOST_LIBDIR)'

    mv '$(1)/wpcap/libpcap/Win32/Include/ip6_misc.h' '$(1)/file.tmp'
    mv '$(1)/file.tmp' '$(1)/wpcap/libpcap/Win32/Include/IP6_misc.h'

    CC='$(MXE_CC)' \
    AR='$(MXE_AR)' \
    RANLIB='$(MXE_RANLIB)' \
    $(MAKE) -C '$(1)/wpcap/PRJ' -j 1 libwpcap.a
    $(INSTALL) -d '$(HOST_INCDIR)'
    $(INSTALL) -m644 '$(1)/wpcap/libpcap/'*.h '$(1)/wpcap/Win32-Extensions/'*.h '$(HOST_INCDIR)'
    $(INSTALL) -d '$(HOST_LIBDIR)'
    $(INSTALL) -m644 '$(1)/wpcap/PRJ/libwpcap.a' '$(HOST_LIBDIR)'
endef