summaryrefslogtreecommitdiffstats
path: root/contrib/libgmp/mpn/Makefile.in
blob: 132159b9465ed87c25ae934a62a6d2ff8f7d5997 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Makefile for GNU MP/mpn functions
# Copyright (C) 1991, 1993, 1994, 1996 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 Library General Public License as published by
# the Free Software Foundation; either version 2 of the License, 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 Library General Public
# License for more details.

# You should have received a copy of the GNU Library General Public License
# along with the GNU MP 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.

srcdir = .

MPN_OBJECTS = This gets filled in by configure.in.
MPN_LINKS = This gets filled in by configure.in.
CC = gcc
CPP = $(CC) -E
CFLAGS = -g -O
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/..
AR = ar
AR_FLAGS = rc
SFLAGS=

#### host and target specific makefile fragments come in here.
###

libmpn.a: Makefile mp_bases.o $(MPN_OBJECTS)
	rm -f $@
	$(AR) $(AR_FLAGS) $@ mp_bases.o $(MPN_OBJECTS)

.SUFFIXES: .c .s .S

.c.o:
	$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<

.s.o:
	$(CC) -c $(CFLAGS) $<

.S.o:
	$(CPP) $(SFLAGS) $(INCLUDES) $(CFLAGS) $< | grep -v '^#' >tmp-$*.s
	$(CC) -c tmp-$*.s -o $@
	rm -f tmp-$*.s

clean mostlyclean:
	rm -f *.o tmp-* libmpn.a
	#-cd tests; $(MAKE) $@
distclean maintainer-clean: clean
	rm -f asm-syntax.h Makefile config.status $(MPN_LINKS)
	-cd tests; $(MAKE) $@

Makefile: $(srcdir)/Makefile.in
	$(SHELL) ./config.status


# Maybe configure could add dependencies here..?

H = $(srcdir)/../gmp.h $(srcdir)/../gmp-impl.h gmp-mparam.h
L = $(srcdir)/../longlong.h

mp_bases.o: $(srcdir)/mp_bases.c $(H)
bdivmod.o: bdivmod.c $(H) $(L)
cmp.o: cmp.c $(H)
divmod_1.o: divmod_1.c $(H) $(L)
divrem.o: divrem.c $(H) $(L)
divrem_1.o: divrem_1.c $(H) $(L)
dump.o: dump.c $(H)
gcd.o: gcd.c $(H) $(L)
gcd_1.o: gcd_1.c $(H) $(L)
gcdext.o: gcdext.c $(H) $(L)
get_str.o: get_str.c $(H) $(L)
hamdist.o: hamdist.c $(H)
inlines.o: inlines.c $(srcdir)/../gmp.h
mod_1.o: mod_1.c $(H) $(L)
mul.o: mul.c $(H)
mul_n.o: mul_n.c $(H)
perfsqr.o: perfsqr.c $(H) $(L)
popcount.o: popcount.c $(H)
pre_mod_1.o: pre_mod_1.c $(H) $(L)
random2.o: random2.c $(H)
scan0.o: scan0.c $(H) $(L)
scan1.o: scan1.c $(H) $(L)
set_str.o: set_str.c $(H)
sqrtrem.o: sqrtrem.c $(H) $(L)
OpenPOWER on IntegriCloud