File: Makefile.PL

package info (click to toggle)
libnet-arp-perl 1.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 192 kB
  • sloc: ansic: 314; perl: 43; makefile: 3
file content (52 lines) | stat: -rwxr-xr-x 1,292 bytes parent folder | download
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
#
# Perl ARP Extension makefile
#
# Programmed by Bastian Ballmann
# Last update: 27.04.2020
#
# This program is free software; you can redistribute 
# it and/or modify it under the terms of the 
# GNU General Public License version 2 as published 
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will 
# be useful, but WITHOUT ANY WARRANTY; without even 
# the implied warranty of MERCHANTABILITY or FITNESS 
# FOR A PARTICULAR PURPOSE. 
# See the GNU General Public License for more details. 

use ExtUtils::MakeMaker;
use Config;

BEGIN {
      eval { require Net::Pcap };

      if($@)
      {
          print "Module Net::Pcap is required for make test!\n";
      }
}

if($Config{'osname'} =~ /linux/i)
{
    $flags = "-DLINUX";
    $objects = "ARP.o send_packet_linux.o get_mac_linux.o arp_lookup_linux.o";
}
elsif($Config{'osname'} =~ /bsd|darwin/i)
{
    $flags = "-DBSD";
    $objects = "ARP.o send_packet_bsd.o get_mac_bsd.o arp_lookup_bsd.o";
}
else
{
    $flags = "-DBSD";
    $objects = "ARP.o get_mac_bsd.o arp_lookup_bsd.o";
}

WriteMakefile(
    NAME              => 'Net::ARP',
    VERSION           => '1.0.11',
    AUTHOR            => 'Bastian Ballmann',
    DEFINE            => $flags, 
    OBJECT            => $objects	      
);