1 use ExtUtils::MakeMaker;
2 use Config;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
6 # Specify the location of the archive containing PIC compiled object files.
7 my $R = "-R" ;
9 for ($^O){
10 /linux/ && do{ $R = "-Wl,--rpath -Wl,"};
11 /hpux/ && do{ $R = "+b"};
12 }
14 my $librrd = "-L../../src/.libs/ $R\$(RPATH) -lrrd";
16 WriteMakefile(
17 'NAME' => 'RRDs',
18 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION
19 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}",
20 'INC' => '-I../../src',
21 # Perl will figure out which one is valid
22 'dynamic_lib' => {'OTHERLDFLAGS' => "$librrd -lm"},
23 'realclean' => {FILES => 't/demo?.rrd t/demo?.png' }
24 );