1#!/usr/local/bin/perl -w 2# -*- perl -*- 3 4# 5# $Id: Makefile.PL,v 1.4 2004/12/12 20:32:49 eserte Exp $ 6# Author: Slaven Rezic 7# 8# Copyright (C) 2001,2004 Slaven Rezic. All rights reserved. 9# This program is free software; you can redistribute it and/or 10# modify it under the same terms as Perl itself. 11# 12# Mail: slaven@rezic.de 13# WWW: http://bbbike.sourceforge.net 14# 15 16use ExtUtils::MakeMaker; 17 18use Config; 19use Cwd; 20 21my $thisdir = getcwd(); 22chdir("../.."); 23my $root = getcwd(); 24chdir($thisdir); 25 26my $inlinedistpm = "InlineDist.pm"; 27my $inlinepm = "Inline.pm"; 28 29if (! -e $inlinedistpm) { 30 open(FH, ">> $inlinedistpm") or die $!; 31 close FH; 32 utime 0,0, $inlinedistpm; 33} 34 35WriteMakefile 36 ( 37 'NAME' => 'VectorUtil::Inline', 38 'VERSION_FROM' => 'Inline.pm', 39 'AUTHOR' => 'Slaven Rezic (slaven@rezic.de)', 40 41 'CCFLAGS' => "$Config{ccflags} -ffast-math -fomit-frame-pointer", 42 ); 43 44sub MY::install { 45 my $rule = ""; 46 if ($] >= 5.006) { 47 $rule .= <<EOF; 48install: all 49 @\$(MOD_INSTALL) \\ 50 \$(INST_LIB) $root/lib \\ 51 \$(INST_ARCHLIB) $root/lib/$Config{'version'}/$Config{'archname'} \\ 52 53EOF 54 } else { 55 $rule .= <<EOF; 56install: all 57 @\$(MOD_INSTALL) \\ 58 \$(INST_LIB) $root/lib \\ 59 \$(INST_ARCHLIB) $root/lib/$Config{'archname'} \\ 60 61EOF 62 } 63 64 $rule .= <<EOF; 65$inlinedistpm: $inlinepm 66 \$(PERL) ../inline2dist.pl \$(NAME) 67 68EOF 69 70 $rule; 71} 72 73__END__ 74