1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
5 # This file is part of the GNU MP Library.
7 # The GNU MP Library is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation; either version 2.1 of the License, or (at your
10 # option) any later version.
12 # The GNU MP Library is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 # License for more details.
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
19 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 AUTOMAKE_OPTIONS = gnu no-dependencies
28 # -DOPERATION_$* tells multi-function files which function to produce.
29 INCLUDES = -I$(top_srcdir) -DOPERATION_$*
31 GENERIC_SOURCES = mp_bases.c
32 OFILES = @mpn_objects@
34 noinst_LTLIBRARIES = libmpn.la
35 libmpn_la_SOURCES = $(GENERIC_SOURCES)
36 libmpn_la_LIBADD = $(OFILES)
37 libmpn_la_DEPENDENCIES = $(OFILES)
39 TARG_DIST = a29k alpha arm clipper cray generic hppa i960 lisp m68k m88k \
40 mips2 mips3 ns32k pa64 pa64w power powerpc32 powerpc64 pyr sh sparc32 \
41 sparc64 thumb vax x86 z8000 z8000x
43 EXTRA_DIST = underscore.h asm-defs.m4 $(TARG_DIST)
45 # COMPILE minus CC. FIXME: Really pass *_CFLAGS to CPP?
47 $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
51 # *.s are not preprocessed at all.
53 $(CCAS) $(COMPILE_FLAGS) $<
55 $(CCAS) $(COMPILE_FLAGS) `cygpath -w $<`
57 $(LIBTOOL) --mode=compile $(CCAS) $(COMPILE_FLAGS) $<
59 # *.S are preprocessed with CPP.
61 $(CPP) $(COMPILE_FLAGS) $< | grep -v '^#' >tmp-$*.s
62 $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
65 $(CPP) $(COMPILE_FLAGS) `cygpath -w $<` | grep -v '^#' >tmp-$*.s
66 $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
69 # We have to rebuild the static object file without passing -DPIC to
70 # preprocessor. The overhead cost is one extra assemblation. FIXME:
71 # Teach libtool how to assemble with a preprocessor pass (CPP or m4).
74 $(CPP) $(COMPILE_FLAGS) -DPIC $< | grep -v '^#' >tmp-$*.s
75 $(LIBTOOL) --mode=compile $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
76 $(CPP) $(COMPILE_FLAGS) $< | grep -v '^#' >tmp-$*.s
77 $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $*.o
80 # *.m4 are preprocessed with m4.
82 $(M4) -DOPERATION_$* $< >tmp-$*.s
83 $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
86 $(M4) -DOPERATION_$* `cygpath -w $<` >tmp-$*.s
87 $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
90 $(M4) -DPIC -DOPERATION_$* $< >tmp-$*.s
91 $(LIBTOOL) --mode=compile $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
92 $(M4) -DOPERATION_$* $< >tmp-$*.s
93 $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $*.o