]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/Makefile.in
Initial revision
[gcc.git] / gcc / cp / Makefile.in
1 # Makefile for GNU C++ compiler.
2 # Copyright (C) 1987, 88, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
3
4 #This file is part of GNU CC.
5
6 #GNU CC 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 2, or (at your option)
9 #any later version.
10
11 #GNU CC 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.
15
16 #You should have received a copy of the GNU General Public License
17 #along with GNU CC; see the file COPYING. If not, write to
18 #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 # The targets for external use include:
21 # all, doc, TAGS, mostlyclean, clean, distclean, realclean,
22
23 # Suppress smart makes who think they know how to automake Yacc files
24 .y.c:
25
26 # Variables that exist for you to override.
27 # See below for how to change them for certain systems.
28
29 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config
30
31 # Various ways of specifying flags for compilations:
32 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
33 # BOOT_CFLAGS is the value of CFLAGS to pass
34 # to the stage2 and stage3 compilations
35 # XCFLAGS is used for most compilations but not when using the GCC just built.
36 XCFLAGS =
37 CFLAGS = -g
38 BOOT_CFLAGS = -O $(CFLAGS)
39 # These exists to be overridden by the x-* and t-* files, respectively.
40 X_CFLAGS =
41 T_CFLAGS =
42
43 X_CPPFLAGS =
44 T_CPPFLAGS =
45
46 CC = cc
47 # CYGNUS LOCAL: we use byacc instead of bison, DO NOT SEND TO RMS
48 BISON = `if [ -f ../../byacc/byacc ] ; then echo ../../byacc/byacc ; else echo byacc ; fi`
49 BISONFLAGS =
50 LEX = `if [ -f ../../flex/flex ] ; then echo ../../flex/flex ; else echo flex ; fi`
51 LEXFLAGS=
52 AR = ar
53 OLDAR_FLAGS = qc
54 AR_FLAGS = rc
55 SHELL = /bin/sh
56 MAKEINFO = makeinfo
57 TEXI2DVI = texi2dvi
58
59 # Define this as & to perform parallel make on a Sequent.
60 # Note that this has some bugs, and it seems currently necessary
61 # to compile all the gen* files first by hand to avoid erroneous results.
62 P =
63
64 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
65 # It omits XCFLAGS, and specifies -B./.
66 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
67 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
68
69 # Tools to use when building a cross-compiler.
70 # These are used because `configure' appends `cross-make'
71 # to the makefile when making a cross-compiler.
72
73 # CYGNUS LOCAL: we don't use cross-make. Instead we use the tools
74 # from the build tree, if they are available.
75 # program_transform_name and objdir are set by configure.in.
76 program_transform_name =
77 objdir = .
78
79 target= ... `configure' substitutes actual target name here.
80 xmake_file= ... `configure' substitutes actual x- file name here.
81 tmake_file= ... `configure' substitutes actual t- file name here.
82 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
83 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
84
85 # Directory where sources are, from where we are.
86 srcdir = .
87
88 # Change this to a null string if obstacks are installed in the
89 # system library.
90 OBSTACK=obstack.o
91
92 # Directory to link to, when using the target `maketest'.
93 DIR = ../gcc
94
95 # Choose the real default target.
96 ALL=all
97
98 # End of variables for you to override.
99
100 # Definition of `all' is here so that new rules inserted by sed
101 # do not specify the default target.
102 all: all.indirect
103
104 # This tells GNU Make version 3 not to put all variables in the environment.
105 .NOEXPORT:
106
107 # sed inserts variable overrides after the following line.
108 ####target overrides
109 ####host overrides
110 ####cross overrides
111 ####build overrides
112 ####site overrides
113 \f
114 # Now figure out from those variables how to compile and link.
115
116 all.indirect: Makefile ../cc1plus
117
118 # IN_GCC tells obstack.h to use gstddef.h.
119 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
120
121 # This is the variable actually used when we compile.
122 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
123
124 # Likewise.
125 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
126
127 SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo ../$(OBSTACK); else true; fi`
128 SUBDIR_USE_ALLOCA = `if [ x$(USE_ALLOCA) != x ]; then echo ../$(USE_ALLOCA); else true; fi`
129 SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo ../$(MALLOC); else true; fi`
130
131 # How to link with both our special library facilities
132 # and the system's installed libraries.
133 LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)
134
135 # Always use -I$(srcdir)/config when compiling.
136 .c.o:
137 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
138
139 # This tells GNU make version 3 not to export all the variables
140 # defined in this file into the environment.
141 .NOEXPORT:
142 \f
143 # Lists of files for various purposes.
144
145 # Language-specific object files for g++
146
147 CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \
148 class.o decl2.o error.o gc.o lex.o parse.o ptree.o spew.o typeck.o cvt.o \
149 edsel.o except.o init.o method.o search.o tree.o xref.o
150
151 # Files specific to the C interpreter bytecode compiler(s).
152 BC_OBJS = ../bc-emit.o ../bc-optab.o
153
154 # Language-independent object files.
155 OBJS = ../toplev.o ../version.o ../tree.o ../print-tree.o ../stor-layout.o ../fold-const.o \
156 ../function.o ../stmt.o ../expr.o ../calls.o ../expmed.o ../explow.o ../optabs.o ../varasm.o \
157 ../rtl.o ../print-rtl.o ../rtlanal.o ../emit-rtl.o ../real.o \
158 ../dbxout.o ../sdbout.o ../dwarfout.o ../xcoffout.o \
159 ../integrate.o ../jump.o ../cse.o ../loop.o ../unroll.o ../flow.o ../stupid.o ../combine.o \
160 ../regclass.o ../local-alloc.o ../global.o ../reload.o ../reload1.o ../caller-save.o \
161 ../insn-peep.o ../reorg.o ../sched.o ../final.o ../recog.o ../reg-stack.o \
162 ../insn-opinit.o ../insn-recog.o ../insn-extract.o ../insn-output.o ../insn-emit.o \
163 ../insn-attrtab.o ../aux-output.o ../getpwd.o ../convert.o \
164 ../c-common.o
165
166 compiler: ../cc1plus
167 ../cc1plus: $(P) $(CXX_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
168 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o ../cc1plus \
169 $(CXX_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
170
171 \f
172 Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
173 cd ..; $(SHELL) config.status
174
175 native: config.status ../cc1plus
176
177 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
178 # a target to build even if it is up-to-date. So we must verify that
179 # config.status does not exist before failing.
180 config.status:
181 @if [ ! -f config.status ] ; then \
182 echo You must configure gcc. Look at the ../INSTALL file for details.; \
183 false; \
184 else \
185 true; \
186 fi
187
188 \f
189 # Compiling object files from source files.
190
191 # Note that dependencies on obstack.h are not written
192 # because that file is not part of GCC.
193 # Dependencies on gvarargs.h are not written
194 # because all that file does, when not compiling with GCC,
195 # is include the system varargs.h.
196
197 # C++ language specific files.
198
199 TREE_H = ../tree.h ../real.h ../tree.def ../machmode.h ../machmode.def
200 CXX_TREE_H = $(TREE_H) cp-tree.h tree.def
201
202 parse.o : $(srcdir)/parse.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h lex.h
203 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(BIG_SWITCHFLAG) \
204 `echo $(srcdir)/parse.c | sed 's,^\./,,'`
205
206 $(srcdir)/parse.c $(srcdir)/parse.h : $(srcdir)/parse.y
207 @echo expect 28 shift/reduce conflicts, 14 reduce/reduce conflicts.
208 cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o parse.c parse.y
209 cd $(srcdir); grep '^#define[ ]*YYEMPTY' parse.c >>parse.h
210
211 # hash.h really depends on $(srcdir)/gxx.gperf.
212 # But this would screw things for people that don't have gperf,
213 # if gxx.gpref got touched, say.
214 # Thus you have to remove hash.h to force it to be re-made.
215 $(srcdir)/hash.h:
216 gperf -p -j1 -g -o -t -N is_reserved_word '-k1,4,7,$$' \
217 $(srcdir)/gxx.gperf >$(srcdir)/hash.h
218
219 spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) \
220 parse.h ../flags.h lex.h
221 lex.o : lex.c $(CONFIG_H) $(CXX_TREE_H) \
222 parse.h input.c ../flags.h hash.h lex.h
223 decl.o : decl.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h \
224 lex.h decl.h ../stack.h
225 decl2.o : decl2.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h \
226 lex.h decl.h
227 typeck2.o : typeck2.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h
228 typeck.o : typeck.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h $(RTL_H)
229 class.o : class.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h
230 call.o : call.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h class.h
231 init.o : init.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h $(RTL_H)
232 method.o : method.c $(CONFIG_H) $(CXX_TREE_H) class.h
233 cvt.o : cvt.c $(CONFIG_H) $(CXX_TREE_H) class.h
234 search.o : search.c $(CONFIG_H) $(CXX_TREE_H) ../stack.h ../flags.h
235 tree.o : tree.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h
236 ptree.o : ptree.c $(CONFIG_H) $(CXX_TREE_H)
237 gc.o : gc.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h
238 except.o : except.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h $(RTL_H)
239 expr.o : expr.c $(CONFIG_H) $(CXX_TREE_H) $(RTL_H) ../flags.h \
240 ../expr.h ../insn-codes.h
241 edsel.o : edsel.c $(CONFIG_H) $(CXX_TREE_H) ../stack.h ../flags.h
242 xref.o : xref.c $(CONFIG_H) $(CXX_TREE_H) ../input.h
243 pt.o : pt.c $(CONFIG_H) $(CXX_TREE_H) decl.h parse.h
244 error.o : error.c $(CONFIG_H) $(CXX_TREE_H)
245 errfn.o : errfn.c $(CONFIG_H) $(CXX_TREE_H)
246 sig.o : sig.c $(CONFIG_H) $(CXX_TREE_H) ../flags.h
247
248 doc: info
249 info:
250
251 dvi:
252
253 \f
254 # Deletion of files made during compilation.
255 # There are four levels of this:
256 # `mostlyclean', `clean', `distclean' and `realclean'.
257 # `mostlyclean' is useful while working on a particular type of machine.
258 # It deletes most, but not all, of the files made by compilation.
259 # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
260 # `clean' deletes everything made by running `make all'.
261 # `distclean' also deletes the files made by config.
262 # `realclean' also deletes everything that could be regenerated automatically.
263
264
265 mostlyclean:
266 # Delete the stamp files.
267 -rm -f stamp-* tmp-*
268 # Delete debugging dump files.
269 -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
270 -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
271 # Delete unwanted output files from TeX.
272 -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
273 # Delete sorted indices we don't actually use.
274 -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
275 -rm -f *.o ../cc1plus
276
277 # Delete all files made by compilation
278 # that don't exist in the distribution.
279 clean: mostlyclean
280 -rm -f *.dvi
281
282 # Delete all files that users would normally create
283 # while building and installing GCC.
284 distclean: clean
285 -rm -f config.status Makefile *.oaux
286 -rm -f parse.output
287
288 # Delete anything likely to be found in the source directory
289 # that shouldn't be in the distribution.
290 extraclean: distclean
291 -rm -rf =* ./"#"* *~*
292 -rm -f patch* *.orig *.rej
293 -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
294 -rm -f *.s *.s[0-9] *.i
295
296 # Get rid of every file that's generated from some other file.
297 # Most of these files ARE PRESENT in the GCC distribution.
298 realclean: distclean
299 -rm -f TAGS
300 -rm -f parse.c parse.h parse.output
301 \f
302 # These exist for maintenance purposes.
303
304 # This target creates the files that can be rebuilt, but go in the
305 # distribution anyway.
306 distdir: parse.c hash.h
307
308 # Update the tags table.
309 TAGS: force
310 cd $(srcdir) ; \
311 etags *.c *.h ; \
312 echo 'l' | tr 'l' '\f' >> TAGS ; \
313 echo 'parse.y,0' >> TAGS ; \
314 etags -a ../*.h ../*.c;
315
316 .PHONY: clean realclean TAGS
317
318 force:
This page took 0.046222 seconds and 5 git commands to generate.