File: Build

package info (click to toggle)
p0f 2.0.8-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 708 kB
  • ctags: 318
  • sloc: ansic: 2,319; sh: 72; makefile: 63; perl: 28
file content (60 lines) | stat: -rwxr-xr-x 1,376 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
#
# p0f - main build script
# -----------------------
#
# This script determines OS name and checks for the appropriate
# makefile in mk/.
#
# (C) Copyright 2000-2006 by Michal Zalewski <lcamtuf@coredump.cx>
#


SYSTEM=`uname -s 2>/dev/null`

test "$SYSTEM" = "" && SYSTEM="unknown"
test -f /lib/libcygwin.a && SYSTEM=CYGWIN

echo "Your system type is: $SYSTEM"

if [ ! -f mk/$SYSTEM ]; then
  echo
  echo "This system is not currently supported. You can try to compile the"
  echo "program by trying one of the other supported options:"
  echo
  cd mk
  ls | cat
  echo 
  echo "To do so, type 'make -f mk/XXX' or 'gmake -f mk/XXX', where XXX is the"
  echo "name of the system you have selected (case sensitive). If you manage to"
  echo "successfully compile the program, please let us know!"
  echo
  exit 1
fi

GMAKE_OK=`which gmake 2>/dev/null`

USE_BPF="pcap-bpf.h"

if [ ! -f "/usr/include/$USE_BPF" -a ! -f "/usr/local/include/$USE_BPF" ]; then
  USE_BPF="net/bpf.h"
fi

export USE_BPF

echo
echo "Please help with p0f 2:"
echo "  http://lcamtuf.coredump.cx/p0f-help/ "
echo

if [ ! -x "$GMAKE_OK" ]; then
  echo "GNU make not found; failing back to regular (BSD?) make."
  exec make -f mk/$SYSTEM "$@"
else
  echo "GNU make found at $GMAKE_OK, trying to use it..."
  exec gmake -f mk/$SYSTEM "$@"
fi

echo "Error: failed to execute gmake or make."

exit 1