1 # Makefile for GNU MP/mpn functions
2 # Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
4 # This file is part of the GNU MP Library.
6 # The GNU MP Library is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Library General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or (at your
9 # option) any later version.
11 # The GNU MP Library is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 # License for more details.
16 # You should have received a copy of the GNU Library General Public License
17 # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 MPN_OBJECTS = This gets filled in by configure.in.
24 MPN_LINKS = This gets filled in by configure.in.
28 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/..
33 #### host and target specific makefile fragments come in here.
36 libmpn.a: Makefile mp_bases.o $(MPN_OBJECTS)
38 $(AR) $(AR_FLAGS) $@ mp_bases.o $(MPN_OBJECTS)
43 $(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
49 $(CPP) $(SFLAGS) $(INCLUDES) $(CFLAGS) $< | grep -v '^#' >tmp-$*.s
50 $(CC) -c tmp-$*.s -o $@
54 rm -f *.o tmp-* libmpn.a
55 #-cd tests; $(MAKE) $@
56 distclean maintainer-clean: clean
57 rm -f asm-syntax.h Makefile config.status $(MPN_LINKS)
60 Makefile: $(srcdir)/Makefile.in
61 $(SHELL) ./config.status
64 # Maybe configure could add dependencies here..?
66 H = $(srcdir)/../gmp.h $(srcdir)/../gmp-impl.h gmp-mparam.h
67 L = $(srcdir)/../longlong.h
69 mp_bases.o: $(srcdir)/mp_bases.c $(H)
70 bdivmod.o: bdivmod.c $(H) $(L)
72 divmod_1.o: divmod_1.c $(H) $(L)
73 divrem.o: divrem.c $(H) $(L)
74 divrem_1.o: divrem_1.c $(H) $(L)
76 gcd.o: gcd.c $(H) $(L)
77 gcd_1.o: gcd_1.c $(H) $(L)
78 gcdext.o: gcdext.c $(H) $(L)
79 get_str.o: get_str.c $(H) $(L)
80 hamdist.o: hamdist.c $(H)
81 inlines.o: inlines.c $(srcdir)/../gmp.h
82 mod_1.o: mod_1.c $(H) $(L)
85 perfsqr.o: perfsqr.c $(H) $(L)
86 popcount.o: popcount.c $(H)
87 pre_mod_1.o: pre_mod_1.c $(H) $(L)
88 random2.o: random2.c $(H)
89 scan0.o: scan0.c $(H) $(L)
90 scan1.o: scan1.c $(H) $(L)
91 set_str.o: set_str.c $(H)
92 sqrtrem.o: sqrtrem.c $(H) $(L)