#
# the following patches were applied to gmp 3.1
# $Id: PATCHES.GMP3,v 1.16 2000/08/06 21:56:51 joy Exp $
#

# Some directories can be removed (just to save space), You
# need to cd to the gmp301 (or whatever) directory, first.

rm -r mpq mpf mpfr mpbsd demos

To install the following patches cd to the gmp301 (or whatever)
directory and execute the follwing command

patch -p1 -s <this-file

where this-file is expected to be found in ../doc/PATCHES.GMP3.
relative to the gmp3 (or whatever) directory.

# --------------------------------------------------------------
# the following patch is needed as some directories were removed
# --------------------------------------------------------------

diff -rPc gmp-3.1/Makefile.am gmp3/Makefile.am
*** gmp-3.1/Makefile.am	Wed Aug  2 23:35:10 2000
--- gmp3/Makefile.am	Sun Aug  6 13:34:53 2000
***************
*** 79,90 ****
  
  AUTOMAKE_OPTIONS = gnu check-news no-dependencies ansi2knr
  
! SUBDIRS = mpn mpz mpq mpf mpbsd mpfr tests demos tune
  
  include_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION) $(MPFR_HEADERS_OPTION)
  EXTRA_HEADERS = mp.h
  
! lib_LTLIBRARIES = libgmp.la $(MPBSD_LTLIBRARIES_OPTION)
  
  EXTRA_DIST = .gdbinit gmp-impl.h longlong.h stack-alloc.h urandom.h doc macos
  
--- 79,92 ----
  
  AUTOMAKE_OPTIONS = gnu check-news no-dependencies ansi2knr
  
! # SUBDIRS = mpn mpz mpq mpf mpbsd mpfr tests demos tune
! SUBDIRS = mpz mpn
  
  include_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION) $(MPFR_HEADERS_OPTION)
  EXTRA_HEADERS = mp.h
  
! libgmp_la = libgmp.la
! lib_LTLIBRARIES = $(libgmp_la) $(MPBSD_LTLIBRARIES_OPTION)
  
  EXTRA_DIST = .gdbinit gmp-impl.h longlong.h stack-alloc.h urandom.h doc macos
  
***************
*** 154,159 ****
--- 156,164 ----
    mpfr/log.lo mpfr/exp.lo mpfr/div_ui.lo mpfr/zeta.lo mpfr/karadiv.lo \
    mpfr/karasqrt.lo mpfr/print_rnd_mode.lo
  
+ MPQ_OBJECTS =
+ MPBSD_OBJECTS =
+ MPF_OBJECTS =
  
  if WANT_MPFR
  MPFR_HEADERS_OPTION = mpfr/mpfr.h
diff -rPc gmp-3.1/Makefile.in gmp3/Makefile.in
*** gmp-3.1/Makefile.in	Thu Aug  3 04:16:18 2000
--- gmp3/Makefile.in	Sun Aug  6 13:36:08 2000
***************
*** 173,184 ****
  
  AUTOMAKE_OPTIONS = gnu check-news no-dependencies ansi2knr
  
! SUBDIRS = mpn mpz mpq mpf mpbsd mpfr tests demos tune
  
  include_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION) $(MPFR_HEADERS_OPTION)
  EXTRA_HEADERS = mp.h
  
! lib_LTLIBRARIES = libgmp.la $(MPBSD_LTLIBRARIES_OPTION)
  
  EXTRA_DIST = .gdbinit gmp-impl.h longlong.h stack-alloc.h urandom.h doc macos
  
--- 173,186 ----
  
  AUTOMAKE_OPTIONS = gnu check-news no-dependencies ansi2knr
  
! # SUBDIRS = mpn mpz mpq mpf mpbsd mpfr tests demos tune
! SUBDIRS = mpz mpn
  
  include_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION) $(MPFR_HEADERS_OPTION)
  EXTRA_HEADERS = mp.h
  
! libgmp_la = libgmp.la
! lib_LTLIBRARIES = $(libgmp_la) $(MPBSD_LTLIBRARIES_OPTION)
  
  EXTRA_DIST = .gdbinit gmp-impl.h longlong.h stack-alloc.h urandom.h doc macos
  
***************
*** 239,244 ****
--- 241,249 ----
    mpbsd/gcd.lo mpbsd/itom.lo mpbsd/min.lo mpbsd/mul.lo mpbsd/mout.lo	  \
    mpbsd/pow_ui.lo mpbsd/sdiv.lo mpbsd/sqrtrem.lo mpbsd/xtom.lo 
  
