File: Makefile.PL

package info (click to toggle)
openbabel 3.1.1%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 259,620 kB
  • sloc: cpp: 361,957; python: 11,640; ansic: 6,470; perl: 6,010; pascal: 793; php: 529; sh: 226; xml: 97; ruby: 64; makefile: 45; java: 23
file content (41 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download | duplicates (4)
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 -lz";
$ldfrom = "\$(OBJECT) -L$cmakebindir/lib -lopenbabel -lz"
    if (-r "$cmakebindir/lib/libopenbabel.dylib") and (-s _) and (-B _);
$ldfrom = "\$(OBJECT) -L$cmakebindir/lib -lopenbabel -lz"
    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.4.0',
    'LDFROM'    => $ldfrom,
    'CC'        => $CC,
    'LD'        => '$(CC)',
    'INC'       => '-I../../include -I../../build/include -I'.$cmakesrcdir.'/include',
    'OBJECT'    => 'openbabel-perl.o'
);