summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2007-11-06 14:39:11 +0000
committerzimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2007-11-06 14:39:11 +0000
commit71dbbf5b60e1ba100b5d6f89d65fa5e7681873de (patch)
tree229b83e4c29c99a1bbcb13f7feae490028f97f73
parent9046759483941d103b683a63e6e2d4e1df10e5a2 (diff)
downloadmpc-71dbbf5b60e1ba100b5d6f89d65fa5e7681873de.tar.gz
added makefile.vc for Windows, contributed by Mickael Gastineau
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@66 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--INSTALL28
-rw-r--r--makefile2
-rw-r--r--makefile.vc97
3 files changed, 125 insertions, 2 deletions
diff --git a/INSTALL b/INSTALL
index d601a14..1403a69 100644
--- a/INSTALL
+++ b/INSTALL
@@ -43,4 +43,30 @@
to produce the documentation in DVI or Postscript format.
In case of difficulties, send a description of the problem to
-<enge@lix.polytechnique.fr, zimmerma@loria.fr>.
+<enge at lix dot polytechnique.fr, zimmerma at loria dot fr>
+(replace 'at' by '@', and 'dot' by '.').
+
+##############################################################################
+
+Note for Windows users:
+======================
+
+There is a special file makefile.vc for Windows, contributed by Mickael
+Gastineau. This file works both for the SDK from Visual Studio, and for that
+of Vista. To use it, simply replace "make" by "nmake /f makefile.vc" in the
+above instructions:
+
+compilation :
+nmake /f makefile.vc GMP=<gmp_install_dir> MPFR=<mpfr_install_dir>
+
+clean :
+nmake /f makefile.vc GMP=<gmp_install_dir> MPFR=<mpfr_install_dir> clean
+
+check :
+nmake /f makefile.vc GMP=<gmp_install_dir> MPFR=<mpfr_install_dir> check
+
+For any issue related to the makefile.vc file, please contact directly
+Mickael Gastineau at <gastineau at imcce dot fr> (replace 'at' by '@',
+and 'dot' by '.').
+
+
diff --git a/makefile b/makefile
index f09b873..5cded28 100644
--- a/makefile
+++ b/makefile
@@ -40,7 +40,7 @@ LIBS=$(MPFR)/lib/libmpfr.a $(GMP)/lib/libgmp.a
OBJECTS= abs.o add.o add_fr.o add_ui.o clear.o cmp.o cmp_si_si.o conj.o div.o div_2exp.o div_fr.o div_ui.o exp.o get_prec.o get_prec2.o init.o init2.o init3.o inp_str.o mul.o mul_2exp.o mul_fr.o mul_ui.o mul_si.o mul_i.o neg.o norm.o out_str.o random.o random2.o set.o set_d_d.o set_dfl_prec.o set_prec.o set_ui_fr.o set_si_si.o set_ui_ui.o sqr.o sqrt.o sub.o sub_ui.o ui_div.o uceil_log2.o ui_ui_sub.o sin.o
SOURCES= abs.c add.c add_fr.c add_ui.c clear.c cmp.c cmp_si_si.c conj.c div.c div_2exp.c div_fr.c div_ui.c exp.c get_prec.c get_prec2.c init.c init2.c init3.c inp_str.c mul.c mul_2exp.c mul_fr.c mul_ui.c mul_si.c mul_i.c neg.c norm.c out_str.c random.c random2.c set.c set_d_d.c set_dfl_prec.c set_prec.c set_ui_fr.c set_si_si.c set_ui_ui.c sqr.c sqrt.c sub.c sub_ui.c ui_div.c uceil_log2.c ui_ui_sub.c sin.c
TESTS= test.c tmul.c tsqr.c tdiv.c texp.c tabs.c tsin.c
-DIST= $(SOURCES) $(TESTS) makefile mpc.h mpc-impl.h COPYING.LIB mpc.texi INSTALL
+DIST= $(SOURCES) $(TESTS) makefile makefile.vc mpc.h mpc-impl.h COPYING.LIB mpc.texi INSTALL
.c.o:
$(CC) $(INCLUDES) $(CFLAGS) -c $<
diff --git a/makefile.vc b/makefile.vc
new file mode 100644
index 0000000..c754b08
--- /dev/null
+++ b/makefile.vc
@@ -0,0 +1,97 @@
+# Makefile for the MPC library (Windows version).
+#
+# Copyright (C) 2002, 2004, 2005, 2007 Andreas Enge, Mickael Gastineau, Paul Zimmermann
+#
+# This file is part of the MPC Library.
+#
+# The MPC Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
+# option) any later version.
+#
+# The MPC 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 Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with the MPC Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
+
+AR=lib.exe
+CC=cl.exe
+RANLIB=ranlib
+CFLAGS=/O2 /DEBUG /GR- /MT /nologo /EHs
+RM=del
+
+GMP=/usr/local
+MPFR=$(GMP)
+
+######################## do not edit below this line ##########################
+
+.SUFFIXES: .c .o
+
+INCLUDES=/I. /I$(MPFR)/include /I$(GMP)/include
+LIBS=$(MPFR)/lib/mpfr.lib $(GMP)/lib/gmp.lib
+
+OBJECTS= abs.obj add.obj add_fr.obj add_ui.obj clear.obj cmp.obj cmp_si_si.obj conj.obj div.obj div_2exp.obj div_fr.obj div_ui.obj exp.obj get_prec.obj get_prec2.obj init.obj init2.obj init3.obj inp_str.obj mul.obj mul_2exp.obj mul_fr.obj mul_ui.obj mul_si.obj mul_i.obj neg.obj norm.obj out_str.obj random.obj random2.obj set.obj set_d_d.obj set_dfl_prec.obj set_prec.obj set_ui_fr.obj set_si_si.obj set_ui_ui.obj sqr.obj sqrt.obj sub.obj sub_ui.obj ui_div.obj uceil_log2.obj ui_ui_sub.obj sin.obj
+SOURCES= abs.c add.c add_fr.c add_ui.c clear.c cmp.c cmp_si_si.c conj.c div.c div_2exp.c div_fr.c div_ui.c exp.c get_prec.c get_prec2.c init.c init2.c init3.c inp_str.c mul.c mul_2exp.c mul_fr.c mul_ui.c mul_si.c mul_i.c neg.c norm.c out_str.c random.c random2.c set.c set_d_d.c set_dfl_prec.c set_prec.c set_ui_fr.c set_si_si.c set_ui_ui.c sqr.c sqrt.c sub.c sub_ui.c ui_div.c uceil_log2.c ui_ui_sub.c sin.c
+TESTS= test.c tmul.c tsqr.c tdiv.c texp.c tabs.c tsin.c
+
+.c.obj:
+ $(CC) $(INCLUDES) $(CFLAGS) -c $<
+
+mpc.lib: $(OBJECTS)
+ $(AR)/out:$@ $(OBJECTS)
+
+
+check: test tmul tsqr tdiv texp tabs tsin
+ @echo Testing all functions
+ $(RM) mpc_test
+ .\test
+ $(RM) mpc_test
+ @echo Testing mpc_mul
+ .\tmul
+ @echo Testing mpc_sqr
+ .\tsqr
+ @echo Testing mpc_div
+ .\tdiv
+ @echo Testing mpc_exp
+ .\texp
+ @echo Testing mpc_sin
+ .\tsin
+ @echo Testing mpc_abs
+ .\tabs
+
+# Building scheme is complicated: we first try to build with explicit static lib, and if it fails with /LIBPATH: <= -Ldirectory is scanned AFTER system directory
+test: test.c mpc.lib
+ @echo "Building test" && $(CC) $(CFLAGS) $(INCLUDES) test.c /link /out:test.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+tmul: tmul.c mpc.lib
+ @echo "Building tmul" && $(CC) $(CFLAGS) $(INCLUDES) tmul.c /link /out:tmul.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+tsqr: tsqr.c mpc.lib
+ @echo "Building tsqr" && $(CC) $(CFLAGS) $(INCLUDES) tsqr.c /link /out:tsqr.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+tdiv: tdiv.c mpc.lib
+ @echo "Building tdiv" && $(CC) $(CFLAGS) $(INCLUDES) tdiv.c /link /out:tdiv.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+texp: texp.c mpc.lib
+ @echo "Building texp" && $(CC) $(CFLAGS) $(INCLUDES) texp.c /link /out:texp.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+tsin: tsin.c mpc.lib
+ @echo "Building tsin" && $(CC) $(CFLAGS) $(INCLUDES) tsin.c /link /out:tsin.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+tabs: tabs.c mpc.lib
+ @echo "Building tabs" && $(CC) $(CFLAGS) $(INCLUDES) tabs.c /link /out:tabs.exe /LIBPATH:"." mpc.lib /LIBPATH:"$(MPFR)/lib" mpfr.lib /LIBPATH:"$(GMP)/lib" gmp.lib
+
+clean:
+ $(RM) *.obj *~ mpc.lib test.exe tmul.exe tsqr.exe tdiv.exe texp.exe tsin.exe tabs.exe mpc.aux mpc.cp mpc.cps mpc.dvi mpc.fn mpc.fns mpc.ky mpc.log mpc.pg mpc.ps mpc.toc mpc.tp mpc.vr mpc.vrs
+
+
+mpc.dvi: mpc.texi
+ texi2dvi mpc.texi
+
+mpc.ps: mpc.dvi
+ dvips mpc -o