+ MPQ_OBJECTS =
+ MPBSD_OBJECTS =
+ MPF_OBJECTS =
  
  # FIXME: Add mpfr/rnd_mode.lo when it's clean.
  MPFR_OBJECTS = mpfr/add.lo mpfr/div_2exp.lo mpfr/neg.lo mpfr/set_dfl_prec.lo \
***************
*** 453,459 ****
  
  maintainer-clean-kr:
  
! libgmp.la: $(libgmp_la_OBJECTS) $(libgmp_la_DEPENDENCIES)
  	$(LINK) -rpath $(libdir) $(libgmp_la_LDFLAGS) $(libgmp_la_OBJECTS) $(libgmp_la_LIBADD) $(LIBS)
  
  libmp.la: $(libmp_la_OBJECTS) $(libmp_la_DEPENDENCIES)
--- 458,464 ----
  
  maintainer-clean-kr:
  
! $(libgmp_la): $(libgmp_la_OBJECTS) $(libgmp_la_DEPENDENCIES)
  	$(LINK) -rpath $(libdir) $(libgmp_la_LDFLAGS) $(libgmp_la_OBJECTS) $(libgmp_la_LIBADD) $(LIBS)
  
  libmp.la: $(libmp_la_OBJECTS) $(libmp_la_DEPENDENCIES)
diff -rPc gmp-3.1/configure gmp3/configure
*** gmp-3.1/configure	Thu Aug  3 04:16:19 2000
--- gmp3/configure	Sun Aug  6 13:32:49 2000
***************
*** 4600,4605 ****
--- 4600,4607 ----
  
  # Files that config.status was made for.
  config_files="\\
+   Makefile mpz/Makefile mpn/Makefile mpz/tests/Makefile mpn/tests/Makefile"
+ true "
    Makefile mpf/Makefile mpz/Makefile mpn/Makefile mpq/Makefile
    mpf/tests/Makefile mpz/tests/Makefile mpq/tests/Makefile mpn/tests/Makefile
    tests/Makefile tests/rand/Makefile demos/Makefile tune/Makefile
diff -rPc gmp-3.1/configure.in gmp3/configure.in
*** gmp-3.1/configure.in	Wed Aug  2 18:49:03 2000
--- gmp3/configure.in	Sun Aug  6 13:37:06 2000
***************
*** 935,941 ****
  
  dnl  Create Makefiles
  dnl  FIXME: Upcoming version of autoconf/automake may not like broken lines.
! AC_OUTPUT(Makefile mpf/Makefile mpz/Makefile mpn/Makefile mpq/Makefile \
!   mpf/tests/Makefile mpz/tests/Makefile mpq/tests/Makefile mpn/tests/Makefile \
!   tests/Makefile tests/rand/Makefile demos/Makefile tune/Makefile \
!   mpbsd/Makefile mpbsd/tests/Makefile mpfr/Makefile mpfr/tests/Makefile)
--- 935,943 ----
  
  dnl  Create Makefiles
  dnl  FIXME: Upcoming version of autoconf/automake may not like broken lines.
! dnl AC_OUTPUT(Makefile mpf/Makefile mpz/Makefile mpn/Makefile mpq/Makefile \
! dnl   mpf/tests/Makefile mpz/tests/Makefile mpq/tests/Makefile mpn/tests/Makefile \
! dnl   tests/Makefile tests/rand/Makefile demos/Makefile tune/Makefile \
! dnl   mpbsd/Makefile mpbsd/tests/Makefile mpfr/Makefile mpfr/tests/Makefile)
! 
! AC_OUTPUT(Makefile mpz/Makefile mpn/Makefile mpz/tests/Makefile mpn/tests/Makefile)

# --------------------------------------------------------------
# Windows NT patches, not needed for unix
# --------------------------------------------------------------

