OSDN Git Service

16c360f5b290dc9368acae25846a2cd9a8ca7e22
[pf3gnuchains/pf3gnuchains4x.git] / newlib / libm / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS = cygnus
4
5 if NEWLIB_HW_FP
6 MATHDIR = mathfp
7 else
8 MATHDIR = math
9 endif
10
11 SUBDIRS = $(MATHDIR) common machine
12
13 libm_la_LDFLAGS = -Xcompiler -nostdlib
14
15 if USE_LIBTOOL
16 SUBLIBS = $(MATHDIR)/lib$(MATHDIR).$(aext) common/libcommon.$(aext) $(LIBM_MACHINE_LIB)
17 noinst_LTLIBRARIES = libm.la
18 libm_la_SOURCES =
19 libm_la_LIBADD = $(SUBLIBS)
20 else
21 SUBLIBS = $(MATHDIR)/lib.$(aext) common/lib.$(aext) $(LIBM_MACHINE_LIB)
22 noinst_LIBRARIES = libm.a
23 libm.a: $(SUBLIBS)
24         rm -f $@
25         rm -rf tmp
26         mkdir tmp
27         cd tmp; \
28           for i in $(SUBLIBS); do \
29             $(AR) x ../$$i; \
30         done; \
31         $(AR) $(AR_FLAGS) ../$@ *.o
32         $(RANLIB) $@
33         rm -rf tmp
34 endif
35
36 $(SUBLIBS):
37
38 info_TEXINFOS = libm.texinfo
39
40 libm_TEXINFOS = targetdep.tex
41
42 libm.dvi: targetdep.tex math/stmp-def
43
44 stmp-targetdep: force
45         rm -f tmp.texi
46         targetdoc=`pwd`/tmp.texi; \
47         for d in $(SUBDIRS); do \
48           if test "$$d" != "."; then \
49             (cd $$d && $(MAKE) doc) || exit 1; \
50           fi; \
51         done
52         $(SHELL) $(newlib_basedir)/../move-if-change tmp.texi targetdep.tex
53         touch $@
54
55 targetdep.tex: stmp-targetdep ; @true
56
57 math/stmp-def: stmp-targetdep ; @true
58
59 .PHONY: force
60 force:
61
62 CLEANFILES = tmp.texi targetdep.tex stmp-targetdep
63
64 ACLOCAL_AMFLAGS = -I ..
65 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host