1#!/usr/local/bin/perl -w
2# -*- perl -*-
3
4#
5# $Id: Makefile.PL,v 1.8 2003/02/20 14:10:50 eserte Exp $
6# Author: Slaven Rezic
7#
8# Copyright (C) 1998-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 ExtUtils::MakeMaker;
17use Config;
18use Cwd;
19
20my $thisdir = getcwd();
21chdir("../..");
22my $root = getcwd();
23chdir($thisdir);
24
25WriteMakefile
26  (
27   'NAME'	     => 'BBBikeXS',
28   'VERSION_FROM'    => 'BBBikeXS.pm',
29   'OBJECT'          => 'sqrt$(OBJ_EXT) $(BASEEXT)$(OBJ_EXT)',
30   'LIBS'	     => [''],
31   'DEFINE'          => "-DMAYBE_INT_SQRT", # Primarily for non-FPU machines, but seems to be faster on FPU machines, too. But: this is restricted to approx. 100 km distances, so do not use it everywhere!
32   'INC'	     => '',
33);
34
35sub MY::install {
36    if ($] >= 5.006) {
37	"install:	all
38	@\$(MOD_INSTALL) \\
39		\$(INST_LIB) $root/lib \\
40		\$(INST_ARCHLIB) $root/lib/$Config{'version'}/$Config{'archname'} \\
41
42";
43    } else {
44	"install:	all
45	@\$(MOD_INSTALL) \\
46		\$(INST_LIB) $root/lib \\
47		\$(INST_ARCHLIB) $root/lib/$Config{'archname'} \\
48
49";
50    }
51}
52