]> git.ipfire.org Git - thirdparty/gcc.git/blame - libada/Makefile.in
Makefile.in (bindir): Import from autoconf and pass down to submake.
[thirdparty/gcc.git] / libada / Makefile.in
CommitLineData
b0b70d84 1# Makefile for libada.
e3aa9eba 2# Copyright 2003, 2004, 2009, 2010, 2011 Free Software Foundation, Inc.
b0b70d84
AC
3#
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
748086b7 6# the Free Software Foundation; either version 3 of the License, or
b0b70d84
AC
7# (at your option) any later version.
8#
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.
13#
14# You should have received a copy of the GNU General Public License
748086b7
JJ
15# along with this program; see the file COPYING3. If not see
16# <http://www.gnu.org/licenses/>.
b0b70d84
AC
17
18# Default target; must be first.
5395b47b 19all: gnatlib
7193e639
LG
20 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
21
455c8f48 22.PHONY: all
7193e639
LG
23
24## Multilib support variables.
25MULTISRCTOP =
26MULTIBUILDTOP =
27MULTIDIRS =
28MULTISUBDIR =
29MULTIDO = true
30MULTICLEAN = true
b0b70d84
AC
31
32# Standard autoconf-set variables.
33SHELL = @SHELL@
34srcdir = @srcdir@
47ad7893 35libdir = @libdir@
7d78d5a6 36bindir = @bindir@
b0b70d84
AC
37build = @build@
38target = @target@
80dab182 39prefix = @prefix@
b0b70d84
AC
40
41# Nonstandard autoconf-set variables.
80dab182 42enable_shared = @enable_shared@
c390c361 43
80dab182 44LN_S=@LN_S@
c390c361 45AWK=@AWK@
80dab182
NN
46
47# Variables for the user (or the top level) to override.
48objext=.o
80dab182
NN
49THREAD_KIND=native
50TRACE=no
80dab182 51LDFLAGS=
80dab182
NN
52
53# The tedious process of getting CFLAGS right.
54CFLAGS=-g
e3aa9eba 55PICFLAG = @PICFLAG@
0cfaf83f 56GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
47ad7893 57GNATLIBCFLAGS= -g -O2
0cfaf83f
EB
58GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(PICFLAG) \
59 -fexceptions -DIN_RTS @have_getipinfo@
b0b70d84 60
9bd6112c 61host_subdir = @host_subdir@
7193e639 62GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
b0b70d84 63
f62b28a9
LG
64target_noncanonical:=@target_noncanonical@
65version := $(shell cat $(srcdir)/../gcc/BASE-VER)
7193e639 66libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
6d63ea75 67ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
5f41422f 68ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
f62b28a9 69
47ad7893
PB
70# exeext should not be used because it's the *host* exeext. We're building
71# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
72# definitions just in case something slips through the safety net provided
73# by recursive make invocations in gcc/ada/Makefile.in
f62b28a9 74LIBADA_FLAGS_TO_PASS = \
80dab182
NN
75 "MAKEOVERRIDES=" \
76 "LDFLAGS=$(LDFLAGS)" \
77 "LN_S=$(LN_S)" \
78 "SHELL=$(SHELL)" \
7193e639
LG
79 "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
80 "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
2f18d9af 81 "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
e3aa9eba 82 "PICFLAG_FOR_TARGET=$(PICFLAG)" \
f62b28a9
LG
83 "THREAD_KIND=$(THREAD_KIND)" \
84 "TRACE=$(TRACE)" \
7193e639 85 "MULTISUBDIR=$(MULTISUBDIR)" \
f62b28a9 86 "libsubdir=$(libsubdir)" \
7d78d5a6 87 "bindir=$(bindir)" \
80dab182
NN
88 "objext=$(objext)" \
89 "prefix=$(prefix)" \
47ad7893
PB
90 "exeext=.exeext.should.not.be.used " \
91 'CC=the.host.compiler.should.not.be.needed' \
40077270 92 "GCC_FOR_TARGET=$(CC)" \
0cfaf83f 93 "CFLAGS=$(CFLAGS)"
80dab182 94
b0b70d84 95# Rules to build gnatlib.
5f41422f 96.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
80dab182
NN
97gnatlib: @default_gnatlib_target@
98
5f41422f 99gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
5395b47b 100 test -f stamp-libada || \
f62b28a9 101 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
5395b47b 102 && touch stamp-libada
5c00e6a0
LG
103 -rm -rf adainclude
104 -rm -rf adalib
6d63ea75
LG
105 $(LN_S) $(ADA_RTS_DIR) adainclude
106 $(LN_S) $(ADA_RTS_DIR) adalib
80dab182 107
5f41422f 108gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
5395b47b 109 test -f stamp-libada || \
f62b28a9 110 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
5395b47b 111 && touch stamp-libada
5c00e6a0
LG
112 -rm -rf adainclude
113 -rm -rf adalib
6d63ea75
LG
114 $(LN_S) $(ADA_RTS_DIR) adainclude
115 $(LN_S) $(ADA_RTS_DIR) adalib
e9f4e557 116
5f41422f
IS
117osconstool:
118 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
f62b28a9
LG
119
120install-gnatlib: $(GCC_DIR)/ada/Makefile
121 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
c336d2c7 122
b0b70d84
AC
123# Check uninstalled version.
124check:
125
126# Check installed version.
127installcheck:
128
129# Build info (none here).
130info:
131
132# Build DVI (none here).
133dvi:
134
a8384928
BM
135# Build PDF (none here).
136pdf:
137
01a1e85a
JW
138# Build html (none here).
139html:
140
b0b70d84
AC
141# Build TAGS (none here).
142TAGS:
143
455c8f48
RW
144.PHONY: check installcheck info dvi pdf html
145
b0b70d84 146# Installation rules.
7193e639
LG
147install: install-gnatlib
148 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
b0b70d84 149
455c8f48
RW
150install-strip: install
151
b0b70d84
AC
152install-info:
153
00189cc6
BM
154install-pdf:
155
312e3fcb
CD
156install-html:
157
455c8f48
RW
158.PHONY: install install-strip install-info install-pdf install-html
159
b0b70d84
AC
160# Cleaning rules.
161mostlyclean:
7193e639 162 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
b0b70d84
AC
163
164clean:
7193e639 165 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
b0b70d84
AC
166
167distclean:
7193e639 168 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
b0b70d84
AC
169 $(RM) Makefile config.status config.log
170
171maintainer-clean:
172
455c8f48
RW
173.PHONY: mostlyclean clean distclean maintainer-clean
174
b0b70d84
AC
175# Rules for rebuilding this Makefile.
176Makefile: $(srcdir)/Makefile.in config.status
177 CONFIG_FILES=$@ ; \
178 CONFIG_HEADERS= ; \
179 $(SHELL) ./config.status
180
181config.status: $(srcdir)/configure
182 $(SHELL) ./config.status --recheck
183
6efbd53f
RW
184AUTOCONF = autoconf
185configure_deps = \
186 $(srcdir)/configure.ac \
187 $(srcdir)/../config/acx.m4 \
188 $(srcdir)/../config/override.m4 \
189 $(srcdir)/../config/multi.m4
190
191$(srcdir)/configure: @MAINT@ $(configure_deps)
192 cd $(srcdir) && $(AUTOCONF)
54b2f310
DJ
193
194# Don't export variables to the environment, in order to not confuse
195# configure.
196.NOEXPORT: