* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Simplify test for
[official-gcc.git] / libada / Makefile.in
blobeec1649f9e112bb8c6c665ac0fc686ed477ab9ce
1 # Makefile for libada.
2 # Copyright 2003, 2004, 2009 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: gnatlib
20 $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
22 .PHONY: all install
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 # Variables for the user (or the top level) to override.
47 objext=.o
48 GNATLIBFLAGS= -W -Wall -gnatpg
49 THREAD_KIND=native
50 TRACE=no
51 LDFLAGS=
53 # The tedious process of getting CFLAGS right.
54 CFLAGS=-g
55 LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
56 GCC_WARN_CFLAGS = $(LOOSE_WARN)
57 WARN_CFLAGS = @warn_cflags@
59 TARGET_LIBGCC2_CFLAGS=
60 GNATLIBCFLAGS= -g -O2
62 # Get target-specific overrides for TARGET_LIBGCC2_CFLAGS.
63 host_subdir = @host_subdir@
64 GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
65 include $(GCC_DIR)/libgcc.mvars
67 target_noncanonical:=@target_noncanonical@
68 version := $(shell cat $(srcdir)/../gcc/BASE-VER)
69 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
70 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
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
76 LIBADA_FLAGS_TO_PASS = \
77 "MAKEOVERRIDES=" \
78 "LDFLAGS=$(LDFLAGS)" \
79 "LN_S=$(LN_S)" \
80 "SHELL=$(SHELL)" \
81 "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
82 "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
83 "TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \
84 "THREAD_KIND=$(THREAD_KIND)" \
85 "TRACE=$(TRACE)" \
86 "MULTISUBDIR=$(MULTISUBDIR)" \
87 "libsubdir=$(libsubdir)" \
88 "objext=$(objext)" \
89 "prefix=$(prefix)" \
90 "exeext=.exeext.should.not.be.used " \
91 'CC=the.host.compiler.should.not.be.needed' \
92 "GCC_FOR_TARGET=$(CC)" \
93 "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
95 # Rules to build gnatlib.
96 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
97 gnatlib: @default_gnatlib_target@
99 gnatlib-plain: oscons $(GCC_DIR)/ada/Makefile
100 test -f stamp-libada || \
101 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
102 && touch stamp-libada
103 -rm -rf adainclude
104 -rm -rf adalib
105 $(LN_S) $(ADA_RTS_DIR) adainclude
106 $(LN_S) $(ADA_RTS_DIR) adalib
108 gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
109 test -f stamp-libada || \
110 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
111 && touch stamp-libada
112 -rm -rf adainclude
113 -rm -rf adalib
114 $(LN_S) $(ADA_RTS_DIR) adainclude
115 $(LN_S) $(ADA_RTS_DIR) adalib
117 oscons:
118 $(MAKE) -C $(GCC_DIR) $(LIBADA_FLAGS_TO_PASS) ada/s-oscons.ads
120 install-gnatlib: $(GCC_DIR)/ada/Makefile
121 $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
123 # Check uninstalled version.
124 check:
126 # Check installed version.
127 installcheck:
129 # Build info (none here).
130 info:
132 # Build DVI (none here).
133 dvi:
135 # Build PDF (none here).
136 pdf:
138 # Build html (none here).
139 html:
141 # Build TAGS (none here).
142 TAGS:
144 # Installation rules.
145 install: install-gnatlib
146 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
148 install-info:
150 install-pdf:
152 install-html:
154 # Cleaning rules.
155 mostlyclean:
156 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
158 clean:
159 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
161 distclean:
162 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
163 $(RM) Makefile config.status config.log
165 maintainer-clean:
167 # Rules for rebuilding this Makefile.
168 Makefile: $(srcdir)/Makefile.in config.status
169 CONFIG_FILES=$@ ; \
170 CONFIG_HEADERS= ; \
171 $(SHELL) ./config.status
173 config.status: $(srcdir)/configure
174 $(SHELL) ./config.status --recheck
176 AUTOCONF = autoconf
177 configure_deps = \
178 $(srcdir)/configure.ac \
179 $(srcdir)/../config/acx.m4 \
180 $(srcdir)/../config/override.m4 \
181 $(srcdir)/../config/multi.m4
183 $(srcdir)/configure: @MAINT@ $(configure_deps)
184 cd $(srcdir) && $(AUTOCONF)
186 # Don't export variables to the environment, in order to not confuse
187 # configure.
188 .NOEXPORT: