OSDN Git Service

Merge remote-tracking branch 'gnu/gcc-4_6-branch' into rework
[pf3gnuchains/gcc-fork.git] / libada / Makefile.in
1 # Makefile for libada.
2 #   Copyright 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
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
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.
13
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/>.
17
18 # Default target; must be first.
19 all: gnatlib
20         $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
21
22 .PHONY: all
23
24 ## Multilib support variables.
25 MULTISRCTOP =
26 MULTIBUILDTOP =
27 MULTIDIRS =
28 MULTISUBDIR =
29 MULTIDO = true
30 MULTICLEAN = true
31
32 # Standard autoconf-set variables.
33 SHELL = @SHELL@
34 srcdir = @srcdir@
35 libdir = @libdir@
36 build = @build@
37 target = @target@
38 prefix = @prefix@
39
40 # Nonstandard autoconf-set variables.
41 enable_shared = @enable_shared@
42
43 LN_S=@LN_S@
44 AWK=@AWK@
45
46 ifeq (cp -p,$(LN_S))
47 LN_S_RECURSIVE = cp -pR
48 else
49 LN_S_RECURSIVE = $(LN_S)
50 endif
51
52 # Variables for the user (or the top level) to override.
53 objext=.o
54 GNATLIBFLAGS= -W -Wall -gnatpg
55 THREAD_KIND=native
56 TRACE=no
57 LDFLAGS=
58
59 # The tedious process of getting CFLAGS right.
60 CFLAGS=-g
61 LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
62 GCC_WARN_CFLAGS = $(LOOSE_WARN)
63 WARN_CFLAGS = @warn_cflags@
64
65 TARGET_LIBGCC2_CFLAGS=
66 GNATLIBCFLAGS= -g -O2
67 GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
68         -DIN_RTS @have_getipinfo@
69
70 # Get target-specific overrides for TARGET_LIBGCC2_CFLAGS.
71 host_subdir = @host_subdir@
72 GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
73 include $(GCC_DIR)/libgcc.mvars
74
75 target_noncanonical:=@target_noncanonical@
76 version := $(shell cat $(srcdir)/../gcc/BASE-VER)
77 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
78 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
79 ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
80
81 # exeext should not be used because it's the *host* exeext.  We're building
82 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
83 # definitions just in case something slips through the safety net provided
84 # by recursive make invocations in gcc/ada/Makefile.in
85 LIBADA_FLAGS_TO_PASS = \
86         "MAKEOVERRIDES=" \
87         "LDFLAGS=$(LDFLAGS)" \
88         "LN_S=$(LN_S)" \
89         "SHELL=$(SHELL)" \
90         "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
91         "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
92         "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
93         "TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \
94         "THREAD_KIND=$(THREAD_KIND)" \
95         "TRACE=$(TRACE)" \
96         "MULTISUBDIR=$(MULTISUBDIR)" \
97         "libsubdir=$(libsubdir)" \
98         "objext=$(objext)" \
99         "prefix=$(prefix)" \
100         "exeext=.exeext.should.not.be.used " \
101         'CC=the.host.compiler.should.not.be.needed' \
102         "GCC_FOR_TARGET=$(CC)" \
103         "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
104
105 # Rules to build gnatlib.
106 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
107 gnatlib: @default_gnatlib_target@
108
109 gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
110         test -f stamp-libada || \
111         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
112         && touch stamp-libada
113         -rm -rf adainclude
114         -rm -rf adalib
115         $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude
116         $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib
117
118 gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
119         test -f stamp-libada || \
120         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
121         && touch stamp-libada
122         -rm -rf adainclude
123         -rm -rf adalib
124         $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude
125         $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib
126
127 osconstool:
128         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
129
130 install-gnatlib: $(GCC_DIR)/ada/Makefile
131         $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
132
133 # Check uninstalled version.
134 check:
135
136 # Check installed version.
137 installcheck:
138
139 # Build info (none here).
140 info:
141
142 # Build DVI (none here).
143 dvi:
144
145 # Build PDF (none here).
146 pdf:
147
148 # Build html (none here).
149 html:
150
151 # Build TAGS (none here).
152 TAGS:
153
154 .PHONY: check installcheck info dvi pdf html
155
156 # Installation rules.
157 install: install-gnatlib
158         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
159
160 install-strip: install
161
162 install-info:
163
164 install-pdf:
165
166 install-html:
167
168 .PHONY: install install-strip install-info install-pdf install-html
169
170 # Cleaning rules.
171 mostlyclean:
172         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
173
174 clean:
175         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
176
177 distclean:
178         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
179         $(RM) Makefile config.status config.log
180
181 maintainer-clean:
182
183 .PHONY: mostlyclean clean distclean maintainer-clean
184
185 # Rules for rebuilding this Makefile.
186 Makefile: $(srcdir)/Makefile.in config.status
187         CONFIG_FILES=$@ ; \
188         CONFIG_HEADERS= ; \
189         $(SHELL) ./config.status
190
191 config.status: $(srcdir)/configure
192         $(SHELL) ./config.status --recheck
193
194 AUTOCONF = autoconf
195 configure_deps = \
196         $(srcdir)/configure.ac \
197         $(srcdir)/../config/acx.m4 \
198         $(srcdir)/../config/override.m4 \
199         $(srcdir)/../config/multi.m4
200
201 $(srcdir)/configure: @MAINT@ $(configure_deps)
202         cd $(srcdir) && $(AUTOCONF)
203
204 # Don't export variables to the environment, in order to not confuse
205 # configure.
206 .NOEXPORT: