]> git.ipfire.org Git - thirdparty/gcc.git/blame - libada/Makefile.in
Centralize PICFLAG configuration
[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@
b0b70d84
AC
36build = @build@
37target = @target@
80dab182 38prefix = @prefix@
b0b70d84
AC
39
40# Nonstandard autoconf-set variables.
80dab182 41enable_shared = @enable_shared@
c390c361 42
80dab182 43LN_S=@LN_S@
c390c361 44AWK=@AWK@
80dab182
NN
45
46# Variables for the user (or the top level) to override.
47objext=.o
48GNATLIBFLAGS= -W -Wall -gnatpg
49THREAD_KIND=native
50TRACE=no
80dab182 51LDFLAGS=
80dab182
NN
52
53# The tedious process of getting CFLAGS right.
54CFLAGS=-g
55LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
47ad7893
PB
56GCC_WARN_CFLAGS = $(LOOSE_WARN)
57WARN_CFLAGS = @warn_cflags@
b0b70d84 58
e3aa9eba 59PICFLAG = @PICFLAG@
47ad7893 60GNATLIBCFLAGS= -g -O2
e3aa9eba 61GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(PICFLAG) -fexceptions \
2f18d9af 62 -DIN_RTS @have_getipinfo@
b0b70d84 63
9bd6112c 64host_subdir = @host_subdir@
7193e639 65GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
b0b70d84 66
f62b28a9
LG
67target_noncanonical:=@target_noncanonical@
68version := $(shell cat $(srcdir)/../gcc/BASE-VER)
7193e639 69libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
6d63ea75 70ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
f62b28a9 71
47ad7893
PB
72# exeext should not be used because it's the *host* exeext. We're building
73# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
74# definitions just in case something slips through the safety net provided
75# by recursive make invocations in gcc/ada/Makefile.in
f62b28a9 76LIBADA_FLAGS_TO_PASS = \
80dab182
NN
77 "MAKEOVERRIDES=" \
78 "LDFLAGS=$(LDFLAGS)" \
79 "LN_S=$(LN_S)" \
80 "SHELL=$(SHELL)" \
7193e639
LG
81 "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
82 "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
2f18d9af 83 "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
e3aa9eba 84 "PICFLAG_FOR_TARGET=$(PICFLAG)" \
f62b28a9
LG
85 "THREAD_KIND=$(THREAD_KIND)" \
86 "TRACE=$(TRACE)" \
7193e639 87 "MULTISUBDIR=$(MULTISUBDIR)" \
f62b28a9 88 "libsubdir=$(libsubdir)" \
80dab182
NN
89 "objext=$(objext)" \
90 "prefix=$(prefix)" \
47ad7893
PB
91 "exeext=.exeext.should.not.be.used " \
92 'CC=the.host.compiler.should.not.be.needed' \
40077270 93 "GCC_FOR_TARGET=$(CC)" \
80dab182
NN
94 "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
95
b0b70d84 96# Rules to build gnatlib.
c336d2c7 97.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
80dab182
NN
98gnatlib: @default_gnatlib_target@
99
c336d2c7 100gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile
5395b47b 101 test -f stamp-libada || \
f62b28a9 102 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
5395b47b 103 && touch stamp-libada
5c00e6a0
LG
104 -rm -rf adainclude
105 -rm -rf adalib
6d63ea75
LG
106 $(LN_S) $(ADA_RTS_DIR) adainclude
107 $(LN_S) $(ADA_RTS_DIR) adalib
80dab182 108
c336d2c7 109gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
5395b47b 110 test -f stamp-libada || \
f62b28a9 111 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
5395b47b 112 && touch stamp-libada
5c00e6a0
LG
113 -rm -rf adainclude
114 -rm -rf adalib
6d63ea75
LG
115 $(LN_S) $(ADA_RTS_DIR) adainclude
116 $(LN_S) $(ADA_RTS_DIR) adalib
e9f4e557 117
c336d2c7 118oscons:
f62b28a9
LG
119 $(MAKE) -C $(GCC_DIR) $(LIBADA_FLAGS_TO_PASS) ada/s-oscons.ads
120
121install-gnatlib: $(GCC_DIR)/ada/Makefile
122 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
c336d2c7 123
b0b70d84
AC
124# Check uninstalled version.
125check:
126
127# Check installed version.
128installcheck:
129
130# Build info (none here).
131info:
132
133# Build DVI (none here).
134dvi:
135
a8384928
BM
136# Build PDF (none here).
137pdf:
138
01a1e85a
JW
139# Build html (none here).
140html:
141
b0b70d84
AC
142# Build TAGS (none here).
143TAGS:
144
455c8f48
RW
145.PHONY: check installcheck info dvi pdf html
146
b0b70d84 147# Installation rules.
7193e639
LG
148install: install-gnatlib
149 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
b0b70d84 150
455c8f48
RW
151install-strip: install
152
b0b70d84
AC
153install-info:
154
00189cc6
BM
155install-pdf:
156
312e3fcb
CD
157install-html:
158
455c8f48
RW
159.PHONY: install install-strip install-info install-pdf install-html
160
b0b70d84
AC
161# Cleaning rules.
162mostlyclean:
7193e639 163 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
b0b70d84
AC
164
165clean:
7193e639 166 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
b0b70d84
AC
167
168distclean:
7193e639 169 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
b0b70d84
AC
170 $(RM) Makefile config.status config.log
171
172maintainer-clean:
173
455c8f48
RW
174.PHONY: mostlyclean clean distclean maintainer-clean
175
b0b70d84
AC
176# Rules for rebuilding this Makefile.
177Makefile: $(srcdir)/Makefile.in config.status
178 CONFIG_FILES=$@ ; \
179 CONFIG_HEADERS= ; \
180 $(SHELL) ./config.status
181
182config.status: $(srcdir)/configure
183 $(SHELL) ./config.status --recheck
184
6efbd53f
RW
185AUTOCONF = autoconf
186configure_deps = \
187 $(srcdir)/configure.ac \
188 $(srcdir)/../config/acx.m4 \
189 $(srcdir)/../config/override.m4 \
190 $(srcdir)/../config/multi.m4
191
192$(srcdir)/configure: @MAINT@ $(configure_deps)
193 cd $(srcdir) && $(AUTOCONF)
54b2f310
DJ
194
195# Don't export variables to the environment, in order to not confuse
196# configure.
197.NOEXPORT: