annotate src/winpcap.mk @ 714:29f1ba4559ae

point consequently to "doc/index.html" instead of "doc/index.html or doc/README"
author Volker Grabsch <vog@notjusthosting.com>
date Mon, 08 Feb 2010 00:58:06 +0100
parents dab071eac9c0
children bf4bcb3370fa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
641
dab071eac9c0 simplified file markers
Volker Grabsch <vog@notjusthosting.com>
parents: 540
diff changeset
1 # This file is part of mingw-cross-env.
714
29f1ba4559ae point consequently to "doc/index.html" instead of "doc/index.html or doc/README"
Volker Grabsch <vog@notjusthosting.com>
parents: 641
diff changeset
2 # See doc/index.html for further information.
414
d2a6561bcb6d add a copyright notice and license to each source file
Volker Grabsch <vog@notjusthosting.com>
parents: 306
diff changeset
3
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 # WinPcap
306
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
5 PKG := winpcap
448
e9afec55fd6b improved version recognition, enable the notation of ignored (bad) package versions
Volker Grabsch <vog@notjusthosting.com>
parents: 417
diff changeset
6 $(PKG)_IGNORE :=
537
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
7 $(PKG)_VERSION := 4_1_1
2cb44815809c update version of package winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 448
diff changeset
8 $(PKG)_CHECKSUM := f2f7dd0dc29dd3d89bfdab5a9ed192aa5ffa8eb0
306
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
9 $(PKG)_SUBDIR := winpcap
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
10 $(PKG)_FILE := WpcapSrc_$($(PKG)_VERSION).zip
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
11 $(PKG)_WEBSITE := http://www.winpcap.org/
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
12 $(PKG)_URL := http://www.winpcap.org/install/bin/$($(PKG)_FILE)
85ffa9259036 validate downloads using SHA-1 checksums
Volker Grabsch <vog@notjusthosting.com>
parents: 285
diff changeset
13 $(PKG)_DEPS := gcc
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 define $(PKG)_UPDATE
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 wget -q -O- 'http://www.winpcap.org/devel.htm' | \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17 $(SED) -n 's,.*WpcapSrc_\([0-9][^>]*\)\.zip.*,\1,p' | \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18 head -1
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 endef
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 define $(PKG)_BUILD
540
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
22 $(SED) '/#include/ s,\\,/,g' -i '$(1)/packetNtx/Dll/Packet32.c'
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
23 $(SED) 's,#include <packet32\.h>,#include <Packet32.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
24 $(SED) 's,#include <StrSafe\.h>,#include <strsafe.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
25 $(SED) 's,#include <Iphlpapi\.h>,#include <iphlpapi.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
26 $(SED) 's,#include <IPIfCons\.h>,#include <ipifcons.h>,' -i '$(1)/packetNtx/Dll/Packet32.c'
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
27 cd '$(1)' && $(TARGET)-gcc -ICommon -IpacketNtx/Dll -O -c '$(1)/packetNtx/Dll/Packet32.c'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
28 $(TARGET)-ar rc '$(1)/libpacket.a' '$(1)/Packet32.o'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29 $(TARGET)-ranlib '$(1)/libpacket.a'
285
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
30 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
540
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
31 $(INSTALL) -m644 '$(1)/Common'/*.h '$(PREFIX)/$(TARGET)/include/'
285
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
32 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
33 $(INSTALL) -m644 '$(1)/libpacket.a' '$(PREFIX)/$(TARGET)/lib/'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
34 mv '$(1)/wpcap/libpcap/Win32/Include/ip6_misc.h' '$(1)/wpcap/libpcap/Win32/Include/IP6_misc.h'
540
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
35 $(SED) 's,#include <packet32\.h>,#include <Packet32.h>,' -i '$(1)/wpcap/Win32-Extensions/Win32-Extensions.c'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
36 $(SED) 's,(char\*)tUstr +=,tUstr +=,' -i '$(1)/wpcap/libpcap/inet.c'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
37 $(SED) 's,-DHAVE_AIRPCAP_API,,' -i '$(1)/wpcap/PRJ/GNUmakefile'
540
8e6053c0b62a bugfixes for libdnet/winpcap
Volker Grabsch <vog@notjusthosting.com>
parents: 537
diff changeset
38 $(SED) 's,/common,/Common,' -i '$(1)/wpcap/PRJ/GNUmakefile'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
39 echo -e 'libwpcap.a: $${OBJS}' >> '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
40 echo -e '\t$${AR} rc $$@ $${OBJS}' >> '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
41 echo -e '\t$${RANLIB} $$@' >> '$(1)/wpcap/PRJ/GNUmakefile'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
42 echo '/* already handled by <ws2tcpip.h> */' > '$(1)/wpcap/libpcap/Win32/Src/gai_strerror.c'
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
43 CC='$(TARGET)-gcc' \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
44 AR='$(TARGET)-ar' \
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
45 RANLIB='$(TARGET)-ranlib' \
182
d1678aced603 disable parallel builds for packages pthreads, winpcap and gdal
Volker Grabsch <vog@notjusthosting.com>
parents: 136
diff changeset
46 $(MAKE) -C '$(1)/wpcap/PRJ' -j 1 libwpcap.a
285
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
47 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
48 $(INSTALL) -m644 '$(1)/wpcap/libpcap/'*.h '$(1)/wpcap/Win32-Extensions/'*.h '$(PREFIX)/$(TARGET)/include/'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
49 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib'
08a32251156c portability fix for Open Solaris: when "ginstall" exists, use that instead of "install"
Volker Grabsch <vog@notjusthosting.com>
parents: 265
diff changeset
50 $(INSTALL) -m644 '$(1)/wpcap/PRJ/libwpcap.a' '$(PREFIX)/$(TARGET)/lib/'
136
5ce5e7791d61 translated package: winpcap
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
51 endef