summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libgmp/tests/Makefile.GNU
blob: aa180158f450f0564eef46d0c3df213b3603759e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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