Reorganisation of the source tree
[ghc-hetmet.git] / rts / gmp / mpn / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 # Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
4 #
5 # This file is part of the GNU MP Library.
6 #
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.
11 #
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.
16 #
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,
20 # MA 02111-1307, USA.
21
22
23 AUTOMAKE_OPTIONS = gnu no-dependencies
24 SUBDIRS = tests
25
26 CPP     = @CPP@
27
28 # -DOPERATION_$* tells multi-function files which function to produce.
29 INCLUDES = -I$(top_srcdir) -DOPERATION_$*
30
31 GENERIC_SOURCES = mp_bases.c
32 OFILES = @mpn_objects@
33
34 noinst_LTLIBRARIES = libmpn.la
35 libmpn_la_SOURCES = $(GENERIC_SOURCES)
36 libmpn_la_LIBADD = $(OFILES)
37 libmpn_la_DEPENDENCIES = $(OFILES)
38
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
42
43 EXTRA_DIST = underscore.h asm-defs.m4 $(TARG_DIST)
44
45 # COMPILE minus CC.  FIXME: Really pass *_CFLAGS to CPP?
46 COMPILE_FLAGS = \
47         $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
48
49 SUFFIXES = .s .S .asm
50
51 # *.s are not preprocessed at all.
52 .s.o:
53         $(CCAS) $(COMPILE_FLAGS) $<
54 .s.obj:
55         $(CCAS) $(COMPILE_FLAGS) `cygpath -w $<`
56 .s.lo:
57         $(LIBTOOL) --mode=compile $(CCAS) $(COMPILE_FLAGS) $<
58
59 # *.S are preprocessed with CPP.
60 .S.o:
61         $(CPP) $(COMPILE_FLAGS) $< | grep -v '^#' >tmp-$*.s
62         $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
63         rm -f tmp-$*.s
64 .S.obj:
65         $(CPP) $(COMPILE_FLAGS) `cygpath -w $<` | grep -v '^#' >tmp-$*.s
66         $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
67         rm -f tmp-$*.s
68
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).
72
73 .S.lo:
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
78         rm -f tmp-$*.s
79
80 # *.m4 are preprocessed with m4.
81 .asm.o:
82         $(M4) -DOPERATION_$* $< >tmp-$*.s
83         $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
84         rm -f tmp-$*.s
85 .asm.obj:
86         $(M4) -DOPERATION_$* `cygpath -w $<` >tmp-$*.s
87         $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
88         rm -f tmp-$*.s
89 .asm.lo:
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
94         rm -f tmp-$*.s