1 # Makefile for GNU Ada Compiler (GNAT).
2 # Copyright (C) 1994-2025 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@
95 # Should we build position-independent host code?
96 enable_host_pie
= @enable_host_pie@
98 LD_PICFLAG
= @LD_PICFLAG@
101 PWD_COMMAND
= $${PWDCMD-pwd
}
102 # How to copy preserving the date
103 INSTALL_DATA_DATE
= cp
-p
108 GNATMAKE_FOR_BUILD
= gnatmake
109 GNATBIND_FLAGS
= -static
-x
111 ADAFLAGS
= -W
-Wall
-gnatpg
-gnata
-gnatU
112 FORCE_DEBUG_ADAFLAGS
= -g
113 NO_INLINE_ADAFLAGS
= -fno-inline
114 NO_OMIT_ADAFLAGS
= -fno-omit-frame-pointer
115 NO_SIBLING_ADAFLAGS
= -fno-optimize-sibling-calls
116 NO_REORDER_ADAFLAGS
= -fno-toplevel-reorder
117 GNATLIBFLAGS
= -W
-Wall
-gnatg
-nostdinc
118 GNATLIBCFLAGS
= -g
-O2
119 # Pretend that _Unwind_GetIPInfo is available for the target by default. This
120 # should be autodetected during the configuration of libada and passed down to
121 # here, but we need something for --disable-libada and hope for the best.
122 GNATLIBCFLAGS_FOR_C
= \
123 -W
-Wall
$(GNATLIBCFLAGS
) -fexceptions
-DIN_RTS
-DHAVE_GETIPINFO
124 PICFLAG_FOR_TARGET
= @PICFLAG_FOR_TARGET@
129 OUTPUT_OPTION
= -o
$@
138 # program_transform_name and objdir are set by configure.ac.
139 program_transform_name
=
142 target_alias
=@target_alias@
144 target_noncanonical
=@target_noncanonical@
145 target_cpu
=@target_cpu@
146 target_vendor
=@target_vendor@
147 target_os
=@target_os@
149 host_vendor
=@host_vendor@
151 target_cpu_default
= @target_cpu_default@
152 xmake_file
= @xmake_file@
153 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
154 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
156 # Directory where sources are, from where we are.
157 VPATH
= $(srcdir)/ada
159 # Full path to top source directory
160 # In particular this is used to access libgcc headers, so that references to
161 # these headers from GNAT runtime objects have path names in debugging info
162 # that are consistent with libgcc objects. Also used for other references to
163 # the top source directory for consistency.
164 ftop_srcdir
:= $(shell cd
$(srcdir)/..
;${PWD_COMMAND})
166 fsrcdir
:= $(shell cd
$(srcdir);${PWD_COMMAND})
167 fsrcpfx
:= $(shell cd
$(srcdir);${PWD_COMMAND})/
168 fcurdir
:= $(shell ${PWD_COMMAND})
169 fcurpfx
:= $(shell ${PWD_COMMAND})/
171 # Top build directory, relative to here.
174 # Internationalization library.
176 LIBINTL_DEP
= @LIBINTL_DEP@
178 # Character encoding conversion library.
179 LIBICONV
= @LIBICONV@
180 LIBICONV_DEP
= @LIBICONV_DEP@
182 # Any system libraries needed just for GNAT.
183 SYSLIBS
= @GNAT_LIBEXC@
185 # List extra gnattools
188 # List of target dependent sources, overridden below as necessary
191 # Type of tools build we are doing; default is not compiling tools.
194 # main GNAT source directory
195 GNAT_SRC
=$(fsrcpfx
)ada
199 RTSDIR
= rts
$(subst /,_
,$(MULTISUBDIR
))
201 # Link flags used to build gnat tools. By default we prefer to statically
202 # link with libgcc to avoid a dependency on shared libgcc (which is tricky
203 # to deal with as it may conflict with the libgcc provided by the system).
204 GCC_LINK_FLAGS
=-static-libstdc
++ -static-libgcc
206 # End of variables for you to override.
210 # This tells GNU Make version 3 not to put all variables in the environment.
214 ifneq ($(xmake_file
),)
215 include $(xmake_file
)
218 # Now figure out from those variables how to compile and link.
220 all.indirect
: Makefile ..
/gnat1
$(exeext
)
222 # IN_GCC is meant to distinguish between code compiled into GCC itself, i.e.
223 # for the host, and the rest. But we also use it for the tools (link.c) and
224 # even break the host/target wall by using it for the library (targext.c).
225 # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross
226 # compiler which does not use the native libraries and headers.
227 INTERNAL_CFLAGS
= @CROSS@
-DIN_GCC
229 # This is the variable actually used when we compile.
230 ALL_CFLAGS
= $(INTERNAL_CFLAGS
) $(T_CFLAGS
) $(CFLAGS
)
233 ALL_CPPFLAGS
= $(CPPFLAGS
)
235 ALL_ADAFLAGS
= $(CFLAGS
) $(ADA_CFLAGS
) $(ADAFLAGS
)
237 ifneq ($(enable_host_pie
),)
238 LIBIBERTY
= ..
/..
/libiberty
/pic
/libiberty.a
240 LIBIBERTY
= ..
/..
/libiberty
/libiberty.a
243 # We need to link against libbacktrace because diagnostic.c in
244 # libcommon.a uses it.
245 LIBBACKTRACE
= ..
/..
/libbacktrace
/.libs
/libbacktrace.a
247 # How to link with both our special library facilities
248 # and the system's installed libraries.
249 LIBS
= $(LIBINTL
) $(LIBICONV
) $(LIBBACKTRACE
) $(LIBIBERTY
) $(SYSLIBS
)
250 LIBDEPS
= $(LIBINTL_DEP
) $(LIBICONV_DEP
) $(LIBBACKTRACE
) $(LIBIBERTY
)
251 # Default is no TGT_LIB; one might be passed down or something
253 TOOLS_LIBS
= ..
/version.o ..
/link.o ..
/targext.o ..
/..
/ggc-none.o \
254 ..
/..
/libcommon-target.a ..
/..
/libcommon.a ..
/..
/..
/libcpp
/libcpp.a \
255 $(LIBGNAT
) $(LIBINTL
) $(LIBICONV
) ..
/$(LIBBACKTRACE
) ..
/$(LIBIBERTY
) \
256 $(SYSLIBS
) $(TGT_LIB
)
258 # Specify the directories to be searched for header files.
259 # Both . and srcdir are used, in that order,
260 # so that tm.h and config.h will be found in the compilation
261 # subdirectory rather than in the source directory.
262 INCLUDES
= -iquote .
-iquote ..
-iquote
$(srcdir)/ada
-iquote
$(srcdir) \
263 -I
$(ftop_srcdir
)/include $(GMPINC
)
265 ADA_INCLUDES
= -I-
-I.
-I
$(srcdir)/ada
267 # Likewise, but valid for subdirectories of the current dir.
268 # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
269 # that directory conflicts with a system header file.
270 ifneq ($(findstring vxworks
,$(target_os
)),)
271 INCLUDES_FOR_SUBDIR
= -iquote .
-iquote ..
-iquote ..
/.. \
272 -iquote
$(fsrcdir
)/ada \
273 -I
$(ftop_srcdir
)/include $(GMPINC
)
275 INCLUDES_FOR_SUBDIR
= -iquote .
-iquote ..
-iquote ..
/.. \
276 -iquote
$(fsrcdir
)/ada
-iquote
$(fsrcdir
) \
277 -I
$(ftop_srcdir
)/include $(GMPINC
)
280 ADA_INCLUDES_FOR_SUBDIR
= -I.
-I
$(fsrcdir
)/ada
282 # Avoid a lot of time thinking about remaking Makefile.in and *.def.
285 # Say how to compile Ada programs.
286 .SUFFIXES
: .ada .adb .ads .asm
288 # Always use -I$(srcdir)/config when compiling.
290 $(CC
) -c
-x assembler
$< $(OUTPUT_OPTION
)
293 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
296 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) $< $(OUTPUT_OPTION
)
299 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) $< $(OUTPUT_OPTION
)
301 # how to regenerate this file
302 Makefile
: ..
/config.status
$(srcdir)/ada
/gcc-interface
/Makefile.in
$(srcdir)/ada
/Makefile.in
$(srcdir)/ada
/version.c
304 LANGUAGES
="$(CONFIG_LANGUAGES)" \
306 CONFIG_FILES
="ada/gcc-interface/Makefile ada/Makefile" $(SHELL
) config.status
308 # This tells GNU make version 3 not to export all the variables
309 # defined in this file into the environment.
312 # Lists of files for various purposes.
314 GNATLINK_OBJS
= gnatlink.o \
315 a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
316 gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
317 osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
318 sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o \
319 types.o validsw.o widechar.o
321 GNATMAKE_OBJS
= a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
322 atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o \
323 erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
324 gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
325 make.o makeusg.o make_util.o namet.o nlists.o opt.o osint.o osint-m.o \
326 output.o restrict.o rident.o s-exctab.o s-cautns.o \
327 s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o \
328 s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \
329 snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \
330 switch.o switch-m.o table.o targparm.o tempdir.o types.o uintp.o \
331 uname.o urealp.o usage.o widechar.o warnsw.o \
332 seinfo.o einfo-entities.o einfo-utils.o sinfo-nodes.o sinfo-utils.o \
335 erroutc-pretty_emitter.o \
336 erroutc-sarif_emitter.o \
338 $(EXTRA_GNATMAKE_OBJS
)
340 # Make arch match the current multilib so that the RTS selection code
341 # picks up the right files. For a given target this must be coherent
342 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
344 ifeq ($(strip $(filter-out x86_64
, $(target_cpu
))),)
345 ifeq ($(strip $(MULTISUBDIR
)),/32)
348 ifeq ($(strip $(MULTISUBDIR
)),/x32
)
354 # The x86_64-linux-gnux32 compiler is actually an x32 compiler
355 ifeq ($(strip $(filter-out x86_64 linux-gnux32
%, $(target_cpu
) $(target_os
))),)
356 ifneq ($(strip $(MULTISUBDIR
)),/64)
361 # The SuSE PowerPC64/Linux compiler is actually a 32-bit PowerPC compiler
362 ifeq ($(strip $(filter-out powerpc64 suse linux
%, $(target_cpu
) $(target_vendor
) $(target_os
))),)
366 # Configuration of host tools
368 # Under linux, host tools need to be linked with -ldl
370 ifeq ($(strip $(filter-out linux
%,$(host_os
))),)
374 include $(fsrcdir
)/ada
/Makefile.rtl
376 ifneq ($(enable_host_pie
),)
377 LIBGNAT
=..
/$(RTSDIR
)/libgnat_pic.a
379 LIBGNAT
=..
/$(RTSDIR
)/libgnat.a
382 TOOLS_FLAGS_TO_PASS
= \
384 "CFLAGS=$(CFLAGS) $(PICFLAG)" \
385 "LDFLAGS=$(LDFLAGS) $(LD_PICFLAG)" \
386 "ADAFLAGS=$(ADAFLAGS)" \
387 "ADA_CFLAGS=$(ADA_CFLAGS)" \
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) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
469 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
470 $(GNATLINK
) -v gnatchop
-o ..
/..
/gnatchop
$(exeext
) \
471 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
472 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
473 $(GNATLINK
) -v gnatkr
-o ..
/..
/gnatkr
$(exeext
) \
474 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
475 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
476 $(GNATLINK
) -v gnatls
-o ..
/..
/gnatls
$(exeext
) \
477 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
478 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
479 $(GNATLINK
) -v gnatprep
-o ..
/..
/gnatprep
$(exeext
) \
480 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
481 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
482 $(GNATLINK
) -v gnatname
-o ..
/..
/gnatname
$(exeext
) \
483 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
484 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
485 $(GNATLINK
) -v gnatclean
-o ..
/..
/gnatclean
$(exeext
) \
486 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
487 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
489 ..
/..
/gnatdll
$(exeext
): ..
/stamp-tools
490 $(GNATMAKE
) -c
$(ADA_INCLUDES
) gnatdll
--GCC
="$(CC) $(ALL_ADAFLAGS)"
491 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatdll
492 $(GNATLINK
) -v gnatdll
-o
$@ \
493 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
494 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
496 gnatmake-re
: ..
/stamp-tools
497 $(GNATMAKE
) -j0
$(ADA_INCLUDES
) -u sdefault
--GCC
="$(CC) $(ALL_ADAFLAGS)"
498 $(GNATMAKE
) -j0
-c
$(ADA_INCLUDES
) gnatmake
--GCC
="$(CC) $(ALL_ADAFLAGS)"
499 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatmake
500 $(GNATLINK
) -v gnatmake
-o ..
/..
/gnatmake
$(exeext
) \
501 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
502 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
504 # Note the use of the "mv" command in order to allow gnatlink to be linked
505 # with the former version of gnatlink itself which cannot override itself.
506 # gnatlink-re cannot be run at the same time as gnatmake-re, hence the
508 gnatlink-re
: ..
/stamp-tools gnatmake-re
509 $(GNATMAKE
) -j0
-c
$(ADA_INCLUDES
) gnatlink
--GCC
="$(CC) $(ALL_ADAFLAGS)"
510 $(GNATBIND
) $(ADA_INCLUDES
) $(GNATBIND_FLAGS
) gnatlink
511 $(GNATLINK
) -v gnatlink
-o ..
/..
/gnatlinknew
$(exeext
) \
512 --GCC
="$(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ADA_INCLUDES)" \
513 --LINK
="$(GCC_LINK)" $(TOOLS_LIBS
)
514 $(MV
) ..
/..
/gnatlinknew
$(exeext
) ..
/..
/gnatlink
$(exeext
)
516 # Needs to be built with CC=gcc
517 # Since the RTL should be built with the latest compiler, remove the
518 # stamp target in the parent directory whenever gnat1 is rebuilt
520 # Likewise for the tools
521 ..
/..
/gnatmake
$(exeext
): b_gnatm.o
$(GNATMAKE_OBJS
)
522 +$(GCC_LINK
) $(ALL_CFLAGS
) -o
$@ b_gnatm.o
$(GNATMAKE_OBJS
) $(TOOLS_LIBS
) $(TOOLS1_LIBS
)
524 ..
/..
/gnatlink
$(exeext
): b_gnatl.o
$(GNATLINK_OBJS
)
525 +$(GCC_LINK
) $(ALL_CFLAGS
) -o
$@ b_gnatl.o
$(GNATLINK_OBJS
) $(TOOLS_LIBS
) $(TOOLS1_LIBS
)
527 ..
/stamp-gnatlib-
$(RTSDIR
):
528 @if
[ ! -f stamp-gnatlib-
$(RTSDIR
) ] ; \
530 $(ECHO
) You must first build the GNAT library
: make gnatlib
; \
537 # Install all the requested GCC spec files.
539 $(foreach f
,$(GCC_SPEC_FILES
), \
540 $(INSTALL_DATA_DATE
) $(srcdir)/ada
/$(f
) $(DESTDIR
)$(libsubdir
)/;)
542 install-gnatlib
: ..
/stamp-gnatlib-
$(RTSDIR
) install-gcc-specs
543 $(RMDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
544 $(RMDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
545 -$(MKDIR
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)
546 -$(MKDIR
) $(DESTDIR
)$(ADA_INCLUDE_DIR
)
547 for file in
$(RTSDIR
)/*.ali
; do \
548 $(INSTALL_DATA_DATE
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
550 $(INSTALL_DATA_DATE
) $(RTSDIR
)/ada_target_properties \
551 $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)/..
/
552 -cd
$(RTSDIR
); for file in
*$(arext
);do \
553 $(INSTALL_DATA
) $$file $(DESTDIR
)$(ADA_RTL_OBJ_DIR
); \
554 $(RANLIB_FOR_TARGET
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
)/$$file; \
556 -$(foreach file
, $(EXTRA_ADALIB_OBJS
), \
557 $(INSTALL_DATA_DATE
) $(RTSDIR
)/$(file
) $(DESTDIR
)$(ADA_RTL_OBJ_DIR
) && \
559 # Install the shared libraries, if any, using $(INSTALL) instead
560 # of $(INSTALL_DATA). The latter may force a mode inappropriate
561 # for shared libraries on some targets, e.g. on HP-UX where the x
562 # permission is required.
563 # Also install the .dSYM directories if they exist (these directories
564 # contain the debug information for the shared libraries on darwin)
565 for file in gnat gnarl
; do \
566 if
[ -f
$(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
) ]; then \
567 $(INSTALL
) $(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
568 $(DESTDIR
)$(ADA_RTL_DSO_DIR
); \
570 if
[ -f
$(RTSDIR
)/lib
$${file}$(soext
) ]; then \
571 $(LN_S
) lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
572 $(DESTDIR
)$(ADA_RTL_DSO_DIR
)/lib
$${file}$(soext
); \
574 if
[ -d
$(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
).dSYM
]; then \
575 $(CP
) -r
$(RTSDIR
)/lib
$${file}$(hyphen
)$(LIBRARY_VERSION
)$(soext
).dSYM \
576 $(DESTDIR
)$(ADA_RTL_DSO_DIR
); \
579 # This copy must be done preserving the date on the original file.
580 for file in
$(RTSDIR
)/*.ad
[sb
]*; do \
581 $(INSTALL_DATA_DATE
) $$file $(DESTDIR
)$(ADA_INCLUDE_DIR
); \
583 cd
$(DESTDIR
)$(ADA_INCLUDE_DIR
); $(CHMOD
) a-wx
*.adb
584 cd
$(DESTDIR
)$(ADA_INCLUDE_DIR
); $(CHMOD
) a-wx
*.ads
586 ..
/stamp-gnatlib2-
$(RTSDIR
):
587 $(RM
) $(RTSDIR
)/s-
*.ali
588 $(RM
) $(RTSDIR
)/s-
*$(objext
)
589 $(RM
) $(RTSDIR
)/a-
*.ali
590 $(RM
) $(RTSDIR
)/a-
*$(objext
)
591 $(RM
) $(RTSDIR
)/*.ali
592 $(RM
) $(RTSDIR
)/*$(objext
)
593 $(RM
) $(RTSDIR
)/*$(arext
)
594 $(RM
) $(RTSDIR
)/*$(soext
)
595 touch ..
/stamp-gnatlib2-
$(RTSDIR
)
596 $(RM
) ..
/stamp-gnatlib-
$(RTSDIR
)
598 ..
/stamp-gnatlib1-
$(RTSDIR
): Makefile ..
/stamp-gnatlib2-
$(RTSDIR
)
599 $(MAKE
) MULTISUBDIR
="$(MULTISUBDIR)" THREAD_KIND
="$(THREAD_KIND)" LN_S
="$(LN_S)" setup-rts
601 $(CP
) $(srcdir)/tsystem.h
$(RTSDIR
)
602 $(RM
) ..
/stamp-gnatlib-
$(RTSDIR
)
603 touch ..
/stamp-gnatlib1-
$(RTSDIR
)
605 # GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
606 # for running it from ada/rts.
608 GCC_FOR_ADA_RTS
=$(subst .
/xgcc
,..
/..
/xgcc
,$(subst -B.
/, -B..
/..
/,$(GCC_FOR_TARGET
)))
610 # The main ada source directory must be on the include path for #include "..."
611 # because s-oscons-tmplt.c requires adaint.h, gsocket.h, and any file included
612 # by these headers. However note that we must use -iquote, not -I, so that
613 # ada/types.h does not conflict with a same-named system header (VxWorks
614 # has a <types.h> header).
616 OSCONS_CPP
=$(GCC_FOR_ADA_RTS
) $(GNATLIBCFLAGS_FOR_C
) -E
-C \
617 -DTARGET
=\"$(target_noncanonical
)\" -iquote
$(fsrcpfx
)ada
$(fsrcpfx
)ada
/s-oscons-tmplt.c
> s-oscons-tmplt.i
618 OSCONS_EXTRACT
=$(GCC_FOR_ADA_RTS
) $(GNATLIBCFLAGS_FOR_C
) -S s-oscons-tmplt.i
620 # Note: if you need to build with a non-GNU compiler, you could adapt the
621 # following definitions (written for VMS DEC-C)
622 #OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
623 # -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c
625 #OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
626 # -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c ; \
627 # ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
628 # ./s-oscons-tmplt.exe > s-oscons-tmplt.s
630 .
/bldtools
/oscons
/xoscons
: xoscons.adb xutil.ads xutil.adb
631 -$(MKDIR
) .
/bldtools
/oscons
632 $(RM
) $(addprefix .
/bldtools
/oscons
/,$(notdir $^
))
633 $(CP
) $^ .
/bldtools
/oscons
634 (cd .
/bldtools
/oscons
; $(GNATMAKE_FOR_BUILD
) xoscons
)
636 $(RTSDIR
)/s-oscons.ads
: ..
/stamp-gnatlib1-
$(RTSDIR
) s-oscons-tmplt.c gsocket.h .
/bldtools
/oscons
/xoscons
637 $(RM
) $(RTSDIR
)/s-oscons-tmplt.i
$(RTSDIR
)/s-oscons-tmplt.s
640 $(OSCONS_EXTRACT
) ; \
641 ..
/bldtools
/oscons
/xoscons s-oscons
)
643 gnatlib
: ..
/stamp-gnatlib1-
$(RTSDIR
) ..
/stamp-gnatlib2-
$(RTSDIR
) $(RTSDIR
)/s-oscons.ads
644 test -f
$(RTSDIR
)/s-oscons.ads || exit
1
646 $(MAKE
) -C
$(RTSDIR
) \
647 CC
="$(GCC_FOR_ADA_RTS)" \
648 INCLUDES
="$(INCLUDES_FOR_SUBDIR) -I./../.." \
649 CFLAGS
="$(GNATLIBCFLAGS_FOR_C)" \
650 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
652 -f ..
/Makefile
$(LIBGNAT_OBJS
) $(EXTRA_ADALIB_OBJS
)
654 $(MAKE
) -C
$(RTSDIR
) \
655 CC
="$(GCC_FOR_ADA_RTS)" \
657 CFLAGS
="$(GNATLIBCFLAGS)" \
658 ADAFLAGS
="$(GNATLIBFLAGS)" \
659 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
661 -f ..
/Makefile
$(GNATRTL_OBJS
)
662 $(RM
) $(RTSDIR
)/libgnat
$(arext
) $(RTSDIR
)/libgnarl
$(arext
)
663 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnat
$(arext
) \
664 $(addprefix $(RTSDIR
)/,$(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
))
665 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnat
$(arext
)
666 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnarl
$(arext
) \
667 $(addprefix $(RTSDIR
)/,$(GNATRTL_TASKING_OBJS
))
668 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnarl
$(arext
)
669 ifeq ($(GMEM_LIB
),gmemlib
)
670 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgmem
$(arext
) \
672 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgmem
$(arext
)
674 $(CHMOD
) a-wx
$(RTSDIR
)/*.ali
675 touch ..
/stamp-gnatlib-
$(RTSDIR
)
677 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
678 gnatlib-shared-default
:
679 $(MAKE
) $(FLAGS_TO_PASS
) \
680 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
681 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET) -fno-lto" \
682 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-lto" \
683 MULTISUBDIR
="$(MULTISUBDIR)" \
684 THREAD_KIND
="$(THREAD_KIND)" \
687 $(RM
) $(RTSDIR
)/libgna
*$(soext
)
688 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
$(GNATLIBCFLAGS
) \
689 $(PICFLAG_FOR_TARGET
) \
690 -o libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
691 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
692 $(SO_OPTS
)libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
694 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
$(GNATLIBCFLAGS
) \
695 $(PICFLAG_FOR_TARGET
) \
696 -o libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
697 $(GNATRTL_TASKING_OBJS
) \
698 $(SO_OPTS
)libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
700 cd
$(RTSDIR
); $(LN_S
) libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
702 cd
$(RTSDIR
); $(LN_S
) libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
705 # Create static libgnat and libgnarl compiled with -fPIC
706 $(RM
) $(RTSDIR
)/libgnat_pic
$(arext
) $(RTSDIR
)/libgnarl_pic
$(arext
)
707 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnat_pic
$(arext
) \
708 $(addprefix $(RTSDIR
)/,$(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
))
709 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnat_pic
$(arext
)
710 $(AR_FOR_TARGET
) $(AR_FLAGS
) $(RTSDIR
)/libgnarl_pic
$(arext
) \
711 $(addprefix $(RTSDIR
)/,$(GNATRTL_TASKING_OBJS
))
712 $(RANLIB_FOR_TARGET
) $(RTSDIR
)/libgnarl_pic
$(arext
)
715 $(MAKE
) $(FLAGS_TO_PASS
) \
716 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
717 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
718 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
719 PICFLAG_FOR_TARGET
="$(PICFLAG_FOR_TARGET)" \
720 MULTISUBDIR
="$(MULTISUBDIR)" \
721 THREAD_KIND
="$(THREAD_KIND)" \
723 gnatlib-shared-default
724 $(MV
) $(RTSDIR
)/libgna
*$(soext
) .
725 $(MV
) $(RTSDIR
)/libgnat_pic
$(arext
) .
726 $(MV
) $(RTSDIR
)/libgnarl_pic
$(arext
) .
727 $(RM
) ..
/stamp-gnatlib2-
$(RTSDIR
)
728 $(MAKE
) $(FLAGS_TO_PASS
) \
729 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
730 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
731 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
732 MULTISUBDIR
="$(MULTISUBDIR)" \
733 THREAD_KIND
="$(THREAD_KIND)" \
736 $(MV
) libgna
*$(soext
) $(RTSDIR
)
737 $(MV
) libgnat_pic
$(arext
) $(RTSDIR
)
738 $(MV
) libgnarl_pic
$(arext
) $(RTSDIR
)
740 # Remove all the object files. They cannot be reused because they have
741 # been generated for the static library and the shared library will be
742 # the first to be rebuilt. Moreover, this will prevent gnatmake to pick
743 # them instead of the prescribed version of the library when the tools
744 # are built for a native compiler.
745 $(RM
) $(addprefix $(RTSDIR
)/,$(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
))
746 $(RM
) $(addprefix $(RTSDIR
)/,$(GNATRTL_TASKING_OBJS
))
748 gnatlib-shared-dual-win32
:
749 $(MAKE
) $(FLAGS_TO_PASS
) \
750 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
751 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
752 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
753 PICFLAG_FOR_TARGET
="$(PICFLAG_FOR_TARGET)" \
754 MULTISUBDIR
="$(MULTISUBDIR)" \
755 THREAD_KIND
="$(THREAD_KIND)" \
758 $(MV
) $(RTSDIR
)/libgna
*$(soext
) .
759 $(RM
) ..
/stamp-gnatlib2-
$(RTSDIR
)
760 $(MAKE
) $(FLAGS_TO_PASS
) \
761 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
762 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
763 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
764 MULTISUBDIR
="$(MULTISUBDIR)" \
765 THREAD_KIND
="$(THREAD_KIND)" \
768 $(MV
) libgna
*$(soext
) $(RTSDIR
)
770 # ??? we need to add the option to support auto-import of arrays/records to
771 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
772 # use the gnatlib-shared-dual-win32 target to build the GNAT runtimes on
774 gnatlib-shared-win32
:
775 $(MAKE
) $(FLAGS_TO_PASS
) \
776 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
777 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
778 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \
779 MULTISUBDIR
="$(MULTISUBDIR)" \
780 THREAD_KIND
="$(THREAD_KIND)" \
783 $(RM
) $(RTSDIR
)/libgna
*$(soext
)
784 $(CP
) $(RTSDIR
)/libgnat
$(arext
) $(RTSDIR
)/libgnat_pic
$(arext
)
785 $(CP
) $(RTSDIR
)/libgnarl
$(arext
) $(RTSDIR
)/libgnarl_pic
$(arext
)
786 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
-shared-libgcc \
787 $(PICFLAG_FOR_TARGET
) \
788 -o libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
789 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
790 $(SO_OPTS
)libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) $(MISCLIB
)
791 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -shared
-shared-libgcc \
792 $(PICFLAG_FOR_TARGET
) \
793 -o libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
794 $(GNATRTL_TASKING_OBJS
) \
795 $(SO_OPTS
)libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
796 $(THREADSLIB
) -Wl
,libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
798 gnatlib-shared-darwin
:
799 $(MAKE
) $(FLAGS_TO_PASS
) \
800 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
801 GNATLIBCFLAGS
="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \
802 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-common" \
803 MULTISUBDIR
="$(MULTISUBDIR)" \
804 THREAD_KIND
="$(THREAD_KIND)" \
807 $(RM
) $(RTSDIR
)/libgnat
$(soext
) $(RTSDIR
)/libgnarl
$(soext
)
808 $(CP
) $(RTSDIR
)/libgnat
$(arext
) $(RTSDIR
)/libgnat_pic
$(arext
)
809 $(CP
) $(RTSDIR
)/libgnarl
$(arext
) $(RTSDIR
)/libgnarl_pic
$(arext
)
810 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -dynamiclib
$(PICFLAG_FOR_TARGET
) \
811 -o libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
812 $(GNATRTL_NONTASKING_OBJS
) $(LIBGNAT_OBJS
) \
814 -Wl
,-install_name
,@rpath
/libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
815 -nodefaultrpaths
-Wl
,-rpath
,@loader_path
/,-rpath
,@loader_path
/.. \
816 -Wl
,-rpath
,@loader_path
/..
/..
/..
/..
/ $(MISCLIB
)
817 cd
$(RTSDIR
); $(GCC_FOR_ADA_RTS
) -dynamiclib
$(PICFLAG_FOR_TARGET
) \
818 -o libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
819 $(GNATRTL_TASKING_OBJS
) \
821 -Wl
,-install_name
,@rpath
/libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
822 -nodefaultrpaths
-Wl
,-rpath
,@loader_path
/,-rpath
,@loader_path
/.. \
823 -Wl
,-rpath
,@loader_path
/..
/..
/..
/..
/ \
824 $(THREADSLIB
) -Wl
,libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
825 cd
$(RTSDIR
); $(LN_S
) libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
827 cd
$(RTSDIR
); $(LN_S
) libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
) \
829 cd
$(RTSDIR
); $(DSYMUTIL_FOR_TARGET
) libgnat
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
830 cd
$(RTSDIR
); $(DSYMUTIL_FOR_TARGET
) libgnarl
$(hyphen
)$(LIBRARY_VERSION
)$(soext
)
833 $(MAKE
) $(FLAGS_TO_PASS
) \
834 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
835 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
836 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
837 MULTISUBDIR
="$(MULTISUBDIR)" \
838 THREAD_KIND
="$(THREAD_KIND)" \
840 PICFLAG_FOR_TARGET
="$(PICFLAG_FOR_TARGET)" \
844 $(MAKE
) $(FLAGS_TO_PASS
) \
845 EH_MECHANISM
="-gcc" \
846 MULTISUBDIR
="$(MULTISUBDIR)" \
847 THREAD_KIND
="$(THREAD_KIND)" \
849 ..
/stamp-gnatlib1-
$(RTSDIR
)
851 -e
's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' \
852 $(RTSDIR
)/system.ads
> $(RTSDIR
)/s.ads
853 $(MV
) $(RTSDIR
)/s.ads
$(RTSDIR
)/system.ads
854 $(MAKE
) $(FLAGS_TO_PASS
) \
855 EH_MECHANISM
="-gcc" \
856 GNATLIBFLAGS
="$(GNATLIBFLAGS)" \
857 GNATLIBCFLAGS
="$(GNATLIBCFLAGS)" \
858 GNATLIBCFLAGS_FOR_C
="$(GNATLIBCFLAGS_FOR_C)" \
859 FORCE_DEBUG_ADAFLAGS
="$(FORCE_DEBUG_ADAFLAGS)" \
860 MULTISUBDIR
="$(MULTISUBDIR)" \
861 THREAD_KIND
="$(THREAD_KIND)" \
865 # Compiling object files from source files.
867 # Note that dependencies on obstack.h are not written
868 # because that file is not part of GCC.
869 # Dependencies on gvarargs.h are not written
870 # because all that file does, when not compiling with GCC,
871 # is include the system varargs.h.
873 b_gnatl.adb
: $(GNATLINK_OBJS
)
874 $(GNATBIND
) $(ADA_INCLUDES
) -o b_gnatl.adb gnatlink.ali
876 b_gnatl.o
: b_gnatl.adb
877 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) -gnatws
-gnatyN
$< $(OUTPUT_OPTION
)
879 b_gnatm.adb
: $(GNATMAKE_OBJS
)
880 $(GNATBIND
) $(ADA_INCLUDES
) -o b_gnatm.adb gnatmake.ali
882 b_gnatm.o
: b_gnatm.adb
883 $(CC
) -c
$(ALL_ADAFLAGS
) $(ADA_INCLUDES
) -gnatws
-gnatyN
$< $(OUTPUT_OPTION
)
885 # Provide a `toolexeclibdir' definition for when `gnat-install-lib' is
886 # wired through gcc/ in a configuration with top-level libada disabled.
887 # It will be overridden with the value configured when `gnat-install-lib'
888 # is invoked through libada/.
889 toolexeclibdir
= $(ADA_RTL_OBJ_DIR
)
891 ADA_INCLUDE_DIR
= $(libsubdir
)/adainclude
892 ADA_RTL_OBJ_DIR
= $(libsubdir
)/adalib
893 ADA_RTL_DSO_DIR
= $(toolexeclibdir
)
897 # need to keep the frame pointer in tracebak.o to pop the stack properly on
900 tracebak.o
: tracebak.c
901 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) $(ALL_CPPFLAGS
) \
902 $(INCLUDES
) $(NO_OMIT_ADAFLAGS
) $< $(OUTPUT_OPTION
)
904 adadecode.o
: adadecode.c adadecode.h
908 deftarg.o
: deftarg.c
910 exit.o
: adaint.h exit.c
913 rtfinal.o
: rtfinal.c
915 locales.o
: locales.c
917 socket.o
: socket.c gsocket.h
919 raise.o
: raise.c raise.h
920 sigtramp-armdroid.o
: sigtramp-armdroid.c sigtramp.h
921 sigtramp-armvxworks.o
: sigtramp-armvxworks.c sigtramp.h
922 sigtramp-ios.o
: sigtramp-ios.c sigtramp.h
923 sigtramp-vxworks.o
: sigtramp-vxworks.c
$(VX_SIGTRAMP_EXTRA_SRCS
)
924 sigtramp-vxworks-vxsim.o
: sigtramp-vxworks-vxsim.c
$(VX_SIGTRAMP_EXTRA_SRCS
)
925 terminals.o
: terminals.c
926 vx_stack_info.o
: vx_stack_info.c
928 raise-gcc.o
: raise-gcc.c raise.h
929 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
930 -iquote
$(srcdir) -iquote
$(ftop_srcdir
)/libgcc \
931 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
934 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
935 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
937 init.o
: init.c adaint.h raise.h
938 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
939 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
941 init-vxsim.o
: init-vxsim.c
942 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
943 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
945 initialize.o
: initialize.c raise.h
946 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
947 $(ALL_CPPFLAGS
) $(INCLUDES
) $< $(OUTPUT_OPTION
)
950 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
951 $(ALL_CPPFLAGS
) $(INCLUDES_FOR_SUBDIR
) \
954 targext.o
: targext.c
955 $(CC
) -c
$(ALL_CFLAGS
) $(ADA_CFLAGS
) \
957 $(ALL_CPPFLAGS
) $(INCLUDES_FOR_SUBDIR
) \
960 # In GNU Make, ignore whether `stage*' exists.
961 .PHONY
: stage1 stage2 stage3 stage4
clean realclean TAGS bootstrap
962 .PHONY
: risky-stage1 risky-stage2 risky-stage3 risky-stage4