1#!/usr/local/bin/perl -w
2# -*- perl -*-
3
4#
5# $Id: Makefile.PL,v 1.9 2004/12/12 20:33:01 eserte Exp $
6# Author: Slaven Rezic
7#
8# Copyright (C) 2001 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 Inline::MakeMaker;
17
18use Config;
19use Cwd;
20
21my $thisdir = getcwd();
22chdir("../..");
23my $root = getcwd();
24chdir($thisdir);
25
26# ***FILTER=1***
27my $inlinedistpm = "InlineDist.pm";
28my $inlinepm     = "Inline.pm";
29# ***FILTER=2***
30#my $inlinedistpm = "Inline2Dist.pm";
31#my $inlinepm     = "Inline2.pm";
32# ***FILTER=all***
33
34if (! -e $inlinedistpm) {
35    open(FH, ">> $inlinedistpm") or die $!;
36    close FH;
37    utime 0,0, $inlinedistpm;
38}
39
40WriteInlineMakefile
41  (
42# ***FILTER=1***
43   'NAME'	   => 'Strassen::Inline',
44   'OBJECT'        => 'heap$(OBJ_EXT)',
45# ***FILTER=2***
46#   'NAME'	   => 'Strassen::Inline2',
47#   #'OBJECT'        => '../Strassen-Inline/heap$(OBJ_EXT)',
48# ***FILTER=all***
49   'VERSION_FROM'  => $inlinepm,
50   'AUTHOR'        => 'Slaven Rezic (slaven@rezic.de)',
51
52   'CCFLAGS'       => "$Config{ccflags} -ffast-math -fomit-frame-pointer",
53  );
54
55sub MY::install {
56    my $rule = "";
57    if ($] >= 5.006) {
58	$rule .= <<EOF;
59install:	all
60	@\$(MOD_INSTALL) \\
61		\$(INST_LIB) $root/lib \\
62		\$(INST_ARCHLIB) $root/lib/$Config{'version'}/$Config{'archname'} \\
63
64EOF
65    } else {
66	$rule .= <<EOF;
67install:	all
68	@\$(MOD_INSTALL) \\
69		\$(INST_LIB) $root/lib \\
70		\$(INST_ARCHLIB) $root/lib/$Config{'archname'} \\
71
72EOF
73    }
74
75    $rule .= <<EOF;
76$inlinedistpm:	$inlinepm
77	\$(PERL) ../inline2dist.pl \$(NAME)
78
79EOF
80
81    $rule;
82}
83
84
85__END__
86