summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libgmp
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-11-13 18:42:24 +0000
committermarkm <markm@FreeBSD.org>1995-11-13 18:42:24 +0000
commit16f9bc5625e92cdb96ae817fd5ba4d9fb69d41ba (patch)
tree7043ca998b932d1de0b315264c7e9e0b3b4bfe45 /gnu/lib/libgmp
parent0589c43eb098938e13922d232a3d1f55fcf6b11a (diff)
downloadFreeBSD-src-16f9bc5625e92cdb96ae817fd5ba4d9fb69d41ba.zip
FreeBSD-src-16f9bc5625e92cdb96ae817fd5ba4d9fb69d41ba.tar.gz
Make the tests work. libmp and libgmp must be installed for this
to work.
Diffstat (limited to 'gnu/lib/libgmp')
-rw-r--r--gnu/lib/libgmp/tests/Makefile6
-rw-r--r--gnu/lib/libgmp/tests/Makefile.GNU64
2 files changed, 68 insertions, 2 deletions
diff --git a/gnu/lib/libgmp/tests/Makefile b/gnu/lib/libgmp/tests/Makefile
index aa18015..3d74668 100644
--- a/gnu/lib/libgmp/tests/Makefile
+++ b/gnu/lib/libgmp/tests/Makefile
@@ -18,11 +18,13 @@
# along with the GNU MP Library; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+.PATH: ${.CURDIR}/.. ${.CURDIR}/../obj ${.CURDIR}/../libgmp/obj
+
CC = gcc
-TEST_LIBS = ../libgmp.a
+TEST_LIBS = -lgmp
OPT = -O -g
-CFLAGS = -I. -I.. $(OPT)
+CFLAGS = -I${.CURDIR} -I${.CURDIR}/.. -I${.CURDIR}/../obj -I${.CURDIR}/../libgmp/obj $(OPT)
TEST_SRCS = tst-mul.c tst-dm.c tst-dm_ui.c tst-mdm.c tst-mdm_ui.c tst-gcd.c \
tst-sqrtrem.c tst-convert.c
diff --git a/gnu/lib/libgmp/tests/Makefile.GNU b/gnu/lib/libgmp/tests/Makefile.GNU
new file mode 100644
index 0000000..aa18015
--- /dev/null
+++ b/gnu/lib/libgmp/tests/Makefile.GNU
@@ -0,0 +1,64 @@
+# Makefile for tests for GNU MP
+
+# Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# The GNU MP 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with the GNU MP Library; see the file COPYING. If not, write to
+# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+CC = gcc
+
+TEST_LIBS = ../libgmp.a
+OPT = -O -g
+CFLAGS = -I. -I.. $(OPT)
+
+TEST_SRCS = tst-mul.c tst-dm.c tst-dm_ui.c tst-mdm.c tst-mdm_ui.c tst-gcd.c \
+ tst-sqrtrem.c tst-convert.c
+TEST_OBJS = tst-mul.o tst-dm.o tst-dm_ui.o tst-mdm.o tst-mdm_ui.o tst-gcd.o \
+ tst-sqrtrem.o tst-convert.o
+TESTS = tst-mul tst-dm tst-dm_ui tst-mdm tst-mdm_ui tst-gcd \
+ tst-sqrtrem tst-convert
+
+tests: $(TESTS)
+ for i in $(TESTS); do echo $$i; ./$$i; done
+
+tst-mul: tst-mul.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-dm: tst-dm.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-dm_ui: tst-dm_ui.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-mdm: tst-mdm.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-mdm_ui: tst-mdm_ui.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-gcd: tst-gcd.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-sqrtrem: tst-sqrtrem.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+tst-convert: tst-convert.o $(TEST_LIBS)
+ $(CC) $(CFLAGS) -o $@ $@.o $(TEST_LIBS)
+
+$(TEST_PREFIX)clean:
+ rm -f $(TESTS) $(TEST_OBJS) core
+
+tst-convert.o : tst-convert.c ../gmp.h urandom.h
+tst-dm.o : tst-dm.c ../gmp.h urandom.h
+tst-dm_ui.o : tst-dm_ui.c ../gmp.h urandom.h
+tst-gcd.o : tst-gcd.c ../gmp.h urandom.h
+tst-mdm.o : tst-mdm.c ../gmp.h urandom.h
+tst-mdm_ui.o : tst-mdm_ui.c ../gmp.h urandom.h
+tst-mul.o : tst-mul.c ../gmp.h ../gmp-impl.h ../gmp-mparam.h ../longlong.h urandom.h
+tst-sqrtrem.o : tst-sqrtrem.c ../gmp.h urandom.h
OpenPOWER on IntegriCloud