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
27my $inlinedistpm = "Inline2Dist.pm";
28my $inlinepm     = "Inline2.pm";
29
30
31if (! -e $inlinedistpm) {
32    open(FH, ">> $inlinedistpm") or die $!;
33    close FH;
34    utime 0,0, $inlinedistpm;
35}
36
37WriteInlineMakefile
38  (
39
40   'NAME'	   => 'Strassen::Inline2',
41   #'OBJECT'        => '../Strassen-Inline/heap$(OBJ_EXT)',
42
43   'VERSION_FROM'  => $inlinepm,
44   'AUTHOR'        => 'Slaven Rezic (slaven@rezic.de)',
45
46   'CCFLAGS'       => "$Config{ccflags} -ffast-math -fomit-frame-pointer",
47  );
48
49sub MY::install {
50    my $rule = "";
51    if ($] >= 5.006) {
52	$rule .= <<EOF;
53install:	all
54	@\$(MOD_INSTALL) \\
55		\$(INST_LIB) $root/lib \\
56		\$(INST_ARCHLIB) $root/lib/$Config{'version'}/$Config{'archname'} \\
57
58EOF
59    } else {
60	$rule .= <<EOF;
61install:	all
62	@\$(MOD_INSTALL) \\
63		\$(INST_LIB) $root/lib \\
64		\$(INST_ARCHLIB) $root/lib/$Config{'archname'} \\
65
66EOF
67    }
68
69    $rule .= <<EOF;
70$inlinedistpm:	$inlinepm
71	\$(PERL) ../inline2dist.pl \$(NAME)
72
73EOF
74
75    $rule;
76}
77
78
79__END__
80