-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.PL
37 lines (31 loc) · 1.14 KB
/
Makefile.PL
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
use strict;
use ExtUtils::MakeMaker qw(WriteMakefile);
use File::Spec::Functions;
my (@INC, @LIBPATH, @LIBS);
my $DEFINES = '-O2';
$DEFINES .= ' -Wall' unless $^O =~ /sun|solaris/i;
$DEFINES .= ' -Wno-unused-value -Wno-format-security' unless $^O =~ /Win32|sun|solaris/i;
unshift @INC, '-I. -I.. -Isrc';
my $inc_files = join(' ', glob 'src/*.h');
my $src_files = join(' ', glob 'src/*.c');
my $xs_files = join(' ', glob '*.xs');
WriteMakefile(
NAME => 'Thrift::XS',
VERSION_FROM => 'lib/Thrift/XS.pm',
PREREQ_PM => {
'Bit::Vector' => 0,
'Test::BinaryData' => 0,
},
ABSTRACT_FROM => 'lib/Thrift/XS.pm',
AUTHOR => 'Andy Grundman <[email protected]>',
INC => join(' ', @INC),
LIBS => [ join(' ', @LIBPATH, @LIBS) ],
DEFINE => $DEFINES,
depend => { 'XS.c' => "$inc_files $src_files $xs_files" },
META_MERGE => {
resources => {
license => 'http://www.apache.org/licenses/LICENSE-2.0',
repository => 'https://github.com/andygrundman/thrift-xs',
},
},
);