freebsd-dev/contrib/libgmp/Makefile.in

211 lines
6.1 KiB
Makefile
Raw Normal View History

# Top Makefile for GNU MP
# 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 = .
prefix = /usr/local
exec_prefix = $(prefix)
libdir = $(exec_prefix)/lib
infodir = $(prefix)/info
includedir = $(prefix)/include
CC = gcc
LOCAL_CC = $(CC)
CFLAGS = -g -O
XCFLAGS =
AR = ar
AR_FLAGS = rc
RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
RANLIB = ranlib
SHELL = /bin/sh
INSTALL = $(srcdir)/install.sh -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)
MAKEINFO = makeinfo
MAKEINFOFLAGS =
TEXI2DVI = texi2dvi
LN = ln -s
#### host and target specific makefile fragments come in here.
###
SRCS = memory.c mp_set_fns.c mp_clz_tab.c version.c stack-alloc.c mp_bpl.c \
extract-double.c insert-double.c
OBJS = memory.o mp_set_fns.o mp_clz_tab.o version.o stack-alloc.o mp_bpl.o \
extract-double.o insert-double.o
FILES = gmp.h mp.h gmp-impl.h longlong.h urandom.h move-if-change \
mkinstalldirs INSTALL COPYING.LIB ChangeLog Makefile.in \
NEWS README SPEED TODO config.guess config.sub configure configure.in \
gmp.info* gmp.texi texinfo.tex $(SRCS)
INCLUDES = -I. -Impn -I$(srcdir)
FLAGS_TO_PASS = "CC=$(CC)" "CFLAGS=$(CFLAGS)" "XCFLAGS=$(XCFLAGS)"
all: libgmp.a
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
libgmp.a: mpn/libmpn.a mpz/libmpz.a mpf/libmpf.a mpq/libmpq.a $(OBJS)
rm -rf tmpdir
mkdir tmpdir
for i in mpn mpz mpf mpq; \
do \
mkdir tmpdir/$$i; \
( cd tmpdir/$$i; $(AR) x ../../$$i/lib$$i.a ); \
done
cp $(OBJS) tmpdir
cd tmpdir; $(AR) $(AR_FLAGS) $@ *.o */*.o
if $(RANLIB_TEST) ; then $(RANLIB) tmpdir/$@; else true; fi
mv tmpdir/$@ .
rm -rf tmpdir
libmp.a: mpn/libmpn.a mpbsd/libmpbsd.a $(OBJS)
rm -rf tmpdir
mkdir tmpdir
for i in mpn mpbsd; \
do \
mkdir tmpdir/$$i; \
( cd tmpdir/$$i; $(AR) x ../../$$i/lib$$i.a ); \
done
cp $(OBJS) tmpdir
cd tmpdir; $(AR) $(AR_FLAGS) $@ *.o */*.o
if $(RANLIB_TEST) ; then $(RANLIB) tmpdir/$@; else true; fi
mv tmpdir/$@ .
rm -rf tmpdir
mpn/libmpn.a: force
cd mpn; $(MAKE) $(FLAGS_TO_PASS) libmpn.a
mpz/libmpz.a: force
cd mpz; $(MAKE) $(FLAGS_TO_PASS) libmpz.a
mpf/libmpf.a: force
cd mpf; $(MAKE) $(FLAGS_TO_PASS) libmpf.a
mpq/libmpq.a: force
cd mpq; $(MAKE) $(FLAGS_TO_PASS) libmpq.a
mpbsd/libmpbsd.a: force
cd mpbsd; $(MAKE) $(FLAGS_TO_PASS) libmpbsd.a
check: libgmp.a
cd mpz/tests; $(MAKE) $(FLAGS_TO_PASS) check
cd mpq/tests; $(MAKE) $(FLAGS_TO_PASS) check
cd mpf/tests; $(MAKE) $(FLAGS_TO_PASS) check
doc: gmp.dvi gmp.info
info: $(srcdir)/gmp.info
$(srcdir)/gmp.info: $(srcdir)/gmp.texi
cd $(srcdir); $(MAKEINFO) gmp.texi
dvi: gmp.dvi
gmp.dvi: $(srcdir)/gmp.texi
rm -f tmp.texi
$(LN) $(srcdir)/gmp.texi tmp.texi
TEXINPUTS=.:$(srcdir) $(TEXI2DVI) tmp.texi
rm -f tmp.texi
mv tmp.dvi gmp.dvi
rm -f tmp.*
ps: gmp.ps
gmp.ps: gmp.dvi
dvips gmp.dvi -o gmp.ps
html: gmp_toc.html
gmp_toc.html: $(srcdir)/gmp.texi
texi2html -acc -split_chapter $(srcdir)/gmp.texi
# The semicolon is to prevent the install.sh -> install default rule
# from doing anything. Having it run true helps avoid problems and
# noise from versions of make which don't like to have null commands.
install: install-normal ; @true
install-strip: install-normal
install-normal: installdirs libgmp.a gmp.info install-info-files
$(INSTALL_DATA) libgmp.a $(libdir)/libgmp.a
-chmod a-x $(libdir)/libgmp.a
$(INSTALL_DATA) $(srcdir)/gmp.h $(includedir)/gmp.h
-chmod a-x $(includedir)/gmp.h
install-bsdmp: installdirs libmp.a gmp.info install-info-files
$(INSTALL_DATA) libmp.a $(libdir)/libmp.a
-chmod a-x $(libdir)/libmp.a
$(INSTALL_DATA) $(srcdir)/mp.h $(includedir)/mp.h
-chmod a-x $(includedir)/mp.h
install-info-files: installdirs $(srcdir)/gmp.info
cd $(srcdir); for f in gmp.info*; \
do $(INSTALL_DATA) $$f $(infodir)/$$f; done
-chmod a-x $(infodir)/gmp.info*
# Attempt to edit the info directory node
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --dir-file=$(infodir)/dir $(infodir)/gmp.info; \
else true; fi
installdirs: $(srcdir)/mkinstalldirs
$(srcdir)/mkinstalldirs $(includedir) $(libdir) $(infodir)
uninstall:
rm -f $(libdir)/libgmp.a
rm -f $(includedir)/gmp.h
rm -f $(libdir)/libmp.a
rm -f $(includedir)/mp.h
rm -f $(infodir)/gmp.info*
clean mostlyclean:
rm -f *.o libgmp.a libmp.a gmp.dvi gmp.ps tmp.* tmp-*
rm -f gmp.?? gmp.??s gmp.log gmp.toc gmp.*aux gmp*.html
-cd mpn; $(MAKE) $@
-cd mpz; $(MAKE) $@
-cd mpf; $(MAKE) $@
-cd mpq; $(MAKE) $@
-cd mpbsd; $(MAKE) $@
distclean: clean
rm -f Makefile config.status
-cd mpn; $(MAKE) $@
-cd mpz; $(MAKE) $@
-cd mpf; $(MAKE) $@
-cd mpq; $(MAKE) $@
-cd mpbsd; $(MAKE) $@
maintainer-clean: distclean
rm -f $(srcdir)/gmp.info*
TAGS: force
cd $(srcdir); etags *.[ch] mp*/*.c mpn/generic/*.c >TAGS
dist:
@echo "sorry, not supported target"
@exit 1
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
$(SHELL) ./config.status
H = $(srcdir)/gmp.h $(srcdir)/gmp-impl.h mpn/gmp-mparam.h
extract-double.o: $(srcdir)/extract-double.c $(H)
insert-double.o: $(srcdir)/insert-double.c $(H)
memory.o: $(srcdir)/memory.c $(H)
mp_bpl.o: $(srcdir)/mp_bpl.c
mp_clz_tab.o: $(srcdir)/mp_clz_tab.c
mp_set_fns.o: $(srcdir)/mp_set_fns.c $(H)
stack-alloc.o: $(srcdir)/stack-alloc.c $(srcdir)/stack-alloc.h
version.o: $(srcdir)/version.c
force:
.PNONY: check install install-bsdmp install-info-files install-strip uninstall
.PHONY: doc clean distclean maintainer-clean force info dvi