1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2024 Free Software Foundation, Inc.
4 #This file is part of GCC.
6 #GCC is free software; you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation; either version 3, or (at your option)
11 #GCC is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GCC; see the file COPYING3. If not see
18 #<http://www.gnu.org/licenses/>.
20 # The makefile built from this file lives in the language subdirectory.
21 # Its purpose is to provide support for:
23 # 1) recursion where necessary, and only then (building .o's), and
24 # 2) building and debugging cc1 from the language subdirectory, and
27 # The parent makefile handles all other chores, with help from the
28 # language makefile fragment, of course.
30 # The targets for external use are:
31 # all, TAGS, ???mostlyclean, ???clean.
33 # This makefile will only work with Gnu make.
34 # The rules are written assuming a minimum subset of tools are available:
37 # MAKE: Only Gnu make will work.
38 # MV: Must accept (at least) one, maybe wildcard, source argument,
39 # a file or directory destination, and support creation/
40 # modification date preservation. Gnu mv -f works.
41 # RM: Must accept an arbitrary number of space separated file
42 # arguments, or one wildcard argument. Gnu rm works.
43 # RMDIR: Must delete a directory and all its contents. Gnu rm -rf works.
44 # ECHO: Must support command line redirection. Any Unix-like
45 # shell will typically provide this, otherwise a custom version
46 # is trivial to write.
48 # MKDIR: Gnu mkdir works.
49 # CHMOD: Gnu chmod works.
50 # true: Does nothing and returns a normal successful return code.
51 # pwd: Prints the current directory on stdout.
52 # cd: Change directory.
55 # BISON: Gnu bison works.
56 # FLEX: Gnu flex works.
57 # Other miscellaneous tools for obscure targets.
59 # Suppress smart makes who think they know how to automake Yacc files
62 # Variables that exist for you to override.
63 # See below for how to change them for certain systems.
65 # Various ways of specifying flags for compilations:
66 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
67 # BOOT_CFLAGS is the value of CFLAGS to pass
68 # to the stage2 and stage3 compilations
70 BOOT_CFLAGS
= -O
$(CFLAGS
)
71 # These exists to be overridden by the t-* files, respectively.
92 RANLIB_FLAGS
= @ranlib_flags@
97 COMPILER_FLAGS
= $(CFLAGS
)
100 PWD_COMMAND
= $${PWDCMD-pwd
}
101 # How to copy preserving the date
102 INSTALL_DATA_DATE
= cp
-p
106 GNATBIND_FLAGS
= -static
-x
108 ADAFLAGS
= -W
-Wall
-gnatpg
-gnata
-gnatU
109 FORCE_DEBUG_ADAFLAGS
= -g
110 NO_INLINE_ADAFLAGS
= -fno-inline
111 NO_OMIT_ADAFLAGS
= -fno-omit-frame-pointer
112 NO_SIBLING_ADAFLAGS
= -fno-optimize-sibling-calls
113 NO_REORDER_ADAFLAGS
= -fno-toplevel-reorder
114 GNATLIBFLAGS
= -W
-Wall
-gnatg
-nostdinc
115 GNATLIBCFLAGS
= -g
-O2
116 # Pretend that _Unwind_GetIPInfo is available for the target by default. This
117 # should be autodetected during the configuration of libada and passed down to
118 # here, but we need something for --disable-libada and hope for the best.
119 GNATLIBCFLAGS_FOR_C
= \
120 -W
-Wall
$(GNATLIBCFLAGS
) -fexceptions
-DIN_RTS
-DHAVE_GETIPINFO
121 PICFLAG_FOR_TARGET
= @PICFLAG_FOR_TARGET@
122 ALL_ADAFLAGS
= $(CFLAGS
) $(ADA_CFLAGS
) $(ADAFLAGS
)
127 OUTPUT_OPTION
= -o
$@
136 # program_transform_name and objdir are set by configure.ac.
137 program_transform_name
=
140 target_alias
=@target_alias@
142 target_noncanonical
=@target_noncanonical@
143 target_cpu
=@target_cpu@
144 target_vendor
=@target_vendor@
145 target_os
=@target_os@
147 host_vendor
=@host_vendor@
149 target_cpu_default
= @target_cpu_default@
150 xmake_file
= @xmake_file@
151 tmake_file
= @tmake_file@
152 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
153 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
155 # Directory where sources are, from where we are.
156 VPATH
= $(srcdir)/ada
158 # Full path to top source directory
159 # In particular this is used to access libgcc headers, so that references to
160 # these headers from GNAT runtime objects have path names in debugging info
161 # that are consistent with libgcc objects. Also used for other references to
162 # the top source directory for consistency.
163 ftop_srcdir
:= $(shell cd
$(srcdir)/..
;${PWD_COMMAND})
165 fsrcdir
:= $(shell cd
$(srcdir);${PWD_COMMAND})
166 fsrcpfx
:= $(shell cd
$(srcdir);${PWD_COMMAND})/
167 fcurdir
:= $(shell ${PWD_COMMAND})
168 fcurpfx
:= $(shell ${PWD_COMMAND})/
170 # Top build directory, relative to here.
173 # Internationalization library.
175 LIBINTL_DEP
= @LIBINTL_DEP@
177 # Character encoding conversion library.
178 LIBICONV
= @LIBICONV@
179 LIBICONV_DEP
= @LIBICONV_DEP@
181 # Any system libraries needed just for GNAT.
182 SYSLIBS
= @GNAT_LIBEXC@
184 # List extra gnattools
187 # List of target dependent sources, overridden below as necessary
190 # Type of tools build we are doing; default is not compiling tools.
193 # main GNAT source directory
194 GNAT_SRC
=$(fsrcpfx
)ada
198 RTSDIR
= rts
$(subst /,_
,$(MULTISUBDIR
))
200 # Link flags used to build gnat tools. By default we prefer to statically
201 # link with libgcc to avoid a dependency on shared libgcc (which is tricky
202 # to deal with as it may conflict with the libgcc provided by the system).
203 GCC_LINK_FLAGS
=-static-libstdc
++ -static-libgcc
205 # End of variables for you to override.
209 # This tells GNU Make version 3 not to put all variables in the environment.
213 ifneq ($(tmake_file
),)
214 include $(tmake_file
)
218 ifneq ($(xmake_file
),)
219 include $(xmake_file
)
222 # Now figure out from those variables how to compile and link.
224 all.indirect
: Makefile ..
/gnat1
$(exeext
)
226 # IN_GCC is meant to distinguish between code compiled into GCC itself, i.e.
227 # for the host, and the rest. But we also use it for the tools (link.c) and
228 # even break the host/target wall by using it for the library (targext.c).
229 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
230 # compiler which does not use the native libraries and headers.
231 INTERNAL_CFLAGS
= @CROSS@
-DIN_GCC
233 # This is the variable actually used when we compile.
234 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
)
237 ALL_CPPFLAGS
= $(CPPFLAGS
)
239 # Used with $(COMPILER).
240 ALL_COMPILERFLAGS
= $(ALL_CFLAGS
)
242 # This is where we get libiberty.a from.
243 ifneq ($(findstring $(PICFLAG
),-fPIC
-fPIE
),)
244 LIBIBERTY
= ..
/..
/libiberty
/pic
/libiberty.a
246 LIBIBERTY
= ..
/..
/libiberty
/libiberty.a
249 # We need to link against libbacktrace because diagnostic.c in
250 # libcommon.a uses it.
251 LIBBACKTRACE
= ..
/..
/libbacktrace
/.libs
/libbacktrace.a
253 # How to link with both our special library facilities
254 # and the system's installed libraries.
255 LIBS
= $(LIBINTL
) $(LIBICONV
) $(LIBBACKTRACE
) $(LIBIBERTY
) $(SYSLIBS
)
256 LIBDEPS
= $(LIBINTL_DEP
) $(LIBICONV_DEP
) $(LIBBACKTRACE
) $(LIBIBERTY
)
257 # Default is no TGT_LIB; one might be passed down or something
259 TOOLS_LIBS
= ..
/version.o ..
/link.o ..
/targext.o ..
/..
/ggc-none.o \
260 ..
/..
/libcommon-target.a ..
/..
/libcommon.a ..
/..
/..
/libcpp
/libcpp.a \
261 $(LIBGNAT
) $(LIBINTL
) $(LIBICONV
) ..
/$(LIBBACKTRACE
) ..
/$(LIBIBERTY
) \
262 $(SYSLIBS
) $(TGT_LIB
)
264 # Add -no-pie to TOOLS_LIBS since some of them are compiled with -fno-PIE.
265 TOOLS_LIBS
+= @LD_PICFLAG@
267 # Specify the directories to be searched for header files.
268 # Both . and srcdir are used, in that order,
269 # so that tm.h and config.h will be found in the compilation
270 # subdirectory rather than in the source directory.
271 INCLUDES
= -iquote .
-iquote ..
-iquote
$(srcdir)/ada
-iquote
$(srcdir) \
272 -I
$(ftop_srcdir
)/include $(GMPINC
)
274 ADA_INCLUDES
= -I-
-I.
-I
$(srcdir)/ada
276 # Likewise, but valid for subdirectories of the current dir.
277 # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
278 # that directory conflicts with a system header file.
279 ifneq ($(findstring vxworks
,$(target_os
)),)
280 INCLUDES_FOR_SUBDIR
= -iquote .
-iquote ..
-iquote ..
/.. \
281 -iquote
$(fsrcdir
)/ada \
282 -I
$(ftop_srcdir
)/include $(GMPINC
)
284 INCLUDES_FOR_SUBDIR
= -iquote .
-iquote ..
-iquote ..
/.. \
285 -iquote
$(fsrcdir
)/ada
-iquote
$(fsrcdir
) \
286 -I
$(ftop_srcdir
)/include $(GMPINC
)
289 ADA_INCLUDES_FOR_SUBDIR
= -I.
-I
$(fsrcdir
)/ada
291 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
294 # Say how to compile Ada programs.
295 .SUFFIXES
: .ada .adb .ads .asm
297 # Always use -I$(srcdir)/config when compiling.
299 $(CC
) -c
-x assembler
$< $(OUTPUT_OPTION
)
302 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) $(ALL_CPPFLAGS
) \
303 $(INCLUDES
) $< $(OUTPUT_OPTION
)
306 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) $< $(OUTPUT_OPTION
)
309 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) $< $(OUTPUT_OPTION
)
311 # how to regenerate this file
312 Makefile
: ..
/config.status
$(srcdir)/ada
/gcc-interface
/Makefile.in
$(srcdir)/ada
/Makefile.in
$(srcdir)/ada
/version.c
314 LANGUAGES
="$(CONFIG_LANGUAGES)" \
316 CONFIG_FILES
="ada/gcc-interface/Makefile ada/Makefile" $(SHELL
) config.status
318 # This tells GNU make version 3 not to export all the variables
319 # defined in this file into the environment.
322 # Lists of files for various purposes.
324 GNATLINK_OBJS
= gnatlink.o \
325 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
326 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
327 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
328 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o \
329 types.o validsw.o widechar.o
331 GNATMAKE_OBJS
= a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
332 atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o \
333 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
334 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
335 make.o makeusg.o make_util.o namet.o nlists.o opt.o osint.o osint-m.o \
336 output.o restrict.o rident.o s-exctab.o \
337 s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o \
338 s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \
339 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \
340 switch.o switch-m.o table.o targparm.o tempdir.o types.o uintp.o \
341 uname.o urealp.o usage.o widechar.o warnsw.o \
342 seinfo.o einfo-entities.o einfo-utils.o sinfo-nodes.o sinfo-utils.o \
343 $(EXTRA_GNATMAKE_OBJS
)
345 # Make arch match the current multilib so that the RTS selection code
346 # picks up the right files. For a given target this must be coherent
347 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
349 ifeq ($(strip $(filter-out x86_64
, $(target_cpu
))),)
350 ifeq ($(strip $(MULTISUBDIR
)),/32)
353 ifeq ($(strip $(MULTISUBDIR
)),/x32
)
359 # The x86_64-linux-gnux32 compiler is actually an x32 compiler
360 ifeq ($(strip $(filter-out x86_64 linux-gnux32
%, $(target_cpu
) $(target_os
))),)
361 ifneq ($(strip $(MULTISUBDIR
)),/64)
366 # The SuSE PowerPC64/Linux compiler is actually a 32-bit PowerPC compiler
367 ifeq ($(strip $(filter-out powerpc64 suse linux
%, $(target_cpu
) $(target_vendor
) $(target_os
))),)
371 # Configuration of host tools
373 # Under linux, host tools need to be linked with -ldl
375 ifeq ($(strip $(filter-out linux
%,$(host_os
))),)
379 include $(fsrcdir
)/ada
/Makefile.rtl
381 LIBGNAT
=..
/$(RTSDIR
)/libgnat.a
383 TOOLS_FLAGS_TO_PASS
= \
386 "LDFLAGS=$(LDFLAGS)" \
387 "ADAFLAGS=$(ADAFLAGS)" \
388 "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
389 "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
390 "libsubdir=$(libsubdir)" \
392 "fsrcdir=$(fsrcdir)" \
393 "srcdir=$(fsrcdir)" \
394 "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \
395 "GNATMAKE=$(GNATMAKE)" \
396 "GNATLINK=$(GNATLINK)" \
397 "GNATBIND=$(GNATBIND)"
399 GCC_LINK
=$(CXX
) $(GCC_LINK_FLAGS
) $(LDFLAGS
)
401 # Build directory for the tools. We first need to copy the generated files,
402 # then the target-dependent sources using the same mechanism as for gnatlib.
403 # The other sources are accessed using the vpath directive below
405 GENERATED_FILES_FOR_TOOLS
= \
406 einfo-entities.ads einfo-entities.adb sdefault.adb seinfo.ads \
407 sinfo-nodes.ads sinfo-nodes.adb snames.ads snames.adb
413 -(cd tools
; $(foreach FILE
,$(GENERATED_FILES_FOR_TOOLS
), \
414 $(LN_S
) ..
/$(FILE
) $(FILE
);))
415 -$(foreach PAIR
,$(TOOLS_TARGET_PAIRS
), \
416 $(RM
) tools
/$(word 1,$(subst <, ,$(PAIR
)));\
417 $(LN_S
) $(fsrcpfx
)ada
/$(word 2,$(subst <, ,$(PAIR
))) \
418 tools
/$(word 1,$(subst <, ,$(PAIR
)));)
421 # when compiling the tools, the runtime has to be first on the path so that
422 # it hides the runtime files lying with the rest of the sources
423 ifeq ($(TOOLSCASE
),native
)
424 vpath
%.ads ..
/$(RTSDIR
) ..
/
425 vpath
%.adb ..
/$(RTSDIR
) ..
/
426 vpath
%.c ..
/$(RTSDIR
) ..
/
427 vpath
%.h ..
/$(RTSDIR
) ..
/
430 # in the cross tools case, everything is compiled with the native
431 # gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
432 ifeq ($(TOOLSCASE
),cross
)
439 # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
440 # reasons: gnatmake should be built with a recent compiler, a recent compiler
441 # may not generate ALI files compatible with an old gnatmake so it is important
442 # to be able to build gnatmake without a version of gnatmake around. Once
443 # everything has been compiled once, gnatmake can be recompiled with itself
444 # (see target gnattools1-re)
445 gnattools1
: ..
/stamp-tools ..
/stamp-gnatlib-
$(RTSDIR
)
446 $(MAKE
) -C tools
-f ..
/Makefile
$(TOOLS_FLAGS_TO_PASS
) \
448 ..
/..
/gnatmake
$(exeext
) ..
/..
/gnatlink
$(exeext
)
450 # gnatmake/link can be built with recent gnatmake/link if they are available.
451 # This is especially convenient for building cross tools or for rebuilding
452 # the tools when the original bootstrap has already be done.
453 gnattools1-re
: ..
/stamp-tools
454 $(MAKE
) -C tools
-f ..
/Makefile
$(TOOLS_FLAGS_TO_PASS
) \
455 TOOLSCASE
=cross INCLUDES
="" gnatmake-re gnatlink-re
457 # these tools are built with gnatmake & are common to native and cross
458 gnattools2
: ..
/stamp-tools
459 $(MAKE
) -C tools
-f ..
/Makefile
$(TOOLS_FLAGS_TO_PASS
) \
460 TOOLSCASE
=native common-tools
$(EXTRA_GNATTOOLS
)
462 common-tools
: ..
/stamp-tools
463 $(GNATMAKE
) -j0
-c
-b
$(ADA_INCLUDES
) \
464 --GNATBIND
="$(GNATBIND)" --GCC
="$(CC) $(ALL_ADAFLAGS)" \
465 gnatchop gnatcmd gnatkr gnatls gnatprep gnatname \
466 gnatclean
-bargs
$(ADA_INCLUDES
) $(GNATBIND_FLAGS
)
467 $(GNATLINK
) -v gnatcmd
-o ..
/..
/gnat
$(exeext
) \
468 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
469 $(GNATLINK
) -v gnatchop
-o ..
/..
/gnatchop
$(exeext
) \
470 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
471 $(GNATLINK
) -v gnatkr
-o ..
/..
/gnatkr
$(exeext
) \
472 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
473 $(GNATLINK
) -v gnatls
-o ..
/..
/gnatls
$(exeext
) \
474 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
475 $(GNATLINK
) -v gnatprep
-o ..
/..
/gnatprep
$(exeext
) \
476 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
477 $(GNATLINK
) -v gnatname
-o ..
/..
/gnatname
$(exeext
) \
478 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
479 $(GNATLINK
) -v gnatclean
-o ..
/..
/gnatclean
$(exeext
) \
480 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
482 ..
/..
/gnatdll
$(exeext
): ..
/stamp-tools
483 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatdll
--GCC
="$(CC) $(ALL_ADAFLAGS)"
484 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatdll
485 $(GNATLINK
) -v gnatdll
-o
$@ \
486 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
488 gnatmake-re
: ..
/stamp-tools
489 $(GNATMAKE
) -j0
$(ADA_INCLUDES
) -u sdefault
--GCC
="$(CC) $(MOST_ADA_FLAGS)"
490 $(GNATMAKE
) -j0
-c
$(ADA_INCLUDES
) gnatmake
--GCC
="$(CC) $(ALL_ADAFLAGS)"
491 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatmake
492 $(GNATLINK
) -v gnatmake
-o ..
/..
/gnatmake
$(exeext
) \
493 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
495 # Note the use of the "mv" command in order to allow gnatlink to be linked with
496 # with the former version of gnatlink itself which cannot override itself.
497 # gnatlink-re cannot be run at the same time as gnatmake-re, hence the
499 gnatlink-re
: ..
/stamp-tools gnatmake-re
500 $(GNATMAKE
) -j0
-c
$(ADA_INCLUDES
) gnatlink
--GCC
="$(CC) $(ALL_ADAFLAGS)"
501 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatlink
502 $(GNATLINK
) -v gnatlink
-o ..
/..
/gnatlinknew
$(exeext
) \
503 --GCC
="$(CC) $(ADA_INCLUDES)" --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
504 $(MV
) ..
/..
/gnatlinknew
$(exeext
) ..
/..
/gnatlink
$(exeext
)
506 # Needs to be built with CC=gcc
507 # Since the RTL should be built with the latest compiler, remove the
508 # stamp target in the parent directory whenever gnat1 is rebuilt
510 # Likewise for the tools
511 ..
/..
/gnatmake
$(exeext
): b_gnatm.o
$(GNATMAKE_OBJS
)
512 +$(GCC_LINK
) $(ALL_CFLAGS
) -o
$@ b_gnatm.o
$(GNATMAKE_OBJS
) $(TOOLS_LIBS
) $(TOOLS1_LIBS
)
514 ..
/..
/gnatlink
$(exeext
): b_gnatl.o
$(GNATLINK_OBJS
)
515 +$(GCC_LINK
) $(ALL_CFLAGS
) -o
$@ b_gnatl.o
$(GNATLINK_OBJS
) $(TOOLS_LIBS
) $(TOOLS1_LIBS
)
517 ..
/stamp-gnatlib-
$(RTSDIR
):
518 @if
[ ! -f stamp-gnatlib-
$(RTSDIR
) ] ; \
520 $(ECHO
) You must first build the GNAT library
: make gnatlib
; \
527 # Install all the requested GCC spec files.
529 $(foreach f
,$(GCC_SPEC_FILES
), \
530 $(INSTALL_DATA_DATE
) $(srcdir)/ada
/$(f
) $(DESTDIR
)$(libsubdir
)/;)
532 install-gnatlib
: ..
/stamp-gnatlib-
$(RTSDIR
) install-gcc-specs
533 $(RMDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
534 $(RMDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
535 -$(MKDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
536 -$(MKDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
537 for file in
$(RTSDIR
)/*.ali
; do \
538 $(INSTALL_DATA_DATE
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
540 $(INSTALL_DATA_DATE
) $(RTSDIR
)/ada_target_properties \
541 $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)/..
/
542 -cd
$(RTSDIR
); for file in
*$(arext
);do \
543 $(INSTALL_DATA
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
544 $(RANLIB_FOR_TARGET
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)/$$file; \
546 -$(foreach file
, $(EXTRA_ADALIB_OBJS
), \
547 $(INSTALL_DATA_DATE
) $(RTSDIR
)/$(file
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
) && \
549 # Install the shared libraries, if any, using $(INSTALL) instead
550 # of $(INSTALL_DATA). The latter may force a mode inappropriate
551 # for shared libraries on some targets, e.g. on HP-UX where the x
552 # permission is required.
553 # Also install the .dSYM directories if they exist (these directories
554 # contain the debug information for the shared libraries on darwin)
555 for file in gnat gnarl
; do \
556 if
[ -f
$(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
) ]; then \
557 $(INSTALL
) $(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
558 $(DESTDIR
)$(ADA_RTL_DSO_DIR
); \
560 if
[ -f
$(RTSDIR
)/lib
$${file}$(soext
) ]; then \
561 $(LN_S
) lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
562 $(DESTDIR
)$(ADA_RTL_DSO_DIR
)/lib
$${file}$(soext
); \
564 if
[ -d
$(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
).dSYM
]; then \
565 $(CP
) -r
$(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
).dSYM \
566 $(DESTDIR
)$(ADA_RTL_DSO_DIR
); \
569 # This copy must be done preserving the date on the original file.
570 for file in
$(RTSDIR
)/*.ad
[sb
]*; do \
571 $(INSTALL_DATA_DATE
) $$file $(DESTDIR
)$(ADA_INCLUDE_DIR
); \
573 cd
$(DESTDIR
)$(ADA_INCLUDE_DIR
); $(CHMOD
) a-wx
*.adb
574 cd
$(DESTDIR
)$(ADA_INCLUDE_DIR
); $(CHMOD
) a-wx
*.ads
576 ..
/stamp-gnatlib2-
$(RTSDIR
):
577 $(RM
) $(RTSDIR
)/s-
*.ali
578 $(RM
) $(RTSDIR
)/s-
*$(objext
)
579 $(RM
) $(RTSDIR
)/a-
*.ali
580 $(RM
) $(RTSDIR
)/a-
*$(objext
)
581 $(RM
) $(RTSDIR
)/*.ali
582 $(RM
) $(RTSDIR
)/*$(objext
)
583 $(RM
) $(RTSDIR
)/*$(arext
)
584 $(RM
) $(RTSDIR
)/*$(soext
)
585 touch ..
/stamp-gnatlib2-
$(RTSDIR
)
586 $(RM
) ..
/stamp-gnatlib-
$(RTSDIR
)
588 ..
/stamp-gnatlib1-
$(RTSDIR
): Makefile ..
/stamp-gnatlib2-
$(RTSDIR
)
589 $(MAKE
) MULTISUBDIR
="$(MULTISUBDIR)" THREAD_KIND
="$(THREAD_KIND)" LN_S
="$(LN_S)" setup-rts
591 $(CP
) $(srcdir)/tsystem.h
$(RTSDIR
)
592 $(RM
) ..
/stamp-gnatlib-
$(RTSDIR
)
593 touch ..
/stamp-gnatlib1-
$(RTSDIR
)
595 # GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
596 # for running it from ada/rts.
598 GCC_FOR_ADA_RTS
=$(subst .
/xgcc
,..
/..
/xgcc
,$(subst -B.
/, -B..
/..
/,$(GCC_FOR_TARGET
)))
600 # The main ada source directory must be on the include path for #include "..."
601 # because s-oscons-tmplt.c requires adaint.h, gsocket.h, and any file included
602 # by these headers. However note that we must use -iquote, not -I, so that
603 # ada/types.h does not conflict with a same-named system header (VxWorks
604 # has a <types.h> header).
606 OSCONS_CPP
=$(GCC_FOR_ADA_RTS
) $(GNATLIBCFLAGS_FOR_C
) -E
-C \
607 -DTARGET
=\"$(target_noncanonical
)\" -iquote
$(fsrcpfx
)ada
$(fsrcpfx
)ada
/s-oscons-tmplt.c
> s-oscons-tmplt.i
608 OSCONS_EXTRACT
=$(GCC_FOR_ADA_RTS
) $(GNATLIBCFLAGS_FOR_C
) -S s-oscons-tmplt.i
610 # Note: if you need to build with a non-GNU compiler, you could adapt the
611 # following definitions (written for VMS DEC-C)
612 #OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
613 # -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c
615 #OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
616 # -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c ; \
617 # ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
618 # ./s-oscons-tmplt.exe > s-oscons-tmplt.s
620 .
/bldtools
/oscons
/xoscons
: xoscons.adb xutil.ads xutil.adb
621 -$(MKDIR
) .
/bldtools
/oscons
622 $(RM
) $(addprefix .
/bldtools
/oscons
/,$(notdir $^
))
623 $(CP
) $^ .
/bldtools
/oscons
624 (cd .
/bldtools
/oscons
; gnatmake
-q xoscons
)
626 $(RTSDIR
)/s-oscons.ads
: ..
/stamp-gnatlib1-
$(RTSDIR
) s-oscons-tmplt.c gsocket.h .
/bldtools
/oscons
/xoscons
627 $(RM
) $(RTSDIR
)/s-oscons-tmplt.i
$(RTSDIR
)/s-oscons-tmplt.s
630 $(OSCONS_EXTRACT
) ; \
631 ..
/bldtools
/oscons
/xoscons s-oscons
)
633 gnatlib
: ..
/stamp-gnatlib1-
$(RTSDIR
) ..
/stamp-gnatlib2-
$(RTSDIR
) $(RTSDIR
)/s-oscons.ads
634 test -f
$(RTSDIR
)/s-oscons.ads || exit
1
636 $(MAKE
) -C
$(RTSDIR
) \
637 CC
="$(GCC_FOR_ADA_RTS)" \
638 INCLUDES
="$(INCLUDES_FOR_SUBDIR) -I./../.." \
639 CFLAGS
="$(GNATLIBCFLAGS_FOR_C)" \
640 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
642 -f ..
/Makefile
$(LIBGNAT_OBJS
) $(EXTRA_ADALIB_OBJS
)
644 $(MAKE
) -C
$(RTSDIR
) \
645 CC
="$(GCC_FOR_ADA_RTS)" \
647 CFLAGS
="$(GNATLIBCFLAGS)" \
648 ADAFLAGS
="$(GNATLIBFLAGS)" \
649 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
651 -f ..
/Makefile
$(GNATRTL_OBJS
)
652 $(RM
) $(RTSDIR
)/libgnat
$(arext
) $(RTSDIR
)/libgnarl
$(arext
)
653 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnat
$(arext
) \
654 $(addprefix $(RTSDIR
)/,$(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
))
655 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnat
$(arext
)
656 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnarl
$(arext
) \
657 $(addprefix $(RTSDIR
)/,$(GNATRTL_TASKING_OBJS
))
658 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnarl
$(arext
)
659 ifeq ($(GMEM_LIB
),gmemlib
)
660 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgmem
$(arext
) \
662 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgmem
$(arext
)
664 $(CHMOD
) a-wx
$(RTSDIR
)/*.ali
665 touch ..
/stamp-gnatlib-
$(RTSDIR
)
667 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
668 gnatlib-shared-default
:
669 $(MAKE
) $(FLAGS_TO_PASS
) \
670 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
671 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET) -fno-lto" \
672 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-lto" \
673 MULTISUBDIR
="$(MULTISUBDIR)" \
674 THREAD_KIND
="$(THREAD_KIND)" \
677 $(RM
) $(RTSDIR
)/libgna
*$(soext
)
678 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
$(GNATLIBCFLAGS
) \
679 $(PICFLAG_FOR_TARGET
) \
680 -o libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
681 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
682 $(SO_OPTS
)libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
684 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
$(GNATLIBCFLAGS
) \
685 $(PICFLAG_FOR_TARGET
) \
686 -o libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
687 $(GNATRTL_TASKING_OBJS
) \
688 $(SO_OPTS
)libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
690 cd
$(RTSDIR
); $(LN_S
) libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
692 cd
$(RTSDIR
); $(LN_S
) libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
695 # Create static libgnat and libgnarl compiled with -fPIC
696 $(RM
) $(RTSDIR
)/libgnat_pic
$(arext
) $(RTSDIR
)/libgnarl_pic
$(arext
)
697 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnat_pic
$(arext
) \
698 $(addprefix $(RTSDIR
)/,$(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
))
699 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnat_pic
$(arext
)
700 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnarl_pic
$(arext
) \
701 $(addprefix $(RTSDIR
)/,$(GNATRTL_TASKING_OBJS
))
702 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnarl_pic
$(arext
)
705 $(MAKE
) $(FLAGS_TO_PASS
) \
706 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
707 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
708 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
709 PICFLAG_FOR_TARGET
="$(PICFLAG_FOR_TARGET)" \
710 MULTISUBDIR
="$(MULTISUBDIR)" \
711 THREAD_KIND
="$(THREAD_KIND)" \
713 gnatlib-shared-default
714 $(MV
) $(RTSDIR
)/libgna
*$(soext
) .
715 $(MV
) $(RTSDIR
)/libgnat_pic
$(arext
) .
716 $(MV
) $(RTSDIR
)/libgnarl_pic
$(arext
) .
717 $(RM
) ..
/stamp-gnatlib2-
$(RTSDIR
)
718 $(MAKE
) $(FLAGS_TO_PASS
) \
719 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
720 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
721 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
722 MULTISUBDIR
="$(MULTISUBDIR)" \
723 THREAD_KIND
="$(THREAD_KIND)" \
726 $(MV
) libgna
*$(soext
) $(RTSDIR
)
727 $(MV
) libgnat_pic
$(arext
) $(RTSDIR
)
728 $(MV
) libgnarl_pic
$(arext
) $(RTSDIR
)
730 gnatlib-shared-dual-win32
:
731 $(MAKE
) $(FLAGS_TO_PASS
) \
732 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
733 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
734 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
735 PICFLAG_FOR_TARGET
="$(PICFLAG_FOR_TARGET)" \
736 MULTISUBDIR
="$(MULTISUBDIR)" \
737 THREAD_KIND
="$(THREAD_KIND)" \
740 $(MV
) $(RTSDIR
)/libgna
*$(soext
) .
741 $(RM
) ..
/stamp-gnatlib2-
$(RTSDIR
)
742 $(MAKE
) $(FLAGS_TO_PASS
) \
743 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
744 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
745 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
746 MULTISUBDIR
="$(MULTISUBDIR)" \
747 THREAD_KIND
="$(THREAD_KIND)" \
750 $(MV
) libgna
*$(soext
) $(RTSDIR
)
752 # ??? we need to add the option to support auto-import of arrays/records to
753 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
754 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
756 gnatlib-shared-win32
:
757 $(MAKE
) $(FLAGS_TO_PASS
) \
758 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
759 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
760 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
761 MULTISUBDIR
="$(MULTISUBDIR)" \
762 THREAD_KIND
="$(THREAD_KIND)" \
765 $(RM
) $(RTSDIR
)/libgna
*$(soext
)
766 $(CP
) $(RTSDIR
)/libgnat
$(arext
) $(RTSDIR
)/libgnat_pic
$(arext
)
767 $(CP
) $(RTSDIR
)/libgnarl
$(arext
) $(RTSDIR
)/libgnarl_pic
$(arext
)
768 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
-shared-libgcc \
769 $(PICFLAG_FOR_TARGET
) \
770 -o libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
771 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
772 $(SO_OPTS
)libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) $(MISCLIB
)
773 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
-shared-libgcc \
774 $(PICFLAG_FOR_TARGET
) \
775 -o libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
776 $(GNATRTL_TASKING_OBJS
) \
777 $(SO_OPTS
)libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
778 $(THREADSLIB
) -Wl
,libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
780 gnatlib-shared-darwin
:
781 $(MAKE
) $(FLAGS_TO_PASS
) \
782 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
783 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
784 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-common" \
785 MULTISUBDIR
="$(MULTISUBDIR)" \
786 THREAD_KIND
="$(THREAD_KIND)" \
789 $(RM
) $(RTSDIR
)/libgnat
$(soext
) $(RTSDIR
)/libgnarl
$(soext
)
790 $(CP
) $(RTSDIR
)/libgnat
$(arext
) $(RTSDIR
)/libgnat_pic
$(arext
)
791 $(CP
) $(RTSDIR
)/libgnarl
$(arext
) $(RTSDIR
)/libgnarl_pic
$(arext
)
792 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -dynamiclib
$(PICFLAG_FOR_TARGET
) \
793 -o libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
794 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
796 -Wl
,-install_name
,@rpath
/libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
797 -nodefaultrpaths
-Wl
,-rpath
,@loader_path
/,-rpath
,@loader_path
/.. \
798 -Wl
,-rpath
,@loader_path
/..
/..
/..
/..
/ $(MISCLIB
)
799 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -dynamiclib
$(PICFLAG_FOR_TARGET
) \
800 -o libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
801 $(GNATRTL_TASKING_OBJS
) \
803 -Wl
,-install_name
,@rpath
/libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
804 -nodefaultrpaths
-Wl
,-rpath
,@loader_path
/,-rpath
,@loader_path
/.. \
805 -Wl
,-rpath
,@loader_path
/..
/..
/..
/..
/ \
806 $(THREADSLIB
) -Wl
,libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
807 cd
$(RTSDIR
); $(LN_S
) libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
809 cd
$(RTSDIR
); $(LN_S
) libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
811 cd
$(RTSDIR
); $(DSYMUTIL_FOR_TARGET
) libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
812 cd
$(RTSDIR
); $(DSYMUTIL_FOR_TARGET
) libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
815 $(MAKE
) $(FLAGS_TO_PASS
) \
816 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
817 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
818 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
819 MULTISUBDIR
="$(MULTISUBDIR)" \
820 THREAD_KIND
="$(THREAD_KIND)" \
822 PICFLAG_FOR_TARGET
="$(PICFLAG_FOR_TARGET)" \
825 # When building a SJLJ runtime for VxWorks, we need to ensure that the extra
826 # linker options needed for ZCX are not passed to prevent the inclusion of
827 # useless objects and potential troubles from the presence of extra symbols
828 # and references in some configurations. The inhibition is performed by
829 # commenting the pragma instead of deleting the line, as the latter might
830 # result in getting multiple blank lines, hence possible style check errors.
832 $(MAKE
) $(FLAGS_TO_PASS
) \
834 MULTISUBDIR
="$(MULTISUBDIR)" \
835 THREAD_KIND
="$(THREAD_KIND)" \
837 ..
/stamp-gnatlib1-
$(RTSDIR
)
839 -e
's/Frontend_Exceptions.*/Frontend_Exceptions : constant Boolean := True;/' \
840 -e
's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' \
841 $(RTSDIR
)/system.ads
> $(RTSDIR
)/s.ads
842 $(MV
) $(RTSDIR
)/s.ads
$(RTSDIR
)/system.ads
843 $(MAKE
) $(FLAGS_TO_PASS
) \
845 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
846 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
847 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
848 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
849 MULTISUBDIR
="$(MULTISUBDIR)" \
850 THREAD_KIND
="$(THREAD_KIND)" \
855 $(MAKE
) $(FLAGS_TO_PASS
) \
856 EH_MECHANISM
="-gcc" \
857 MULTISUBDIR
="$(MULTISUBDIR)" \
858 THREAD_KIND
="$(THREAD_KIND)" \
860 ..
/stamp-gnatlib1-
$(RTSDIR
)
862 -e
's/Frontend_Exceptions.*/Frontend_Exceptions : constant Boolean := False;/' \
863 -e
's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' \
864 $(RTSDIR
)/system.ads
> $(RTSDIR
)/s.ads
865 $(MV
) $(RTSDIR
)/s.ads
$(RTSDIR
)/system.ads
866 $(MAKE
) $(FLAGS_TO_PASS
) \
867 EH_MECHANISM
="-gcc" \
868 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
869 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
870 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
871 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
872 MULTISUBDIR
="$(MULTISUBDIR)" \
873 THREAD_KIND
="$(THREAD_KIND)" \
877 # Compiling object files from source files.
879 # Note that dependencies on obstack.h are not written
880 # because that file is not part of GCC.
881 # Dependencies on gvarargs.h are not written
882 # because all that file does, when not compiling with GCC,
883 # is include the system varargs.h.
885 b_gnatl.adb
: $(GNATLINK_OBJS
)
886 $(GNATBIND
) $(ADA_INCLUDES
) -o b_gnatl.adb gnatlink.ali
888 b_gnatl.o
: b_gnatl.adb
889 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) -gnatws
-gnatyN \
892 b_gnatm.adb
: $(GNATMAKE_OBJS
)
893 $(GNATBIND
) $(ADA_INCLUDES
) -o b_gnatm.adb gnatmake.ali
895 b_gnatm.o
: b_gnatm.adb
896 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) -gnatws
-gnatyN \
899 # Provide a `toolexeclibdir' definition for when `gnat-install-lib' is
900 # wired through gcc/ in a configuration with top-level libada disabled.
901 # It will be overridden with the value configured when `gnat-install-lib'
902 # is invoked through libada/.
903 toolexeclibdir
= $(ADA_RTL_OBJ_DIR
)
905 ADA_INCLUDE_DIR
= $(libsubdir
)/adainclude
906 ADA_RTL_OBJ_DIR
= $(libsubdir
)/adalib
907 ADA_RTL_DSO_DIR
= $(toolexeclibdir
)
911 # need to keep the frame pointer in tracebak.o to pop the stack properly on
914 tracebak.o
: tracebak.c
915 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) $(ALL_CPPFLAGS
) \
916 $(INCLUDES
) $(NO_OMIT_ADAFLAGS
) $< $(OUTPUT_OPTION
)
918 adadecode.o
: adadecode.c adadecode.h
922 deftarg.o
: deftarg.c
924 exit.o
: adaint.h exit.c
927 rtfinal.o
: rtfinal.c
929 locales.o
: locales.c
931 socket.o
: socket.c gsocket.h
933 raise.o
: raise.c raise.h
934 sigtramp-armdroid.o
: sigtramp-armdroid.c sigtramp.h
935 sigtramp-armvxworks.o
: sigtramp-armvxworks.c sigtramp.h
936 sigtramp-ios.o
: sigtramp-ios.c sigtramp.h
937 sigtramp-vxworks.o
: sigtramp-vxworks.c
$(VX_SIGTRAMP_EXTRA_SRCS
)
938 sigtramp-vxworks-vxsim.o
: sigtramp-vxworks-vxsim.c
$(VX_SIGTRAMP_EXTRA_SRCS
)
939 terminals.o
: terminals.c
940 vx_stack_info.o
: vx_stack_info.c
942 raise-gcc.o
: raise-gcc.c raise.h
943 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
944 -iquote
$(srcdir) -iquote
$(ftop_srcdir
)/libgcc \
945 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
948 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
949 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
951 init.o
: init.c adaint.h raise.h
952 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
953 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
955 init-vxsim.o
: init-vxsim.c
956 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
957 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
959 initialize.o
: initialize.c raise.h
960 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
961 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
964 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
965 $(ALL_CPPFLAGS
) $(INCLUDES_FOR_SUBDIR
) \
968 targext.o
: targext.c
969 $(COMPILER
) -c
$(ALL_COMPILERFLAGS
) $(ADA_CFLAGS
) \
971 $(ALL_CPPFLAGS
) $(INCLUDES_FOR_SUBDIR
) \
974 # In GNU Make, ignore whether `stage*' exists.
975 .PHONY
: stage1 stage2 stage3 stage4
clean realclean TAGS bootstrap
976 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4