* decl2.c (start_static_storage_duration_function): Push the
[official-gcc.git] / gcc / java / Makefile.in
blob28e18190fb2092152731a7a914b70d7707458f50
1 # Makefile for GNU compiler for the Java(TM) language.
2 # Copyright (C) 1987, 88, 90-5, 1998, 1999 Free Software Foundation, Inc.
4 #This file is part of GNU CC.
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.
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.
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, 59 Temple Place - Suite 330,
19 #Boston, MA 02111-1307, USA.
21 #Java and all Java-based marks are trademarks or registered trademarks
22 #of Sun Microsystems, Inc. in the United States and other countries.
23 #The Free Software Foundation is independent of Sun Microsystems, Inc.
25 # The makefile built from this file lives in the language subdirectory.
26 # Its purpose is to provide support for:
28 # 1) recursion where necessary, and only then (building .o's), and
29 # 2) building and debugging cc1 from the language subdirectory, and
30 # 3) nothing else.
32 # The parent makefile handles all other chores, with help from the
33 # language makefile fragment, of course.
35 # The targets for external use are:
36 # all, TAGS, ???mostlyclean, ???clean.
38 # Suppress smart makes who think they know how to automake Yacc files
39 .y.c:
41 # Variables that exist for you to override.
42 # See below for how to change them for certain systems.
44 # Various ways of specifying flags for compilations:
45 # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
46 # BOOT_CFLAGS is the value of CFLAGS to pass
47 # to the stage2 and stage3 compilations
48 # XCFLAGS is used for most compilations but not when using the GCC just built.
49 XCFLAGS =
50 CFLAGS = -g
51 BOOT_CFLAGS = -O $(CFLAGS)
52 # These exists to be overridden by the x-* and t-* files, respectively.
53 X_CFLAGS =
54 T_CFLAGS =
56 X_CPPFLAGS =
57 T_CPPFLAGS =
59 CC = @CC@
60 SET_BISON = here=`pwd`; sdir=`cd $(srcdir) && pwd`; if test -f ../../bison; then bison="$$here/../../bison/bison -L $$sdir"; else bison=bison; fi
61 BISONFLAGS =
62 JAVABISONFLAGS = --name-prefix=java_
63 AR = ar
64 AR_FLAGS = rc
65 SHELL = /bin/sh
66 MAKEINFO = makeinfo
67 TEXI2DVI = texi2dvi
69 # Define this as & to perform parallel make on a Sequent.
70 # Note that this has some bugs, and it seems currently necessary
71 # to compile all the gen* files first by hand to avoid erroneous results.
72 P =
74 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
75 # It omits XCFLAGS, and specifies -B./.
76 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
77 GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
79 # Tools to use when building a cross-compiler.
80 # These are used because `configure' appends `cross-make'
81 # to the makefile when making a cross-compiler.
83 # We don't use cross-make. Instead we use the tools
84 # from the build tree, if they are available.
85 # program_transform_name and objdir are set by configure.in.
86 program_transform_name =
87 objdir = .
89 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
90 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
92 # Directory where sources are, from where we are.
93 srcdir = @srcdir@
94 VPATH = @srcdir@
96 # Directory holding libgcj.zip.
97 prefix = @prefix@
98 datadir = @datadir@
99 libgcj_zip = $(datadir)/libgcj.zip
101 # Additional system libraries to link with.
102 CLIB=
104 # Choose the real default target.
105 ALL=all
107 # End of variables for you to override.
109 # Definition of `all' is here so that new rules inserted by sed
110 # do not specify the default target.
111 all: all.indirect
113 # This tells GNU Make version 3 not to put all variables in the environment.
114 .NOEXPORT:
116 # sed inserts variable overrides after the following line.
117 ####target overrides
118 @target_overrides@
119 ####host overrides
120 @host_overrides@
121 ####cross overrides
122 @cross_overrides@
123 ####build overrides
124 @build_overrides@
125 ####site overrides
127 # Now figure out from those variables how to compile and link.
129 all.indirect: Makefile ../jc1$(exeext) ../jcf-dump$(exeext) \
130 ../jvgenmain$(exeext) ../gcjh$(exeext) ../jv-scan$(exeext)
132 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
133 INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
135 # This is the variable actually used when we compile.
136 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall
138 # Likewise.
139 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
141 # This is where we get libiberty.a from.
142 LIBIBERTY = ../../libiberty/libiberty.a
144 # How to link with both our special library facilities
145 # and the system's installed libraries.
146 LIBS = $(LIBIBERTY) $(CLIB)
147 LIBDEPS = $(LIBIBERTY)
149 # Specify the directories to be searched for header files.
150 # Both . and srcdir are used, in that order,
151 # so that tm.h and config.h will be found in the compilation
152 # subdirectory rather than in the source directory.
153 INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include
155 # Always use -I$(srcdir)/config when compiling.
156 .c.o:
157 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
160 # Lists of files for various purposes.
162 # Language-specific object files for Gcc/Java:
164 # Remember to keep this list in sync with JAVA_SRCS in Make-lang.in!!!
166 JAVA_OBJS = parse.o class.o decl.o expr.o constants.o lang.o typeck.o \
167 except.o verify.o zextract.o jcf-io.o jcf-parse.o mangle.o jcf-write.o \
168 buffer.o check-init.o jcf-depend.o jcf-path.o xref.o
170 JAVA_OBJS_LITE = parse-scan.o jv-scan.o
172 # Language-independent object files.
173 OBJS = `cat ../stamp-objlist` ../ggc-callbacks.o
174 OBJDEPS = ../stamp-objlist ../ggc-callbacks.o
176 compiler: ../jc1$(exeext) ../jv-scan$(exeext)
177 ../jc1$(exeext): $(P) $(JAVA_OBJS) $(OBJDEPS) $(LIBDEPS)
178 rm -f ../jc1$(exeext)
179 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS) $(OBJS) $(LIBS)
180 ../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) $(OBJDEPS) $(LIBDEPS)
181 rm -f ../jv-scan$(exeext)
182 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS_LITE) $(LIBS)
184 ../jcf-dump$(exeext): jcf-dump.o jcf-io.o jcf-depend.o jcf-path.o \
185 zextract.o $(LIBDEPS)
186 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jcf-dump.o jcf-io.o \
187 jcf-depend.o jcf-path.o zextract.o $(LIBS)
189 # Dependencies here must be kept in sync with dependencies in Make-lang.in.
190 ../jvgenmain$(exeext): jvgenmain.o mangle.o $(LIBDEPS)
191 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jvgenmain.o mangle.o $(LIBS)
193 ../gcjh$(exeext): gjavah.o jcf-io.o jcf-depend.o jcf-path.o \
194 zextract.o $(LIBDEPS)
195 $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gjavah.o jcf-io.o \
196 jcf-depend.o jcf-path.o zextract.o $(LIBS)
198 Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
199 cd ..; $(SHELL) config.status
201 native: config.status ../jc1$(exeext)
203 # Compiling object files from source files.
204 TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \
205 $(srcdir)/../machmode.h $(srcdir)/../machmode.def ../tree-check.h
206 JAVA_TREE_H = $(TREE_H) java-tree.h java-tree.def
207 RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
208 $(srcdir)/../machmode.h $(srcdir)/../machmode.def ../genrtl.h
209 EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
211 # Separating PARSE_DIR from PARSE_RELDIR lets us easily change the
212 # code to support building parse.c in the build directory, at some
213 # expense in readability.
214 PARSE_DIR = $(srcdir)
215 PARSE_RELDIR = .
216 PARSE_C = $(PARSE_DIR)/parse.c
217 PARSE_SCAN_C = $(PARSE_DIR)/parse-scan.c
218 PARSE_H = $(srcdir)/parse.h
220 $(PARSE_C): $(srcdir)/parse.y $(srcdir)/lex.c $(PARSE_H) $(srcdir)/lex.h
221 $(SET_BISON); \
222 cd $(PARSE_DIR) && $$bison -t $(BISONFLAGS) $(JAVABISONFLAGS) \
223 -o parse.c $(PARSE_RELDIR)/parse.y
224 $(PARSE_SCAN_C): $(srcdir)/parse-scan.y $(srcdir)/lex.c $(PARSE_H) \
225 $(srcdir)/lex.h
226 $(SET_BISON); \
227 cd $(PARSE_DIR) && $$bison -t $(BISONFLAGS) -o parse-scan.c \
228 $(PARSE_RELDIR)/parse-scan.y
230 lex.c: keyword.h lex.h
232 lang.o: $(srcdir)/java-tree.def
234 keyword.h: keyword.gperf
235 gperf -L C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$$ \
236 keyword.gperf > keyword.h || ( \
237 echo "Please update your 'gperf' from the GCC infrastructure" >&2 ; \
238 echo " ftp://sourceware.cygnus.com/pub/egcs/infrastructure/gperf*" >&2 ; \
239 exit 1 )
241 jcf-path.o : jcf-path.c $(CONFIG_H) $(srcdir)/../system.h jcf.h
242 $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
243 -DLIBGCJ_ZIP_FILE='"$(libgcj_zip)"' $(srcdir)/jcf-path.c
245 # These exist for maintenance purposes.
247 # Update the tags table.
248 TAGS: force
249 cd $(srcdir) ; \
250 etags *.c *.h ; \
251 echo 'l' | tr 'l' '\f' >> TAGS ; \
252 echo 'parse.y,0' >> TAGS ; \
253 etags -a ../*.h ../*.c;
255 .PHONY: TAGS
257 mostlyclean:
258 rm -f *.o
260 clean: mostlyclean
262 force:
264 parse.o : $(PARSE_C) jcf-reader.c $(CONFIG_H) $(srcdir)/../system.h \
265 $(srcdir)/../function.h $(JAVA_TREE_H)
266 jcf-dump.o : $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H) jcf-dump.c \
267 jcf-reader.c jcf.h javaop.h javaop.def
268 gjavah.o : $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H) gjavah.c \
269 jcf-reader.c jcf.h javaop.h
270 buffer.o : buffer.c $(CONFIG_H) buffer.h $(srcdir)/../gansidecl.h \
271 $(srcdir)/../system.h $(srcdir)/../toplev.h
272 check-init.o : check-init.c $(CONFIG_H) $(srcdir)/../gansidecl.h \
273 $(JAVA_TREE_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
274 class.o : class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) jcf.h $(PARSE_H) \
275 $(srcdir)/../gansidecl.h $(srcdir)/../toplev.h $(srcdir)/../system.h \
276 $(srcdir)/../output.h
277 constants.o : constants.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h \
278 $(srcdir)/../toplev.h $(srcdir)/../system.h
279 decl.o : decl.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h \
280 $(srcdir)/../toplev.h $(srcdir)/../system.h $(srcdir)/../function.h \
281 $(srcdir)/../defaults.h
282 except.o : except.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../real.h \
283 $(RTL_H) javaop.h java-opcodes.h $(srcdir)/../except.h java-except.h \
284 $(srcdir)/../eh-common.h $(srcdir)/../toplev.h $(srcdir)/../system.h \
285 $(srcdir)/../function.h
286 expr.o : expr.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../real.h \
287 $(RTL_H) $(EXPR_H) javaop.h java-opcodes.h $(srcdir)/../except.h \
288 java-except.h java-except.h parse.h $(srcdir)/../toplev.h \
289 $(srcdir)/../system.h
290 jcf-depend.o : jcf-depend.c $(CONFIG_H) $(srcdir)/../system.h jcf.h
291 jcf-io.o : jcf-io.c $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H)
292 jcf-parse.o : jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(srcdir)/../flags.h \
293 $(srcdir)/../input.h java-except.h $(srcdir)/../system.h \
294 $(srcdir)/../toplev.h $(PARSE_H)
295 jcf-write.o : jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(RTL_H) \
296 java-opcodes.h parse.h buffer.h $(srcdir)/../system.h $(srcdir)/../toplev.h
297 jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h
298 jvgenmain.o : jvgenmain.c $(CONFIG_H) $(srcdir)/../system.h
299 lang.o : lang.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../input.h \
300 $(srcdir)/../toplev.h $(srcdir)/../system.h $(RTL_H) $(EXPR_H)
301 mangle.o : mangle.c $(CONFIG_H) jcf.h $(JAVA_TREE_H) $(srcdir)/../system.h \
302 $(srcdir)/../toplev.h
303 parse-scan.o : $(CONFIG_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
304 typeck.o : typeck.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h convert.h \
305 $(srcdir)/../toplev.h $(srcdir)/../system.h
306 verify.o : verify.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h javaop.h java-opcodes.h \
307 java-except.h $(srcdir)/../toplev.h $(srcdir)/../system.h
308 xref.o : xref.c xref.h $(CONFIG_H) $(JAVA_TREE_H) $(srcdir)/../toplev.h \
309 $(srcdir)/../system.h
310 zextract.o : zextract.c $(CONFIG_H) $(srcdir)/../system.h zipfile.h