OSDN Git Service

2006-12-09 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
[pf3gnuchains/gcc-fork.git] / libada / Makefile.in
1 # Makefile for libada.
2 #   Copyright 2003, 2004 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 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.
13
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.
17
18 # Default target; must be first.
19 all: gnatlib
20
21 # Standard autoconf-set variables.
22 SHELL = @SHELL@
23 srcdir = @srcdir@
24 build = @build@
25 target = @target@
26 prefix = @prefix@
27
28 # Nonstandard autoconf-set variables.
29 enable_shared = @enable_shared@
30 LN_S=@LN_S@
31
32 # Variables for the user (or the top level) to override.
33 objext=.o
34 GNATLIBFLAGS= -W -Wall -gnatpg
35 THREAD_KIND=native
36 TRACE=no
37 LDFLAGS=
38 STAGE_PREFIX=
39
40 # The tedious process of getting CFLAGS right.
41 CFLAGS=-g
42 LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
43 GCC_WARN_CFLAGS = $(LOOSE_WARN) $(NOCOMMON_FLAG)
44
45 ADA_CFLAGS=
46 T_ADA_CFLAGS=
47 # HPPA is literally the only target which sets X_ADA_CFLAGS
48 X_ADA_CFLAGS=@x_ada_cflags@
49 ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
50
51 # For finding the GCC build dir, which is used far too much
52 host_subdir = @host_subdir@
53 GCC_DIR=../../$(host_subdir)/gcc
54 # Include fragment generated by GCC configure.
55 include $(GCC_DIR)/libada-mk
56
57 TARGET_LIBGCC2_CFLAGS=
58 GNATLIBCFLAGS= -g -O2
59 # Get target-specific overrides for TARGET_LIBGCC2_CFLAGS
60 # and possibly GNATLIBCFLAGS.  Currently this uses files
61 # in gcc/config.  The 'subst' call is used to rerelativize them
62 # from their gcc locations.  This is hackery, but there isn't
63 # yet a better way to do this.
64 tmake_file=$(subst /config,/../gcc/config,$(gcc_tmake_file))
65 ifneq ($(tmake_file),)
66 include $(tmake_file)
67 endif
68
69 FLAGS_TO_PASS = \
70         "MAKEOVERRIDES=" \
71         "LDFLAGS=$(LDFLAGS)" \
72         "LN_S=$(LN_S)" \
73         "SHELL=$(SHELL)" \
74         "exeext=$(exeext)" \
75         "objext=$(objext)" \
76         "prefix=$(prefix)" \
77         "STAGE_PREFIX=$(STAGE_PREFIX)" \
78         "CC=$(host_cc_for_libada)" \
79         "GCC_FOR_TARGET=$(CC)" \
80         "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
81
82 # Rules to build gnatlib.
83 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared
84 gnatlib: @default_gnatlib_target@
85
86 gnatlib-plain: $(GCC_DIR)/ada/Makefile
87         test -f stamp-libada || \
88         $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
89           GNATLIBFLAGS="$(GNATLIBFLAGS)" \
90           GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
91           TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
92           THREAD_KIND="$(THREAD_KIND)" \
93           TRACE="$(TRACE)" \
94           gnatlib \
95         && touch stamp-libada
96
97 gnatlib-sjlj gnatlib-zcx gnatlib-shared: $(GCC_DIR)/ada/Makefile
98         test -f stamp-libada || \
99         $(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
100           GNATLIBFLAGS="$(GNATLIBFLAGS)" \
101           GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
102           TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
103           THREAD_KIND="$(THREAD_KIND)" \
104           TRACE="$(TRACE)" \
105           $@ \
106         && touch stamp-libada
107
108 # Check uninstalled version.
109 check:
110
111 # Check installed version.
112 installcheck:
113
114 # Build info (none here).
115 info:
116
117 # Build DVI (none here).
118 dvi:
119
120 # Build PDF (none here).
121 pdf:
122
123 # Build html (none here).
124 html:
125
126 # Build TAGS (none here).
127 TAGS:
128
129 # Installation rules.
130 install:
131
132 install-info:
133
134 install-html:
135
136 # Cleaning rules.
137 mostlyclean:
138
139 clean:
140
141 distclean:
142         $(RM) Makefile config.status config.log
143
144 maintainer-clean:
145
146 # Rules for rebuilding this Makefile.
147 Makefile: $(srcdir)/Makefile.in config.status
148         CONFIG_FILES=$@ ; \
149         CONFIG_HEADERS= ; \
150         $(SHELL) ./config.status
151
152 config.status: $(srcdir)/configure
153         $(SHELL) ./config.status --recheck
154
155 $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
156         cd $(srcdir) && autoconf
157
158 # Don't export variables to the environment, in order to not confuse
159 # configure.
160 .NOEXPORT: