forked from andygrundman/Audio-Scan
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.PL
32 lines (27 loc) · 917 Bytes
/
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
use strict;
use ExtUtils::MakeMaker qw(WriteMakefile);
use File::Spec::Functions;
use Getopt::Long;
my (@CCFLAGS, @INC, @LIBS);
push @INC, '-Iinclude', '-Isrc';
if( $^O eq 'MSWin32' ) {
push @LIBS, '-Lwin32/ -lzlib';
}
else {
push @CCFLAGS, '-Wdeclaration-after-statement';
push @LIBS, '-lz';
}
my $inc_files = join(' ', glob 'include/*.h');
my $src_files = join(' ', glob 'src/*.c');
WriteMakefile(
NAME => 'Audio::Scan',
VERSION_FROM => 'lib/Audio/Scan.pm',
PREREQ_PM => { 'Test::Warn' => 0 },
ABSTRACT_FROM => 'lib/Audio/Scan.pm',
AUTHOR => 'Andy Grundman <[email protected]>',
CCFLAGS => "$Config::Config{ccflags} " . join(' ', @CCFLAGS),
INC => join(' ', @INC),
LIBS => [ join(' ', @LIBS) ],
depend => { 'Scan.c' => "$inc_files $src_files" },
LICENSE => 'gpl_2',
);