diff -rPc gmp-3.1/config.w32 gmp3/config.w32
*** gmp-3.1/config.w32	Thu Jan  1 01:00:00 1970
--- gmp3/config.w32	Sun Aug  6 13:32:49 2000
***************
*** 0 ****
--- 1,57 ----
+ /*
+  *          Copyright (c) mjh-EDV Beratung, 1996-1999
+  *     mjh-EDV Beratung - 63263 Neu-Isenburg - Rosenstrasse 12
+  *          Tel +49 6102 328279 - Fax +49 6102 328278
+  *                Email info@mjh.teddy-net.com
+  *
+  *    Author: Jordan Hrycaj <jordan@mjh.teddy-net.com>
+  *
+  *   $Id: PATCHES.GMP3,v 1.16 2000/08/06 21:56:51 joy Exp $
+  *
+  *   This library is free software; you can redistribute it and/or
+  *   modify it under the terms of the GNU Library General Public
+  *   License as published by the Free Software Foundation; either
+  *   version 2 of the License, or (at your option) any later version.
+  *
+  *   This library is distributed in the hope that it will be useful,
+  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  *   Library General Public License for more details.
+  *
+  *   You should have received a copy of the GNU Library General Public
+  *   License along with this library; if not, write to the Free
+  *   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  *
+  *   @(#)  config.w32 -- _WIN32 defs from config.h
+  */
+ 
+ #define alloca(x) _alloca(x)
+ #define random()  rand()
+ 
+ /* assert option */
+ #undef WANT_ASSERT
+ 
+ /* disable alloca option */
+ #undef USE_STACK_ALLOC
+ 
+ /* Define if a limb is long long. */
+ #undef _LONG_LONG_LIMB
+ 
+ /* Define to 1 if you have the declaration of `optarg', 
+    and to 0 if you don't. */
+ #define HAVE_DECL_OPTARG 1
+ 
+ /* Name of package */
+ #define PACKAGE "gmp"
+ 
+ /* Define if the system has the type `void'. */
+ #define HAVE_VOID 1
+ 
+ /* Define if cpp supports the ANSI # stringizing operator. */
+ #define HAVE_STRINGIZE 1
+ 
+ /* Version number of package */
+ #define VERSION "3.1"
+ 
+ /* Define if you have the ANSI C header files. */
+ #define STDC_HEADERS 1
diff -rPc gmp-3.1/mpz.def gmp3/mpz.def
*** gmp-3.1/mpz.def	Thu Jan  1 01:00:00 1970
--- gmp3/mpz.def	Sun Aug  6 13:32:49 2000
***************
*** 0 ****
--- 1,98 ----
+ LIBRARY		mpz.dll
+ EXETYPE WINDOWS
+ CODE		 PRELOAD MOVEABLE DISCARDABLE
+ DATA		 PRELOAD MOVEABLE MULTIPLE
+ 
+ EXPORTS
+     __gmpz_abs                         @1
+     __gmpz_add                         @2
+     __gmpz_add_ui                	   @3
+     __gmpz_and                   	   @4
+     __gmpz_array_init            	   @5
+     __gmpz_cdiv_q                	   @6
+     __gmpz_cdiv_q_ui             	   @7
+     __gmpz_cdiv_qr               	   @8
+     __gmpz_cdiv_qr_ui            	   @9
+     __gmpz_cdiv_r                	   @10
+     __gmpz_cdiv_r_ui             	   @11
+     __gmpz_cdiv_ui               	   @12
+     __gmpz_clear                 	   @13
+     __gmpz_clrbit                	   @14
+     __gmpz_cmp                   	   @15
+     __gmpz_cmp_si                	   @16
+     __gmpz_cmp_ui                	   @17
+     __gmpz_com                   	   @18
+     __gmpz_divexact              	   @19
+     __gmpz_fac_ui                	   @20
+     __gmpz_fdiv_q                	   @21
+     __gmpz_fdiv_q_2exp           	   @22
+     __gmpz_fdiv_q_ui             	   @23
+     __gmpz_fdiv_qr               	   @24
+     __gmpz_fdiv_qr_ui            	   @25
+     __gmpz_fdiv_r                	   @26
+     __gmpz_fdiv_r_2exp           	   @27
+     __gmpz_fdiv_r_ui             	   @28
+     __gmpz_fdiv_ui               	   @29
+     __gmpz_gcd                   	   @30
+     __gmpz_gcd_ui                	   @31
+     __gmpz_gcdext                	   @32
+     __gmpz_get_d                 	   @33
+     __gmpz_get_si                	   @34
+     __gmpz_get_str               	   @35
+     __gmpz_get_ui                	   @36
+     __gmpz_getlimbn              	   @37
+     __gmpz_hamdist               	   @38
+     __gmpz_init                  	   @39
+     __gmpz_inp_raw               	   @40
+     __gmpz_inp_str               	   @41
+     __gmpz_invert                	   @42
+     __gmpz_ior                   	   @43
+     __gmpz_init_set              	   @44
+     __gmpz_init_set_d            	   @45
+     __gmpz_init_set_si           	   @46
+     __gmpz_init_set_str          	   @47
+     __gmpz_init_set_ui           	   @48
+     __gmpz_jacobi                	   @49
+     __gmpz_legendre              	   @50
+     __gmpz_mod                   	   @51
+     __gmpz_mul                   	   @52
+     __gmpz_mul_2exp              	   @53
+     __gmpz_mul_ui                	   @54
+     __gmpz_neg                   	   @55
+     __gmpz_out_raw               	   @56
+     __gmpz_out_str               	   @57
+     __gmpz_perfect_square_p      	   @58
+     __gmpz_popcount              	   @59
+     __gmpz_pow_ui                	   @60
+     __gmpz_powm                  	   @61
+     __gmpz_powm_ui               	   @62
+     __gmpz_probab_prime_p        	   @63
+     __gmpz_random                	   @64
+     __gmpz_scan0                 	   @65
+     __gmpz_scan1                 	   @66
+     __gmpz_set                   	   @67
+     __gmpz_set_d                 	   @68
+     __gmpz_set_f                 	   @69
+     __gmpz_set_q                 	   @70
+     __gmpz_set_si                	   @71
+     __gmpz_set_str               	   @72
+     __gmpz_set_ui                	   @73
+     __gmpz_setbit                	   @74
+     __gmpz_size                  	   @75
+     __gmpz_sizeinbase            	   @76
+     __gmpz_sqrt                  	   @77
+     __gmpz_sqrtrem               	   @78
+     __gmpz_sub                   	   @79
+     __gmpz_sub_ui                	   @80
+     __gmpz_tdiv_q                	   @81
+     __gmpz_tdiv_q_2exp           	   @82
+     __gmpz_tdiv_q_ui             	   @83
+     __gmpz_tdiv_qr               	   @84
+     __gmpz_tdiv_qr_ui            	   @85
+     __gmpz_tdiv_r                	   @86
+     __gmpz_tdiv_r_2exp           	   @87
+     __gmpz_tdiv_r_ui           	   @88
+     __gmpz_ui_pow_ui           	   @89
+     __gmp_set_memory_functions         @90
+     __gmp_errno				   @91
+     __gmpz_urandomb			   @92
diff -rPc gmp-3.1/nmake.bat gmp3/nmake.bat
*** gmp-3.1/nmake.bat	Thu Jan  1 01:00:00 1970
--- gmp3/nmake.bat	Sun Aug  6 13:32:49 2000
***************
*** 0 ****
--- 1,2 ----
+ nmake.exe /y /nologo /f nmake.w32 %1 %2 %3 %4 %5 %6 %7 %8 %9
+ 
diff -rPc gmp-3.1/nmake.w32 gmp3/nmake.w32
*** gmp-3.1/nmake.w32	Thu Jan  1 01:00:00 1970
--- gmp3/nmake.w32	Sun Aug  6 13:32:49 2000
***************
*** 0 ****
--- 1,174 ----
+ #!nmake /f
+ #
+ # Makefile for the Microsoft compiler/linker
+ #
+ # creates the mpz.dll and mpz.lib target, only a part of the
+ # gmp package but enough for peks
+ #
+ # $Id: PATCHES.GMP3,v 1.16 2000/08/06 21:56:51 joy Exp $
+ #
+ 
+ !include <ntwin32.mak>
+ 
+ CC      = cl.exe
+ # DEFS    = -D__H_STDIO__ -Drandom=rand
+ DEFS    = -DHAVE_CONFIG_H
+ CFLAGS  = -nologo -Za -Ox -I. $(DEFS)
+ 
+ LD      = link.exe
+ LDFLAGS = -map -out:mpz.dll -def:mpz.def
+ 
+ MPN    = .\mpn\\
+ MPG    = .\mpn\generic\\
+ MPZ    = .\mpz\\
+ LGC    = ..\\
+ 
+ BSEOBJ = extract-dbl.obj insert-dbl.obj \
+ 	 memory.obj         mp_bpl.obj \
+ 	 mp_clz_tab.obj     mp_set_fns.obj \
+ 	 rand.obj           randlc.obj \
+ 	 randclr.obj        mp_minv_tab.obj \
+ 	 randlc2x.obj       randraw.obj \
+ 	 randsd.obj	    randsdui.obj \
+ 	 stack-alloc.obj    version.obj \
+ 	 errno.obj	    assert.obj
+ 
+ MPNOBJ = $(MPN)mp_bases.obj
+ 
+ MPGOBJ = $(MPG)add_n.obj     $(MPG)addmul_1.obj \
+ 	 $(MPG)bdivmod.obj   $(MPG)bz_divrem_n.obj \
+ 	 $(MPG)cmp.obj       $(MPG)diveby3.obj \
+ 	 $(MPG)divrem.obj \
+ 	 $(MPG)divrem_1.obj  $(MPG)divrem_2.obj \
+ 	 $(MPG)dump.obj      $(MPG)gcd.obj \
+ 	 $(MPG)gcd_1.obj     $(MPG)gcdext.obj \
+ 	 $(MPG)get_str.obj   $(MPG)hamdist.obj \
+ 	 $(MPG)inlines.obj   $(MPG)lshift.obj \
+ 	 $(MPG)mod_1.obj     $(MPG)mul.obj \
+ 	 $(MPG)mul_1.obj     $(MPG)mul_n.obj \
+ 	 $(MPG)mul_basecase.obj \
+ 	 $(MPG)sqr_basecase.obj \
+ 	 $(MPG)perfsqr.obj   $(MPG)popcount.obj \
+ 	 $(MPG)pre_mod_1.obj $(MPG)random.obj  \
+ 	 $(MPG)random2.obj   $(MPG)rshift.obj \
+ 	 $(MPG)scan0.obj     $(MPG)scan1.obj \
+ 	 $(MPG)set_str.obj   $(MPG)sqrtrem.obj \
+ 	 $(MPG)sub_n.obj     $(MPG)submul_1.obj \
+ 	 $(MPG)tdiv_qr.obj   $(MPG)sb_divrem_mn.obj
+ 
+ MPZOBJ = $(MPZ)abs.obj         $(MPZ)add.obj \
+ 	 $(MPZ)add_ui.obj      $(MPZ)and.obj \
+ 	 $(MPZ)array_init.obj  $(MPZ)cdiv_q.obj \
+ 	 $(MPZ)cdiv_q_ui.obj   $(MPZ)cdiv_qr.obj \
+ 	 $(MPZ)cdiv_qr_ui.obj  $(MPZ)cdiv_r.obj \
+ 	 $(MPZ)cdiv_r_ui.obj   $(MPZ)cdiv_ui.obj \
+ 	 $(MPZ)clear.obj       $(MPZ)clrbit.obj \
+ 	 $(MPZ)cmp.obj         $(MPZ)cmp_si.obj \
+ 	 $(MPZ)cmp_ui.obj      $(MPZ)com.obj \
+ 	 $(MPZ)divexact.obj    $(MPZ)fac_ui.obj \
+ 	 $(MPZ)fdiv_q.obj      $(MPZ)fdiv_q_2exp.obj \
+ 	 $(MPZ)fdiv_q_ui.obj   $(MPZ)fdiv_qr.obj \
+ 	 $(MPZ)fdiv_qr_ui.obj  $(MPZ)fdiv_r.obj \
+ 	 $(MPZ)fdiv_r_2exp.obj $(MPZ)fdiv_r_ui.obj \
+ 	 $(MPZ)fdiv_ui.obj     $(MPZ)gcd.obj \
+ 	 $(MPZ)gcd_ui.obj      $(MPZ)gcdext.obj \
+ 	 $(MPZ)get_d.obj       $(MPZ)get_si.obj \
+ 	 $(MPZ)get_str.obj     $(MPZ)get_ui.obj \
+ 	 $(MPZ)getlimbn.obj    $(MPZ)hamdist.obj \
+ 	 $(MPZ)init.obj        $(MPZ)inp_raw.obj \
+ 	 $(MPZ)inp_str.obj     $(MPZ)invert.obj \
+ 	 $(MPZ)ior.obj         $(MPZ)iset.obj \
+ 	 $(MPZ)iset_d.obj      $(MPZ)iset_si.obj \
+ 	 $(MPZ)iset_str.obj    $(MPZ)iset_ui.obj \
+ 	 $(MPZ)jacobi.obj      $(MPZ)legendre.obj \
+ 	 $(MPZ)mod.obj         $(MPZ)mul.obj \
+ 	 $(MPZ)mul_2exp.obj    $(MPZ)mul_ui.obj \
+ 	 $(MPZ)neg.obj         $(MPZ)out_raw.obj \
+ 	 $(MPZ)out_str.obj     $(MPZ)perfsqr.obj \
+ 	 $(MPZ)popcount.obj    $(MPZ)pow_ui.obj \
+ 	 $(MPZ)powm.obj        $(MPZ)powm_ui.obj \
+ 	 $(MPZ)pprime_p.obj    $(MPZ)random.obj \
+ 	 $(MPZ)random2.obj     $(MPZ)realloc.obj \
+ 	 $(MPZ)scan0.obj       $(MPZ)scan1.obj \
+ 	 $(MPZ)set.obj         $(MPZ)set_d.obj \
+ 	 $(MPZ)set_f.obj       $(MPZ)set_q.obj \
+ 	 $(MPZ)set_si.obj      $(MPZ)set_str.obj \
+ 	 $(MPZ)set_ui.obj      $(MPZ)setbit.obj \
+ 	 $(MPZ)size.obj        $(MPZ)sizeinbase.obj \
+ 	 $(MPZ)sqrt.obj        $(MPZ)sqrtrem.obj \
+ 	 $(MPZ)sub.obj         $(MPZ)sub_ui.obj \
+ 	 $(MPZ)tdiv_q.obj      $(MPZ)tdiv_q_2exp.obj \
+ 	 $(MPZ)tdiv_q_ui.obj   $(MPZ)tdiv_qr.obj \
+ 	 $(MPZ)tdiv_qr_ui.obj  $(MPZ)tdiv_r.obj \
+ 	 $(MPZ)tdiv_r_2exp.obj $(MPZ)tdiv_r_ui.obj \
+ 	 $(MPZ)ui_pow_ui.obj   $(MPZ)urandomb.obj  
+  
+ # ------------------------------------------------------
+ #      default rules
+ # ------------------------------------------------------
+ 
+ all: config.h gmp-mparam.h mpz.lib
+ 
+ {$(MPZ)}.c{$(MPZ)}.obj::
+ 	$(CC) $(cvarsdll) $(CFLAGS) -c -Fo$(MPZ)$*.obj $<
+ 
+ {$(MPG)}.c{$(MPG)}.obj::
+ 	$(CC) $(cvarsdll) $(CFLAGS) -c -Fo$(MPG)$*.obj $<
+ 
+ {$(MPN)}.c{$(MPN)}.obj::
+ 	$(CC) $(cvarsdll) $(CFLAGS) -c -Fo$(MPN)$*.obj $<
+ 
+ .c.obj:
+ 	$(CC) $(cvarsdll) $(CFLAGS) -c -Fo$*.obj $<
+ 
+ $(MPZ)mul_ui.obj: $(MPZ)mul_siui.c
+ 	$(CC) $(cvarsdll) $(CFLAGS) -DOPERATION_mul_ui -c -Fo$@ $?
+ 
+ # ------------------------------------------------------
+ #      built mpn stuff
+ # ------------------------------------------------------
+ 
+ mpz.lib: mpz.dll
+ 
+ mpz.dll: $(LGCOBJ) $(BSEOBJ) $(MPZOBJ) $(MPNOBJ) $(MPGOBJ) mpz.def
+ 	$(LD) @<<
+ 	$(dlllflags)
+ 	$(LDFLAGS)
+ 	$(BSEOBJ)
+ 	$(MPZOBJ)
+ 	$(MPNOBJ)
+ 	$(MPGOBJ)
+       $(guilibsdll)
+ <<
+ 
+ # ------------------------------------------------------
+ #      set os and machine type characteristics
+ # ------------------------------------------------------
+ 
+ $(MPN)sysdep.h: $(MPN)bsd.h
+ 	copy $(MPN)bsd.h $@
+ 
+ gmp-mparam.h: gmp.h gmp-impl.h
+ 	copy $(MPG)$@ .
+ 
+ config.h: config.w32
+ 	copy config.w32 $@
+ 
+ # ------------------------------------------------------
+ #      clean up
+ # ------------------------------------------------------
+ 
+ clean:
+ 	-del mpz.map
+ 	-del mpz.exp
+ 	-del *.obj
+ 	-del $(MPN)*.obj
+ 	-del $(MPG)*.obj
+ 	-del $(MPZ)*.obj
+ 
+ distclean: clean
+ 	-del gmp-mparam.h
+ 	-del config.h
+ 	-del mpz.dll
+ 	-del mpz.lib
+ 
