Make GFORTRAN_9 symbol node depend on GFORTRAN_8.
[official-gcc.git] / libada / Makefile.in
blob522b9207326e5eb4c616a333551e98bb59d769eb
1 # Makefile for libada.
2 # Copyright (C) 2003-2019 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.
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.
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.
19 all: libada
20 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
22 .PHONY: all
24 ## Multilib support variables.
25 MULTISRCTOP =
26 MULTIBUILDTOP =
27 MULTIDIRS =
28 MULTISUBDIR =
29 MULTIDO = true
30 MULTICLEAN = true
32 # Standard autoconf-set variables.
33 SHELL = @SHELL@
34 srcdir = @srcdir@
35 libdir = @libdir@
36 build = @build@
37 target = @target@
38 prefix = @prefix@
40 # Nonstandard autoconf-set variables.
41 enable_shared = @enable_shared@
43 LN_S=@LN_S@
44 AWK=@AWK@
46 ifeq (cp -p,$(LN_S))
47 LN_S_RECURSIVE = cp -pR
48 else
49 LN_S_RECURSIVE = $(LN_S)
50 endif
52 # Variables for the user (or the top level) to override.
53 objext=.o
54 THREAD_KIND=native
55 TRACE=no
56 LDFLAGS=
58 # The tedious process of getting CFLAGS right.
59 CFLAGS=-g
60 PICFLAG = @PICFLAG@
61 GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
62 GNATLIBCFLAGS= -g -O2
63 GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
64 -fexceptions -DIN_RTS @have_getipinfo@ @have_capability@
66 host_subdir = @host_subdir@
67 GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
69 target_noncanonical:=@target_noncanonical@
70 version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
71 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
72 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
74 # exeext should not be used because it's the *host* exeext. We're building
75 # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
76 # definitions just in case something slips through the safety net provided
77 # by recursive make invocations in gcc/ada/Makefile.in
78 LIBADA_FLAGS_TO_PASS = \
79 "MAKEOVERRIDES=" \
80 "LDFLAGS=$(LDFLAGS)" \
81 "LN_S=$(LN_S)" \
82 "SHELL=$(SHELL)" \
83 "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
84 "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
85 "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
86 "PICFLAG_FOR_TARGET=$(PICFLAG)" \
87 "THREAD_KIND=$(THREAD_KIND)" \
88 "TRACE=$(TRACE)" \
89 "MULTISUBDIR=$(MULTISUBDIR)" \
90 "libsubdir=$(libsubdir)" \
91 "objext=$(objext)" \
92 "prefix=$(prefix)" \
93 "exeext=.exeext.should.not.be.used " \
94 'CC=the.host.compiler.should.not.be.needed' \
95 "GCC_FOR_TARGET=$(CC)" \
96 "CFLAGS=$(CFLAGS)"
98 .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
100 # Rules to build and install libada.
101 libada: @default_gnatlib_target@
103 gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx: osconstool $(GCC_DIR)/ada/Makefile
104 test -f stamp-libada || \
105 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
106 && touch stamp-libada
107 -rm -rf adainclude
108 -rm -rf adalib
109 $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude
110 $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib
112 osconstool:
113 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
115 install-libada: $(GCC_DIR)/ada/Makefile
116 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
118 # Check uninstalled version.
119 check:
121 # Check installed version.
122 installcheck:
124 # Build info (none here).
125 info:
127 # Build DVI (none here).
128 dvi:
130 # Build PDF (none here).
131 pdf:
133 # Build html (none here).
134 html:
136 # Build TAGS (none here).
137 TAGS:
139 .PHONY: check installcheck info dvi pdf html
141 # Installation rules.
142 install: install-libada
143 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
145 install-strip: install
147 install-info:
149 install-pdf:
151 install-html:
153 .PHONY: install install-strip install-info install-pdf install-html
155 # Cleaning rules.
156 mostlyclean:
157 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
159 clean:
160 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
162 distclean:
163 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
164 $(RM) Makefile config.status config.log
166 maintainer-clean:
168 .PHONY: mostlyclean clean distclean maintainer-clean
170 # Rules for rebuilding this Makefile.
171 Makefile: $(srcdir)/Makefile.in config.status
172 CONFIG_FILES=$@ ; \
173 CONFIG_HEADERS= ; \
174 $(SHELL) ./config.status
176 config.status: $(srcdir)/configure
177 $(SHELL) ./config.status --recheck
179 AUTOCONF = autoconf
180 configure_deps = \
181 $(srcdir)/configure.ac \
182 $(srcdir)/../config/acx.m4 \
183 $(srcdir)/../config/multi.m4 \
184 $(srcdir)/../config/override.m4 \
185 $(srcdir)/../config/picflag.m4 \
186 $(srcdir)/../config/unwind_ipinfo.m4
188 $(srcdir)/configure: @MAINT@ $(configure_deps)
189 cd $(srcdir) && $(AUTOCONF)
191 # Don't export variables to the environment, in order to not confuse
192 # configure.
193 .NOEXPORT: