2 # Copyright 2003, 2004, 2009, 2010, 2011 Free Software Foundation, Inc.
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; see the file COPYING3. If not see
16 # <http://www.gnu.org/licenses/>.
18 # Default target; must be first.
20 $(MULTIDO
) $(AM_MAKEFLAGS
) DO
=all multi-do
# $(MAKE)
24 ## Multilib support variables.
32 # Standard autoconf-set variables.
40 # Nonstandard autoconf-set variables.
41 enable_shared
= @enable_shared@
46 # Variables for the user (or the top level) to override.
52 # The tedious process of getting CFLAGS right.
55 GNATLIBFLAGS
= -W
-Wall
-gnatpg
-nostdinc
57 GNATLIBCFLAGS_FOR_C
= -W
-Wall
$(GNATLIBCFLAGS
) \
58 -fexceptions
-DIN_RTS @have_getipinfo@
60 host_subdir
= @host_subdir@
61 GCC_DIR
=$(MULTIBUILDTOP
)..
/..
/$(host_subdir
)/gcc
63 target_noncanonical
:=@target_noncanonical@
64 version
:= $(shell cat
$(srcdir)/..
/gcc
/BASE-VER
)
65 libsubdir
:= $(libdir)/gcc
/$(target_noncanonical
)/$(version
)$(MULTISUBDIR
)
66 ADA_RTS_DIR
=$(GCC_DIR
)/ada
/rts
$(subst /,_
,$(MULTISUBDIR
))
67 ADA_RTS_SUBDIR
=.
/rts
$(subst /,_
,$(MULTISUBDIR
))
69 # exeext should not be used because it's the *host* exeext. We're building
70 # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
71 # definitions just in case something slips through the safety net provided
72 # by recursive make invocations in gcc/ada/Makefile.in
73 LIBADA_FLAGS_TO_PASS
= \
75 "LDFLAGS=$(LDFLAGS)" \
78 "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
79 "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
80 "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
81 "PICFLAG_FOR_TARGET=$(PICFLAG)" \
82 "THREAD_KIND=$(THREAD_KIND)" \
84 "MULTISUBDIR=$(MULTISUBDIR)" \
85 "libsubdir=$(libsubdir)" \
88 "exeext=.exeext.should.not.be.used " \
89 'CC=the.host.compiler.should.not.be.needed' \
90 "GCC_FOR_TARGET=$(CC)" \
93 # Rules to build gnatlib.
94 .PHONY
: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
95 gnatlib
: @default_gnatlib_target@
97 gnatlib-plain
: osconstool
$(GCC_DIR
)/ada
/Makefile
98 test -f stamp-libada || \
99 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) gnatlib \
100 && touch stamp-libada
103 $(LN_S
) $(ADA_RTS_DIR
) adainclude
104 $(LN_S
) $(ADA_RTS_DIR
) adalib
106 gnatlib-sjlj gnatlib-zcx gnatlib-shared
: osconstool
$(GCC_DIR
)/ada
/Makefile
107 test -f stamp-libada || \
108 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) $@ \
109 && touch stamp-libada
112 $(LN_S
) $(ADA_RTS_DIR
) adainclude
113 $(LN_S
) $(ADA_RTS_DIR
) adalib
116 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) .
/bldtools
/oscons
/xoscons
118 install-gnatlib
: $(GCC_DIR
)/ada
/Makefile
119 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) install-gnatlib
121 # Check uninstalled version.
124 # Check installed version.
127 # Build info (none here).
130 # Build DVI (none here).
133 # Build PDF (none here).
136 # Build html (none here).
139 # Build TAGS (none here).
142 .PHONY
: check installcheck info dvi pdf html
144 # Installation rules.
145 install: install-gnatlib
146 $(MULTIDO
) $(AM_MAKEFLAGS
) DO
=install multi-do
# $(MAKE)
148 install-strip
: install
156 .PHONY
: install install-strip install-info install-pdf install-html
160 $(MULTICLEAN
) $(AM_MAKEFLAGS
) DO
=mostlyclean multi-clean
# $(MAKE)
163 $(MULTICLEAN
) $(AM_MAKEFLAGS
) DO
=clean multi-clean
# $(MAKE)
166 $(MULTICLEAN
) $(AM_MAKEFLAGS
) DO
=distclean multi-clean
# $(MAKE)
167 $(RM
) Makefile config.status config.log
171 .PHONY
: mostlyclean clean distclean maintainer-clean
173 # Rules for rebuilding this Makefile.
174 Makefile
: $(srcdir)/Makefile.in config.status
177 $(SHELL
) .
/config.status
179 config.status
: $(srcdir)/configure
180 $(SHELL
) .
/config.status
--recheck
184 $(srcdir)/configure.ac \
185 $(srcdir)/..
/config
/acx.m4 \
186 $(srcdir)/..
/config
/override.m4 \
187 $(srcdir)/..
/config
/multi.m4
189 $(srcdir)/configure
: @MAINT@
$(configure_deps
)
190 cd
$(srcdir) && $(AUTOCONF
)
192 # Don't export variables to the environment, in order to not confuse