File: Makefile.PL

package info (click to toggle)
openbabel 2.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 76,164 kB
  • sloc: cpp: 316,390; ansic: 91,270; python: 6,971; perl: 6,591; pascal: 793; sh: 193; xml: 97; ruby: 55; makefile: 38; java: 23; cs: 14
file content (41 lines) | stat: -rw-r--r-- 1,433 bytes parent folder | download | duplicates (3)
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
use ExtUtils::MakeMaker;

use lib 'inc';
use Devel::CheckLib;

$CC = 'g++';

$cmakesrcdir = @ENV{"SRC_DIR"};
$cmakebindir = @ENV{"OBJ_DIR"};

# Look for libopenbabel.so
if (-e "$cmakebindir/lib/libopenbabel.so" || -e "$cmakebindir/lib/libopenbabel.dylib") {
  check_lib_or_exit( lib => 'openbabel' , libpath => "$cmakebindir/lib");
}
elsif (-e "$cmakebindir/lib64/libopenbabel.so") {
  check_lib_or_exit( lib => 'openbabel' , libpath => "$cmakebindir/lib64");
}
else {
  check_lib_or_exit( lib => 'openbabel' , libpath => @ENV{"LD_LIBRARY_PATH"});
}

$ldfrom = "\$(OBJECT) -lopenbabel";
$ldfrom = "\$(OBJECT) -L$cmakebindir/lib -lopenbabel"
    if (-r "$cmakebindir/lib/libopenbabel.dylib") and (-s _) and (-B _);
$ldfrom = "\$(OBJECT) -L$cmakebindir/lib -lopenbabel"
    if (-r "$cmakebindir/lib/libopenbabel.so") and (-s _) and (-B _);
$ldfrom = "\$(OBJECT) -L$cmakebindir/lib64 -lopenbabel"
    if (-r "$cmakebindir/lib64/libopenbabel.so") and (-s _) and (-B _);

# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'	=>  'Chemistry::OpenBabel',
    'AUTHOR'    =>  'Geoffrey Hutchison <openbabel-scripting@lists.sourceforge.net>',
    'VERSION'   => '1.5.0',
    'LDFROM'    => $ldfrom,
    'CC'        => $CC,
    'LD'        => '$(CC)',
    'INC'       => '-I../../include -I'.$cmakesrcdir.'/include',
    'OBJECT'    => 'openbabel-perl.o'
);