File: Makefile.PL

package info (click to toggle)
psortb 3.0.4+dfsg-2~bpo8+1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports-sloppy
  • size: 121,004 kB
  • sloc: perl: 3,627; ansic: 698; cpp: 338; sh: 27; makefile: 23
file content (45 lines) | stat: -rw-r--r-- 1,324 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
use ExtUtils::MakeMaker;
use Config;
use lib '../lib';
use Bio::Tools::PSort::Install;

$CC = 'g++';

%args = ('CCFLAGS' => "-Wall $Config{ccflags}");

@libs = qw/svmloc/;
%paths = ();
$libpath = '-lm -lsvm -lstdc++';

$defaults_file = '../psortb.defaults';
if( -f $defaults_file ) {
    unless ($return = do $defaults_file) {
        warn "couldn't parse $file: $@" if $@;
        warn "couldn't do $file: $!"    unless defined $return;
        warn "couldn't run $file"       unless $return;
    }
    do $defaults_file;
} 

if($additional_libpath) {
    $libpath .= ' ' . $additional_libpath . ' ' . join(' ', map { '-l' . $_ } @libs);
} else {
    $libpath .= Bio::Tools::PSort::Install->makeLibPath(@libs);
}

if($^O eq 'cygwin') {
  $args{'LDDLFLAGS'} = '-shared -L/usr/local/lib';
}

WriteMakefile('NAME'          => 'Bio::Tools::PSort::SVMLoc',
	      'VERSION_FROM'  => 'lib/Bio/Tools/PSort/SVMLoc.pm',
	      'PREREQ_PM'     => {},
	      ($] >= 5.005 ?
	       (ABSTRACT_FROM => 'lib/Bio/Tools/PSort/SVMLoc.pm',
		AUTHOR        => 'Matthew Laird <matt@brinkman.mbb.sfu.ca>') : ()),
	      'OPTIMIZE'      => '-O3',  # segfaults with gcc 2.96 if lower (?)
	      'LIBS'          => $libpath,
	      'CC'            => $CC,
	      'LD'            => '$(CC)',
	      'XSOPT'         => '-C++',
              %args);