2 # Copyright (C) 2003-2013 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@
47 LN_S_RECURSIVE
= cp
-pR
49 LN_S_RECURSIVE
= $(LN_S
)
52 # Variables for the user (or the top level) to override.
58 # The tedious process of getting CFLAGS right.
61 GNATLIBFLAGS
= -W
-Wall
-gnatpg
-nostdinc
63 GNATLIBCFLAGS_FOR_C
= -W
-Wall
$(GNATLIBCFLAGS
) \
64 -fexceptions
-DIN_RTS @have_getipinfo@
66 host_subdir
= @host_subdir@
67 GCC_DIR
=$(MULTIBUILDTOP
)..
/..
/$(host_subdir
)/gcc
69 target_noncanonical
:=@target_noncanonical@
70 version
:= $(shell cat
$(srcdir)/..
/gcc
/BASE-VER
)
71 libsubdir
:= $(libdir)/gcc
/$(target_noncanonical
)/$(version
)$(MULTISUBDIR
)
72 ADA_RTS_DIR
=$(GCC_DIR
)/ada
/rts
$(subst /,_
,$(MULTISUBDIR
))
73 ADA_RTS_SUBDIR
=.
/rts
$(subst /,_
,$(MULTISUBDIR
))
75 # exeext should not be used because it's the *host* exeext. We're building
76 # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
77 # definitions just in case something slips through the safety net provided
78 # by recursive make invocations in gcc/ada/Makefile.in
79 LIBADA_FLAGS_TO_PASS
= \
81 "LDFLAGS=$(LDFLAGS)" \
84 "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
85 "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
86 "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
87 "PICFLAG_FOR_TARGET=$(PICFLAG)" \
88 "THREAD_KIND=$(THREAD_KIND)" \
90 "MULTISUBDIR=$(MULTISUBDIR)" \
91 "libsubdir=$(libsubdir)" \
94 "exeext=.exeext.should.not.be.used " \
95 'CC=the.host.compiler.should.not.be.needed' \
96 "GCC_FOR_TARGET=$(CC)" \
99 # Rules to build gnatlib.
100 .PHONY
: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
101 gnatlib
: @default_gnatlib_target@
103 gnatlib-plain
: osconstool
$(GCC_DIR
)/ada
/Makefile
104 test -f stamp-libada || \
105 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) gnatlib \
106 && touch stamp-libada
109 $(LN_S_RECURSIVE
) $(ADA_RTS_DIR
) adainclude
110 $(LN_S_RECURSIVE
) $(ADA_RTS_DIR
) adalib
112 gnatlib-sjlj gnatlib-zcx gnatlib-shared
: osconstool
$(GCC_DIR
)/ada
/Makefile
113 test -f stamp-libada || \
114 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) $@ \
115 && touch stamp-libada
118 $(LN_S_RECURSIVE
) $(ADA_RTS_DIR
) adainclude
119 $(LN_S_RECURSIVE
) $(ADA_RTS_DIR
) adalib
122 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) .
/bldtools
/oscons
/xoscons
124 install-gnatlib
: $(GCC_DIR
)/ada
/Makefile
125 $(MAKE
) -C
$(GCC_DIR
)/ada
$(LIBADA_FLAGS_TO_PASS
) install-gnatlib
127 # Check uninstalled version.
130 # Check installed version.
133 # Build info (none here).
136 # Build DVI (none here).
139 # Build PDF (none here).
142 # Build html (none here).
145 # Build TAGS (none here).
148 .PHONY
: check installcheck info dvi pdf html
150 # Installation rules.
151 install: install-gnatlib
152 $(MULTIDO
) $(AM_MAKEFLAGS
) DO
=install multi-do
# $(MAKE)
154 install-strip
: install
162 .PHONY
: install install-strip install-info install-pdf install-html
166 $(MULTICLEAN
) $(AM_MAKEFLAGS
) DO
=mostlyclean multi-clean
# $(MAKE)
169 $(MULTICLEAN
) $(AM_MAKEFLAGS
) DO
=clean multi-clean
# $(MAKE)
172 $(MULTICLEAN
) $(AM_MAKEFLAGS
) DO
=distclean multi-clean
# $(MAKE)
173 $(RM
) Makefile config.status config.log
177 .PHONY
: mostlyclean clean distclean maintainer-clean
179 # Rules for rebuilding this Makefile.
180 Makefile
: $(srcdir)/Makefile.in config.status
183 $(SHELL
) .
/config.status
185 config.status
: $(srcdir)/configure
186 $(SHELL
) .
/config.status
--recheck
190 $(srcdir)/configure.ac \
191 $(srcdir)/..
/config
/acx.m4 \
192 $(srcdir)/..
/config
/override.m4 \
193 $(srcdir)/..
/config
/multi.m4
195 $(srcdir)/configure
: @MAINT@
$(configure_deps
)
196 cd
$(srcdir) && $(AUTOCONF
)
198 # Don't export variables to the environment, in order to not confuse