-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathwscript
27 lines (24 loc) · 1.08 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
top = '../..'
def configure(conf):
conf.check_cfg(msg='Checking for libpcap',
path='pcap-config', args='--cflags --libs',
package='', uselib_store='PCAP')
conf.check_cxx(msg='Checking if struct tcphdr has member th_off ',
define_name='HAVE_BSD_TCPHDR', mandatory=False,
fragment='''#include <netinet/tcp.h>
int main() { tcphdr th; th.th_off; }''')
conf.check_cxx(msg='Checking if struct udphdr has member uh_ulen',
define_name='HAVE_BSD_UDPHDR', mandatory=False,
fragment='''#include <netinet/udp.h>
int main() { udphdr uh; uh.uh_ulen; }''')
def build(bld):
bld.objects(
target='dump-objects',
source=bld.path.ant_glob('*.cpp', excl='main.cpp'),
use='core-objects PCAP')
bld.program(
target='../../bin/ndndump',
name='ndndump',
source='main.cpp',
use='dump-objects')