* javax/swing/JToggleButton.java (ToggleButtonModel):
[official-gcc.git] / libada / Makefile.in
blob5af0d5186bc1fa65e2215a3adc2c433daf970d83
1 # Makefile for libada.
2 # Copyright 2003, 2004 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 2 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; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 # Default target; must be first.
19 all: gnatlib gnattools
21 # Standard autoconf-set variables.
22 SHELL = @SHELL@
23 srcdir = @srcdir@
24 build = @build@
25 target = @target@
26 prefix = @prefix@
27 INSTALL = @INSTALL@
28 INSTALL_DATA = @INSTALL_DATA@
29 INSTALL_PROGRAM = @INSTALL_PROGRAM@
31 # Nonstandard autoconf-set variables.
32 enable_shared = @enable_shared@
33 LN_S=@LN_S@
34 target_noncanonical=@target_noncanonical@
36 # Variables for the user (or the top level) to override.
37 objext=.o
38 GNATLIBFLAGS= -W -Wall -gnatpg
39 THREAD_KIND=native
40 TRACE=no
41 GNATLIBLDFLAGS=
42 ADA_FOR_BUILD=
43 ADA_FOR_TARGET=
44 LDFLAGS=
45 STAGE_PREFIX=
47 # The tedious process of getting CFLAGS right.
48 CFLAGS=-g
49 LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
50 GCC_WARN_CFLAGS = $(LOOSE_WARN) $(NOCOMMON_FLAG)
52 ADA_CFLAGS=
53 T_ADA_CFLAGS=
54 # HPPA is literally the only target which sets X_ADA_CFLAGS
55 X_ADA_CFLAGS=@x_ada_cflags@
56 ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
58 # Variables for gnattools.
59 ADAFLAGS= -gnatpg -gnata
60 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
61 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
63 # For finding the GCC build dir, which is used far too much
64 GCC_DIR=../../gcc
65 # Include fragment generated by GCC configure.
66 include $(GCC_DIR)/libada-mk
67 # Variables based on those gleaned from the GCC makefile. :-P
68 libsubdir=$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
70 TARGET_LIBGCC2_CFLAGS=
71 GNATLIBCFLAGS= -g -O2
72 # Get target-specific overrides for TARGET_LIBGCC2_CFLAGS
73 # and possibly GNATLIBCFLAGS. Currently this uses files
74 # in gcc/config. The 'subst' call is used to rerelativize them
75 # from their gcc locations. This is hackery, but there isn't
76 # yet a better way to do this.
77 tmake_file=$(subst /config,/../gcc/config,$(gcc_tmake_file))
78 ifneq ($(tmake_file),)
79 include $(tmake_file)
80 endif
82 # Get possible host-specific override for libsubdir (ick).
83 xmake_file=$(subst /config,/../gcc/config,$(gcc_xmake_file))
84 ifneq ($(xmake_file),)
85 include $(xmake_file)
86 endif
88 FLAGS_TO_PASS = \
89 "MAKEOVERRIDES=" \
90 "LDFLAGS=$(LDFLAGS)" \
91 "LN_S=$(LN_S)" \
92 "SHELL=$(SHELL)" \
93 "exeext=$(exeext)" \
94 "objext=$(objext)" \
95 "prefix=$(prefix)" \
96 "STAGE_PREFIX=$(STAGE_PREFIX)" \
97 "CC=$(cc_set_by_configure)" \
98 "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
100 ADA_FLAGS_TO_PASS = \
101 "ADA_FOR_BUILD=$(ADA_FOR_BUILD)" \
102 "ADA_INCLUDE_DIR=$(ADA_INCLUDE_DIR)" \
103 "ADA_RTL_OBJ_DIR=$(ADA_RTL_OBJ_DIR)" \
104 "ADAFLAGS=$(ADAFLAGS)" \
105 "ADA_FOR_TARGET=$(ADA_FOR_TARGET)" \
106 "INSTALL=$(INSTALL)" \
107 "INSTALL_DATA=$(INSTALL_DATA)" \
108 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
110 ADA_TOOLS_FLAGS_TO_PASS=\
111 "CC=../../xgcc -B../../" \
112 "CFLAGS=$(CFLAGS)" \
113 "exeext=$(exeext)" \
114 "ADAFLAGS=$(ADAFLAGS)" \
115 "ADA_INCLUDES=-I../rts" \
116 "GNATMAKE=../../gnatmake" \
117 "GNATLINK=../../gnatlink" \
118 "GNATBIND=../../gnatbind"
120 fyi:
121 echo $(tmake_file)
123 # Rules to build gnatlib.
124 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-shared
125 gnatlib: @default_gnatlib_target@
127 gnatlib-plain:
128 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
129 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
130 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
131 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
132 THREAD_KIND="$(THREAD_KIND)" \
133 TRACE="$(TRACE)" \
134 gnatlib ; \
136 gnatlib-sjlj:
137 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
138 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
139 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
140 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
141 THREAD_KIND="$(THREAD_KIND)" \
142 TRACE="$(TRACE)" \
143 gnatlib-sjlj ; \
145 gnatlib-shared:
146 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
147 GNATLIBFLAGS="$(GNATLIBFLAGS)" \
148 GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
149 GNATLIBLDFLAGS="$(GNATLIBLDFLAGS)" \
150 TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
151 THREAD_KIND="$(THREAD_KIND)" \
152 TRACE="$(TRACE)" \
153 gnatlib-shared ; \
155 .PHONY: rts-zfp rts-ravenscar
156 rts-zfp:
157 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
158 GNATMAKE=../gnatmake-cross \
159 rts-zfp
161 rts-ravenscar:
162 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
163 GNATMAKE=../gnatmake-cross \
164 rts-ravenscar
166 # Rules to build gnattools.
167 # For cross builds of gnattools,
168 # put the host RTS dir first in the PATH to hide the default runtime
169 # files that are among the sources
170 RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
171 .PHONY: gnattools regnattools
172 gnattools: gnatlib
173 if test $(build) = $(target) ; then \
174 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
175 ADA_INCLUDES="-I- -I../rts" \
176 CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1 ; \
177 $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2 ; \
178 $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3 ; \
179 else \
180 $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
181 ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \
182 GNATMAKE="gnatmake" \
183 GNATBIND="gnatbind" \
184 GNATLINK="gnatlink" \
185 LIBGNAT="" \
186 gnattools1-re gnattools2 gnattools4 ; \
187 $(MAKE) $(FLAGS_TO_PASS) ada.all.cross ; \
190 regnattools:
191 $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
192 $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
193 $(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
195 # It's unclear whether this is even needed, and if so whether it should run
196 # *before* the rest of crossgnattools or *after* it.
197 ada.all.cross:
198 if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
199 mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
201 if [ -f $(GCC_DIR)/gnatbl$(exeext) ] ; then \
202 mv $(GCC_DIR)/gnatbl$(exeext) $(GCC_DIR)/gnatbl-cross$(exeext); \
204 if [ -f $(GCC_DIR)/gnatchop$(exeext) ] ; then \
205 mv $(GCC_DIR)/gnatchop$(exeext) $(GCC_DIR)/gnatchop-cross$(exeext); \
207 if [ -f $(GCC_DIR)/gnat$(exeext) ] ; then \
208 mv $(GCC_DIR)/gnat$(exeext) $(GCC_DIR)/gnat-cross$(exeext); \
210 if [ -f $(GCC_DIR)/gnatkr$(exeext) ] ; then \
211 mv $(GCC_DIR)/gnatkr$(exeext) $(GCC_DIR)/gnatkr-cross$(exeext); \
213 if [ -f $(GCC_DIR)/gnatlink$(exeext) ] ; then \
214 mv $(GCC_DIR)/gnatlink$(exeext) $(GCC_DIR)/gnatlink-cross$(exeext); \
216 if [ -f $(GCC_DIR)/gnatls$(exeext) ] ; then \
217 mv $(GCC_DIR)/gnatls$(exeext) $(GCC_DIR)/gnatls-cross$(exeext); \
219 if [ -f $(GCC_DIR)/gnatmake$(exeext) ] ; then \
220 mv $(GCC_DIR)/gnatmake$(exeext) $(GCC_DIR)/gnatmake-cross$(exeext); \
222 if [ -f $(GCC_DIR)/gnatmem$(exeext) ] ; then \
223 mv $(GCC_DIR)/gnatmem$(exeext) $(GCC_DIR)/gnatmem-cross$(exeext); \
225 if [ -f $(GCC_DIR)/gnatname$(exeext) ] ; then \
226 mv $(GCC_DIR)/gnatname$(exeext) $(GCC_DIR)/gnatname-cross$(exeext); \
228 if [ -f $(GCC_DIR)/gnatprep$(exeext) ] ; then \
229 mv $(GCC_DIR)/gnatprep$(exeext) $(GCC_DIR)/gnatprep-cross$(exeext); \
231 if [ -f $(GCC_DIR)/gnatxref$(exeext) ] ; then \
232 mv $(GCC_DIR)/gnatxref$(exeext) $(GCC_DIR)/gnatxref-cross$(exeext); \
234 if [ -f $(GCC_DIR)/gnatfind$(exeext) ] ; then \
235 mv $(GCC_DIR)/gnatfind$(exeext) $(GCC_DIR)/gnatfind-cross$(exeext); \
237 if [ -f $(GCC_DIR)/gnatclean$(exeext) ] ; then \
238 mv $(GCC_DIR)/gnatclean$(exeext) $(GCC_DIR)/gnatclean-cross$(exeext); \
240 if [ -f $(GCC_DIR)/gnatsym$(exeext) ] ; then \
241 mv $(GCC_DIR)/gnatsym$(exeext) $(GCC_DIR)/gnatsym-cross$(exeext); \
243 if [ -f $(GCC_DIR)/gpr2make$(exeext) ] ; then \
244 mv $(GCC_DIR)/gpr2make$(exeext) $(GCC_DIR)/gpr2make-cross$(exeext); \
246 if [ -f $(GCC_DIR)/gprcmd$(exeext) ] ; then \
247 mv $(GCC_DIR)/gprcmd$(exeext) $(GCC_DIR)/gprcmd-cross$(exeext); \
250 # Check uninstalled version.
251 check:
253 # Check installed version.
254 installcheck:
256 # Build info (none here).
257 info:
259 # Build DVI (none here).
260 dvi:
262 # Build TAGS (none here).
263 TAGS:
265 # Installation rules.
266 install:
268 install-info:
270 # Cleaning rules.
271 mostlyclean:
273 clean:
275 distclean:
276 $(RM) Makefile config.status config.log
278 maintainer-clean:
280 # Rules for rebuilding this Makefile.
281 Makefile: $(srcdir)/Makefile.in config.status
282 CONFIG_FILES=$@ ; \
283 CONFIG_HEADERS= ; \
284 $(SHELL) ./config.status
286 config.status: $(srcdir)/configure
287 $(SHELL) ./config.status --recheck
289 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.in
290 cd $(srcdir) && autoconf