view src/winpcap.mk @ 5531:eae508c12529

Add build rule for build-octave (bug #49503). * src/build-octave.mk: Add new build rule for build-octave which can be used for cross-building binary packages that depend on Octave as a build tool. * dist-files.mk: Add new file to list. * index.html: Add new package to list. * src/of-communications.mk, src/of-image.mk, src/of-mapping.mk, src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk, src/of-windows.mk: Add optional dependency on build-octave. * configure.ac: Add new configure switch "--disable-system-octave" that is needed to build the build-octave package. * Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the default build tools and build it only if a package explicitly depends on it. Display warning about missing native Octave version only if necessary.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 08 Sep 2020 23:04:38 +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