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