Warning fixes:
[gcc.git] / gcc / ch / Makefile.in
1 # Makefile for GNU CHILL compiler.
2 # Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1998,
3 # 1999 Free Software Foundation, Inc.
4
5 #This file is part of GNU CC.
6
7 #GNU CC is free software; you can redistribute it and/or modify
8 #it under the terms of the GNU General Public License as published by
9 #the Free Software Foundation; either version 2, or (at your option)
10 #any later version.
11
12 #GNU CC is distributed in the hope that it will be useful,
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 #GNU General Public License for more details.
16
17 #You should have received a copy of the GNU General Public License
18 #along with GNU CC; see the file COPYING. If not, write to
19 #the Free Software Foundation, 59 Temple Place - Suite 330,
20 #Boston, MA 02111-1307, USA. */
21
22 # The makefile built from this file lives in the language subdirectory.
23 # It's purpose is to provide support for:
24 #
25 # 1) recursion where necessary, and only then (building .o's), and
26 # 2) building and debugging cc1 from the language subdirectory, and
27 # 3) nothing else.
28 #
29 # The parent makefile handles all other chores, with help from the
30 # language makefile fragment, of course.
31 #
32 # The targets for external use are:
33 # all, TAGS, ???mostlyclean, ???clean.
34
35 # Suppress smart makes who think they know how to automake Yacc files
36 .y.c:
37
38
39 # Variables that exist for you to override.
40 # See below for how to change them for certain systems.
41
42 # Various ways of specifying flags for compilations:
43 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
44 # BOOT_CFLAGS is the value of CFLAGS to pass
45 # to the stage2 and stage3 compilations
46 # XCFLAGS is used for most compilations but not when using the GCC just built.
47 XCFLAGS =
48 CFLAGS = -g
49 BOOT_CFLAGS = -O $(CFLAGS)
50 # These exists to be overridden by the x-* and t-* files, respectively.
51 X_CFLAGS =
52 T_CFLAGS =
53
54 X_CPPFLAGS =
55 T_CPPFLAGS =
56
57 CC = @CC@
58 AR = ar
59 AR_FLAGS = rc
60 SHELL = /bin/sh
61 MAKEINFO = makeinfo
62 TEXI2DVI = texi2dvi
63
64 # Define this as & to perform parallel make on a Sequent.
65 # Note that this has some bugs, and it seems currently necessary
66 # to compile all the gen* files first by hand to avoid erroneous results.
67 P =
68
69 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
70 # It omits XCFLAGS, and specifies -B./.
71 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
72 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
73
74 # Tools to use when building a cross-compiler.
75 # These are used because `configure' appends `cross-make'
76 # to the makefile when making a cross-compiler.
77
78 # CYGNUS LOCAL: we don't use cross-make. Instead we use the tools
79 # from the build tree, if they are available.
80 # program_transform_name and objdir are set by configure.in.
81 program_transform_name =
82 objdir = .
83
84 target=@target@
85 xmake_file=@dep_host_xmake_file@
86 tmake_file=@dep_tmake_file@
87 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
88 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
89
90 # Directory where sources are, from where we are.
91 srcdir = @srcdir@
92 VPATH = @srcdir@
93
94 # CYGNUS LOCAL
95 # Directory where texinfo.tex lives
96 # texidir = $(srcdir)/../../texinfo
97
98 # Top build directory, relative to here.
99 top_builddir = ..
100
101 # Internationalization library.
102 INTLLIBS = @INTLLIBS@
103
104 # Additional system libraries to link with.
105 CLIB=
106
107 # Choose the real default target.
108 ALL=all
109
110 # End of variables for you to override.
111
112 # Definition of `all' is here so that new rules inserted by sed
113 # do not specify the default target.
114 all: all.indirect
115
116 # This tells GNU Make version 3 not to put all variables in the environment.
117 .NOEXPORT:
118
119 # sed inserts variable overrides after the following line.
120 ####target overrides
121 @target_overrides@
122 ####host overrides
123 @host_overrides@
124 ####cross overrides
125 @cross_defines@
126 @cross_overrides@
127 ####build overrides
128 @build_overrides@
129 ####site overrides
130 # @site_overrides@
131 #\f
132 # Now figure out from those variables how to compile and link.
133
134 all.indirect: Makefile ../chill ../cc1chill$(exeext)
135
136 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
137 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
138
139 # This is the variable actually used when we compile.
140 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
141
142 # Likewise.
143 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
144
145 # This is where we get libiberty.a from.
146 LIBIBERTY = ../../libiberty/libiberty.a
147
148 # How to link with both our special library facilities
149 # and the system's installed libraries.
150 LIBS = $(LIBIBERTY) $(CLIB) $(INTLLIBS)
151 LIBDEPS = $(INTLLIBS) $(LIBIBERTY)
152
153 # Specify the directories to be searched for header files.
154 # Both . and srcdir are used, in that order,
155 # so that tm.h and config.h will be found in the compilation
156 # subdirectory rather than in the source directory.
157 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include
158
159 # Flags to pass to recursive makes.
160 # ??? $(CC) may need some work to handle stage[123].
161 # ??? The choices here will need some experimenting with.
162 FLAGS_TO_PASS = \
163 "AR_FLAGS=$(AR_FLAGS)" \
164 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
165 "BISON=$(BISON)" \
166 "BISONFLAGS=$(BISONFLAGS)" \
167 "CC=$(CC)" \
168 "CFLAGS=$(CFLAGS)" \
169 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
170 "LDFLAGS=$(LDFLAGS)" \
171 "LEX=$(LEX)" \
172 "LEXFLAGS=$(LEXFLAGS)" \
173 "MAKEINFO=$(MAKEINFO)" \
174 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
175 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
176 "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
177 "SHELL=$(SHELL)" \
178 "exec_prefix=$(exec_prefix)" \
179 "prefix=$(prefix)" \
180 "tooldir=$(tooldir)" \
181 "bindir=$(bindir)" \
182 "libsubdir=$(libsubdir)"
183
184 # Always use -I$(srcdir)/config when compiling.
185 .c.o:
186 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
187
188 # This tells GNU make version 3 not to export all the variables
189 # defined in this file into the environment.
190 .NOEXPORT:
191 #\f
192 # Lists of files for various purposes.
193
194 # Language-specific object files for CHILL
195
196 #C_OBJS = ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o
197
198 CHILL_OBJS = parse.o actions.o except.o grant.o lang.o \
199 tree.o lex.o decl.o typeck.o convert.o expr.o loop.o \
200 tasking.o timing.o inout.o satisfy.o ch-version.o \
201 ../ggc-callbacks.o
202
203 # Language-independent object files.
204 OBJS = `cat ../stamp-objlist`
205 OBJDEPS = ../stamp-objlist
206
207 ../cc1chill$(exeext): $(P) $(CHILL_OBJS) $(OBJDEPS) $(LIBDEPS)
208 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CHILL_OBJS) \
209 $(OBJS) $(C_OBJS) $(LIBS)
210
211 # This executable is used in the CHILL regression
212 # test script
213 utils/printf : $(srcdir)/utils/printf.c
214 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $<
215
216 #
217 # This is the top-level trigger for a CHILL regression test.
218 # It also builds those tools needed for CHILL regression testing.
219 #
220 check: ../cc1chill$(exeext) utils/printf
221 cd ..; $(MAKE) $(FLAGS_TO_PASS) xgcc gcov cpp cc1 ld
222 $(srcdir)/regression.sh -d -p
223
224 clean-tests:
225 cd testsuite/execute; $(MAKE) clean
226 cd testsuite/execute/oe; $(MAKE) clean
227 cd testsuite/compile/elektra; $(MAKE) clean
228 cd testsuite/compile/votrics; $(MAKE) clean
229 cd testsuite/compile; $(MAKE) clean
230 cd testsuite/noncompile; $(MAKE) clean
231 cd testsuite/examples; $(MAKE) clean
232
233 mostlyclean:
234 test -d testsuite && $(MAKE) clean-tests
235 rm -f *.o
236
237 clean: mostlyclean
238
239 #\f
240 Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
241 cd ..; $(SHELL) config.status
242
243 native: config.status ../cc1chill$(exeext) ../chill
244 #\f
245 # Compiling object files from source files.
246
247 # Note that dependencies on obstack.h are not written
248 # because that file is not part of GCC.
249
250 # CHILL language specific files.
251
252 EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
253 RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
254 $(srcdir)/../machmode.h $(srcdir)/../machmode.def
255 TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \
256 $(srcdir)/../machmode.h $(srcdir)/../machmode.def
257 CHILL_TREE_H = $(TREE_H) ch-tree.h ch-tree.def
258
259 # hash.h really depends on $(srcdir)/gperf.
260 # But this would screw things for people that don't have gperf,
261 # if gperf got touched, say.
262 # Thus you have to remove hash.h to force it to be re-made.
263 # Note: CHILL requires two sets of keywords, one all uppercase and
264 # one all lowercase. The hash table ends up with both sets in it.
265 $(srcdir)/hash.h:
266 sed -e '1,/^%%/d' < $(srcdir)/gperf | \
267 sed '/^[^a-zA-Z]/d' | tr "[a-z]" "[A-Z]" > gperf.tmp2
268 cat $(srcdir)/gperf gperf.tmp2 > gperf.tmp
269 gperf -L C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \
270 gperf.tmp > $(srcdir)/hash.h || ( \
271 echo "Please update your 'gperf' from the GCC infrastructure" >&2 ; \
272 echo " ftp://sourceware.cygnus.com/pub/egcs/infrastructure/gperf*" >&2 ; \
273 exit 1 )
274 $(RM) gperf.tmp gperf.tmp2
275
276 actions.o : actions.c $(CONFIG_H) $(CHILL_TREE_H) actions.h $(RTL_H) \
277 lex.h $(srcdir)/../flags.h $(srcdir)/../input.h \
278 $(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
279 convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
280 $(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
281 $(srcdir)/../convert.h
282 decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
283 $(srcdir)/../system.h $(srcdir)/../toplev.h
284 except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
285 $(srcdir)/../system.h $(srcdir)/../toplev.h
286 expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
287 $(EXPR_H) $(srcdir)/../tree.h lex.h $(srcdir)/../system.h \
288 $(srcdir)/../toplev.h
289 grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
290 $(srcdir)/../input.h lex.h actions.h $(srcdir)/../system.h \
291 $(srcdir)/../toplev.h $(srcdir)/../output.h
292 inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
293 $(srcdir)/../input.h $(srcdir)/../system.h $(srcdir)/../toplev.h
294 lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h \
295 $(srcdir)/../system.h $(srcdir)/../toplev.h $(EXPR_H) $(RTL_H)
296 lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
297 $(srcdir)/../input.h $(srcdir)/parse.h $(srcdir)/../system.h \
298 $(srcdir)/../toplev.h lex.h $(srcdir)/../dwarfout.h hash.h
299 loop.o : loop.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) lex.h \
300 $(srcdir)/../flags.h $(srcdir)/../input.h \
301 $(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h
302 parse.o : parse.c $(CONFIG_H) $(CHILL_TREE_H) parse.h \
303 lex.h actions.h tasking.h $(srcdir)/../system.h $(srcdir)/../toplev.h
304 satisfy.o : satisfy.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../tree.h \
305 $(srcdir)/../flags.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
306 timing.o : timing.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
307 $(srcdir)/../input.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
308 tasking.o : tasking.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) \
309 $(srcdir)/../flags.h $(srcdir)/../input.h \
310 lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
311 tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../system.h \
312 $(srcdir)/../toplev.h
313 typeck.o : typeck.c $(CONFIG_H) $(CHILL_TREE_H) ../insn-codes.h \
314 $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../flags.h lex.h \
315 $(srcdir)/../system.h $(srcdir)/../toplev.h $(srcdir)/../output.h
316 ch-version.o : ch-version.c
317 ch-version.c : Makefile
318 echo 'const char * const gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
319
320 ## This is ugly, but I don't want GNU make to put these variables in
321 ## the environment. Older makes will see this as a set of targets
322 ## with no dependencies and no actions.
323 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
324
325 \f
326 # These exist for maintenance purposes.
327
328 # Update the tags table.
329 TAGS: force
330 cd $(srcdir); \
331 etags *.y *.h *.c *.l ../*.h ../*.c; \
332
333 .PHONY: TAGS
334
335 force: