Makefile.PL revision 1.1.1.1
1# Makefile for GMP perl module. 2 3# Copyright 2001, 2003, 2004 Free Software Foundation, Inc. 4# 5# This file is part of the GNU MP Library. 6# 7# The GNU MP Library is free software; you can redistribute it and/or modify 8# it under the terms of the GNU Lesser General Public License as published 9# by the Free Software Foundation; either version 3 of the License, or (at 10# your option) any later version. 11# 12# The GNU MP Library is distributed in the hope that it will be useful, but 13# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15# License for more details. 16# 17# You should have received a copy of the GNU Lesser General Public License 18# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. 19 20 21# Bugs: 22# 23# When the generated Makefile re-runs "perl Makefile.PL" the GMP_BUILDDIR 24# parameter is lost. 25 26 27use ExtUtils::MakeMaker; 28 29 30# Find and remove our parameters 31@ARGV = map { 32 if (/^GMP_BUILDDIR=(.*)/) { 33 $GMP_BUILDDIR=$1; (); 34 } else { 35 $_; 36 } 37} (@ARGV); 38 39$INC = ""; 40$LIBS = "-lgmp"; 41$OBJECT = "GMP.o"; 42 43if (defined $GMP_BUILDDIR) { 44 if (! -f "$GMP_BUILDDIR/libgmp.la") { 45 die "$GMP_BUILDDIR doesn't contain libgmp.la\n" . 46 "if it's really a gmp build directory then go there and run \"make libgmp.la\"\n"; 47 } 48 $INC = "-I$GMP_BUILDDIR $INC"; 49 $LIBS = "-L$GMP_BUILDDIR/.libs $LIBS"; 50} 51 52WriteMakefile( 53 NAME => 'GMP', 54 VERSION => '2.00', 55 LIBS => [$LIBS], 56 OBJECT => $OBJECT, 57 INC => $INC, 58 clean => { FILES => 'test.tmp' }, 59 PM => { 60 'GMP.pm' => '$(INST_LIBDIR)/GMP.pm', 61 'GMP/Mpz.pm' => '$(INST_LIBDIR)/GMP/Mpz.pm', 62 'GMP/Mpq.pm' => '$(INST_LIBDIR)/GMP/Mpq.pm', 63 'GMP/Mpf.pm' => '$(INST_LIBDIR)/GMP/Mpf.pm', 64 'GMP/Rand.pm' => '$(INST_LIBDIR)/GMP/Rand.pm', 65 } 66 ); 67 68 69# Local variables: 70# perl-indent-level: 2 71# End: 72