OSDN Git Service

2006-06-22 Thomas Fitzsimmons <fitzsim@redhat.com>
[pf3gnuchains/gcc-fork.git] / libjava / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 AUTOMAKE_OPTIONS = foreign subdir-objects
4
5 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
6
7 # May be used by various substitution variables.
8 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
9
10 SUBDIRS = $(DIRLTDL) gcj include classpath
11 if TESTSUBDIR
12 SUBDIRS += testsuite
13 endif
14
15 # write_entries_to_file - writes each entry in a list
16 # to the specified file. Each entry is written individually
17 # to accomodate systems with severe command-line-length
18 # limitations.
19 # Parameters:
20 # $(1): variable containing entries to iterate over
21 # $(2): output file
22 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2)))
23
24 ## ################################################################
25
26 # autoconf2.13's target_alias
27 target_noncanonical = @target_noncanonical@
28
29 # This is required by TL_AC_GXX_INCLUDE_DIR.
30 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
31
32 ##
33 ## What gets installed, and where.
34 ##
35
36 toolexeclib_LTLIBRARIES = libgcj.la libgij.la
37 toolexecmainlib_DATA = libgcj.spec
38
39 if XLIB_AWT
40 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
41 endif
42
43 dbexec_LTLIBRARIES = libjvm.la
44
45 pkgconfigdir = $(libdir)/pkgconfig
46 pkgconfig_DATA = libgcj.pc
47
48 jardir = $(datadir)/java
49 jar_DATA = libgcj-$(gcc_version).jar
50
51 if JAVA_HOME_SET
52 JAVA_HOME_DIR = $(JAVA_HOME)
53 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
54 else
55 JAVA_HOME_DIR = $(prefix)
56 BOOT_CLASS_PATH_DIR = $(jardir)/$(jar_DATA)
57 endif
58
59 ## FIXME: Using libdir violates GNU coding standards.
60 secdir = $(libdir)/security
61 ## Where to install default logging property file.
62 propdir = $(libdir)
63
64 ## Name of the default .db.
65 db_name = classmap.db
66 ## Compiler specific component of the .db file
67 db_pathtail = gcj-$(gcc_version)/$(db_name)
68
69 ## For now, only on native systems.  FIXME.
70 if NATIVE
71 bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool
72
73 ## It is convenient to actually build and install the default database
74 ## when gcj-dbtool is available.
75 dbexec_DATA = $(db_name)
76 endif
77
78 bin_SCRIPTS = addr2name.awk
79
80 ## ################################################################
81
82 ##
83 ## Compilers and compilation flags.
84 ##
85
86 if BASH_JAR
87 bin_SCRIPTS += scripts/jar
88 endif
89
90 ## The compiler with whatever flags we want for both -c and -C
91 ## compiles.
92 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
93
94 extra_ldflags_libjava = @extra_ldflags_libjava@
95
96 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
97           $(LDFLAGS) -o $@
98 LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
99           $(LDFLAGS) $(extra_ldflags_libjava) -o $@
100
101 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
102
103 WARNINGS = -Wextra -Wall
104 ## Some systems don't allow `$' in identifiers by default, so we force
105 ## it with -fdollars-in-identifiers.  -Wswitch-enum detects bugs in
106 ## the verifier implementation, and maybe other places.  We need
107 ## _GNU_SOURCE defined for some Linux builds.  It doesn't hurt to
108 ## always define it.  Some systems, including Linux, need
109 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
110 AM_CXXFLAGS = \
111         -fno-rtti \
112         -fnon-call-exceptions \
113         $(THREADCXXFLAGS) \
114         -fdollars-in-identifiers \
115         -Wswitch-enum \
116         -D_FILE_OFFSET_BITS=64 \
117         @LIBGCJ_CXXFLAGS@ \
118         @X_CFLAGS@ \
119         $(WARNINGS) \
120         -D_GNU_SOURCE \
121         -DPREFIX="\"$(prefix)\"" \
122         -DLIBDIR="\"$(libdir)\"" \
123         -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
124         -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
125         -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
126         -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
127         -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
128         -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
129         -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
130         -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
131         -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
132
133 AM_GCJFLAGS = \
134         @LIBGCJ_JAVAFLAGS@ \
135         -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
136         --encoding=UTF-8 \
137         -Wno-deprecated -fbootstrap-classes
138
139 AM_CFLAGS = @LIBGCJ_CFLAGS@
140 if USING_GCC
141 AM_CFLAGS += $(WARNINGS)
142 endif
143
144 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
145 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
146
147 JCFLAGS = -g
148 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
149
150 LIBFFIINCS = @LIBFFIINCS@
151
152 AM_CPPFLAGS = -I$(top_srcdir) \
153         -Iinclude -I$(top_srcdir)/include \
154         -I$(top_srcdir)/classpath/include \
155         -Iclasspath/include \
156         -I$(top_srcdir)/classpath/native/fdlibm \
157         $(GCINCS) $(THREADINCS) $(INCLTDL) \
158         $(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
159
160 BOOTCLASSPATH = $(here)/classpath/lib
161
162 ## ################################################################
163
164 all_property_files = $(property_files) \
165     java/util/logging/logging.properties
166
167 ##
168 ## How to build libgcj.a and libgcj.jar
169 ##
170
171 libgij_la_SOURCES = gij.cc
172 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
173 ## See jv_convert_LDADD.
174 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
175 ## The mysterious backslash in the grep pattern is consumed by make.
176 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
177         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
178
179 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
180         link.cc defineclass.cc interpret.cc verify.cc \
181         java/lang/Class.java java/lang/Object.java \
182         $(nat_source_files)
183
184 if USING_BOEHMGC
185 libgcj_la_SOURCES += boehm.cc
186 endif
187
188 if USING_NOGC
189 libgcj_la_SOURCES += nogc.cc
190 endif
191
192 if USING_POSIX_PLATFORM
193 libgcj_la_SOURCES += posix.cc
194 endif
195
196 if USING_WIN32_PLATFORM
197 libgcj_la_SOURCES += win32.cc
198 endif
199
200 if USING_DARWIN_CRT
201 libgcj_la_SOURCES += darwin.cc
202 endif
203
204 if USING_POSIX_THREADS
205 libgcj_la_SOURCES += posix-threads.cc
206 endif
207
208 if USING_WIN32_THREADS
209 libgcj_la_SOURCES += win32-threads.cc
210 endif
211
212 if USING_NO_THREADS
213 libgcj_la_SOURCES += no-threads.cc
214 endif
215
216 ## Objects from C++ sources in subdirs.
217 nat_files = $(nat_source_files:.cc=.lo)
218 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
219
220 # Include THREADLIBS here to ensure that the correct version of
221 # certain linuxthread functions get linked:
222 ## The mysterious backslash in the grep pattern is consumed by make.
223 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
224         $(LIBLTDL) $(SYS_ZLIBS) \
225         -version-info `grep -v '^\#' $(srcdir)/libtool-version`
226 libgcj_la_LIBADD = \
227         classpath/native/fdlibm/libfdlibm.la \
228         $(all_packages_source_files:.list=.lo) \
229         $(bc_objects) \
230         $(propertyo_files) \
231         $(LIBFFI) $(ZLIBS) $(GCLIBS)
232 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
233         $(all_packages_source_files:.list=.lo) \
234         $(LIBLTDL) $(libgcj_la_LIBADD)
235 libgcj_la_LINK = $(LIBLINK)
236
237 ## libjvm.so
238 libjvm_la_SOURCES = jni-libjvm.cc
239 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
240 ## See jv_convert_LDADD.
241 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
242 ## The mysterious backslash in the grep pattern is consumed by make.
243 libjvm_la_LDFLAGS = \
244         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
245
246 ## The .db file.  This rule is only used for native builds, so it is
247 ## safe to invoke gcj-dbtool.
248 $(db_name): gcj-dbtool$(EXEEXT)
249 ## In case it exists already.
250         @rm -f $(db_name)
251 ## We don't actually care if it fails -- if it does, just make an
252 ## empty file.  This is simpler than trying to discover when mmap is
253 ## not available.
254         ./gcj-dbtool -n $(db_name) || touch $(db_name)
255
256 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
257 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
258 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
259         libgcj.la libgcj.spec \
260         $(lib_gnu_awt_xlib_la_LIBADD)
261 ## We require libstdc++-v3 to be in the same build tree.
262 lib_gnu_awt_xlib_la_CPPFLAGS = \
263         $(AM_CPPFLAGS) \
264         -I../libstdc++-v3/include \
265         -I../libstdc++-v3/include/$(target_noncanonical) \
266         -I$(srcdir)/../libstdc++-v3/libsupc++
267 ## The mysterious backslash in the grep pattern is consumed by make.
268 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
269         @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
270         -rpath $(toolexeclibdir) \
271         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
272 lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
273
274 ## Note that property_files is defined in sources.am.
275 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
276
277 $(propertyo_files): %.lo: classpath/resource/%
278         $(mkinstalldirs) `dirname $@`; \
279         $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
280
281 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
282         cd classpath/lib; $(JAR) -cfM \
283             ../../libgcj-$(gcc_version).jar gnu java javax org
284
285 CLEANFILES = libgcj-$(gcc_version).jar
286 DISTCLEANFILES = native.dirs
287
288 mostlyclean-local:
289 ## Use libtool rm to remove each libtool object
290         find . -name '*.lo' -print | xargs $(LIBTOOL) rm -f
291
292 distclean-local:
293 ## Remove every .d file that was created.
294         find . -name '*.d' -print | xargs rm -f
295
296 # Just remove the objects from C++ sources, for testing the C++ compiler.
297 clean-nat:
298         rm -f $(nat_files) $(xlib_nat_files)
299
300 SUFFIXES = .class .java .h .properties .list
301
302 ## Pass the list of object files to libtool in a temporary file to
303 ## avoid tripping platform command line length limits.
304 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
305         @echo Creating list of files to link...
306         @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
307         $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
308         -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
309
310 ## ################################################################
311
312 ## Compiling a list of java sources to a single .o.
313
314 %.lo: %.list
315         $(LTGCJCOMPILE) -c -o $@ -MT $@ -MD -MP -MF $(basename $@).deps @$<
316
317 ## ################################################################
318
319 ## This pulls in a number of variable and target definitions.
320 include sources.am
321
322 ## ################################################################
323
324 ##
325 ## How to build header files.
326 ##
327
328 ## We have special rules for certain headers.
329 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
330         java/lang/String.h java/lang/reflect/Constructor.h \
331         java/lang/reflect/Field.h java/lang/reflect/Method.h \
332         java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
333
334 generic_header_files = $(filter-out $(omitted_headers),$(ordinary_header_files) $(xlib_nat_headers)) \
335         gnu/gcj/tools/gcj_dbtool/Main.h
336
337 $(generic_header_files): %.h: classpath/lib/%.class
338         name=`echo $< | sed -e 's/\.class$$//' -e 's,classpath/lib/,,'`; \
339         $(mkinstalldirs) `dirname $$name`; \
340         $(GCJH) -d . -classpath '' -bootclasspath classpath/lib $$name
341
342 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
343         java/io/ObjectInputStream$$GetField.h \
344         java/nio/DirectByteBufferImpl$$ReadWrite.h \
345         java/nio/channels/Pipe$$SinkChannel.h \
346         java/nio/channels/Pipe$$SourceChannel.h \
347         java/lang/reflect/Proxy$$ProxyData.h \
348         java/lang/reflect/Proxy$$ProxyType.h \
349         gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
350         gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
351         gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
352         gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
353         $(PLATFORM_INNER_NAT_HDRS)
354
355 nat_headers = $(ordinary_header_files) $(inner_nat_headers) \
356         gnu/gcj/tools/gcj_dbtool/Main.h
357 nat_headers_install = $(ordinary_header_files)
358
359 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
360
361 java/lang/ClassLoader.h: classpath/lib/java/lang/ClassLoader.class
362         $(GCJH) -classpath '' -bootclasspath classpath/lib \
363                 -prepend 'jclass _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
364                 -prepend 'void _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
365                 -friend 'jclass (::_Jv_FindClass) (_Jv_Utf8Const *name, java::lang::ClassLoader *loader);' \
366                 -friend 'void ::_Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, bool is_jar);' \
367                 java/lang/ClassLoader
368
369 java/lang/Thread.h: classpath/lib/java/lang/Thread.class
370         $(GCJH) -classpath '' -bootclasspath classpath/lib \
371                 -prepend 'class _Jv_JNIEnv;' \
372                 -prepend '#define _JV_NOT_OWNER 1' \
373                 -prepend '#define _JV_INTERRUPTED 2' \
374                 -prepend '_Jv_JNIEnv * _Jv_GetCurrentJNIEnv ();' \
375                 -prepend 'void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
376                 -prepend 'void _Jv_ThreadRun (java::lang::Thread* thread);' \
377                 -prepend 'jint _Jv_AttachCurrentThread(java::lang::Thread* thread);' \
378                 -prepend 'java::lang::Thread* _Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
379                 -prepend 'java::lang::Thread* _Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
380                 -prepend 'jint _Jv_DetachCurrentThread ();' \
381                 -friend '_Jv_JNIEnv * ::_Jv_GetCurrentJNIEnv ();' \
382                 -friend 'void ::_Jv_SetCurrentJNIEnv (_Jv_JNIEnv *env);' \
383                 -friend 'void ::_Jv_ThreadRun (java::lang::Thread* thread);' \
384                 -friend 'jint (::_Jv_AttachCurrentThread) (java::lang::Thread* thread);' \
385                 -friend 'java::lang::Thread* ::_Jv_AttachCurrentThread (jstring name, java::lang::ThreadGroup* group);' \
386                 -friend 'java::lang::Thread* ::_Jv_AttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group);' \
387                 -friend 'jint (::_Jv_DetachCurrentThread) ();' \
388                 java/lang/Thread
389
390 java/lang/String.h: classpath/lib/java/lang/String.class
391         $(GCJH) -classpath '' -bootclasspath classpath/lib \
392             -prepend 'jchar* _Jv_GetStringChars (jstring str);' \
393             -prepend 'jstring* _Jv_StringFindSlot (jchar*, jint, jint);' \
394             -prepend 'jstring* _Jv_StringGetSlot (jstring);' \
395             -prepend 'jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);' \
396             -prepend 'jstring _Jv_NewStringLatin1 (const char*, jsize);' \
397             -prepend 'jstring _Jv_AllocString (jsize);' \
398             -friend 'jchar* ::_Jv_GetStringChars (jstring str);' \
399             -friend 'jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);' \
400             -friend 'jstring* ::_Jv_StringGetSlot (jstring);' \
401             -friend 'jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);' \
402             -friend 'jstring (::_Jv_NewStringLatin1) (const char*, jsize);' \
403             -friend 'jstring (::_Jv_AllocString) (jsize);' \
404             java/lang/String
405
406 java/lang/reflect/Constructor.h: classpath/lib/java/lang/reflect/Constructor.class
407         $(GCJH) -classpath '' -bootclasspath classpath/lib \
408             -prepend 'jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *);' \
409             -prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
410             -friend 'jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *);' \
411             -friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
412             -friend 'class java::lang::Class;' \
413             java/lang/reflect/Constructor
414
415 java/lang/reflect/Field.h: classpath/lib/java/lang/reflect/Field.class
416         $(GCJH) -classpath '' -bootclasspath classpath/lib \
417             -prepend 'jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *);' \
418             -prepend 'jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
419             -friend 'jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *);' \
420             -friend 'jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean);' \
421             -friend 'class java::lang::Class;' \
422             java/lang/reflect/Field
423
424 java/lang/reflect/Method.h: classpath/lib/java/lang/reflect/Method.class
425         $(GCJH) -classpath '' -bootclasspath classpath/lib \
426             -prepend 'jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *);' \
427             -prepend 'jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
428             -friend 'jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *);' \
429             -friend 'jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean);' \
430             -friend 'class java::lang::Class;' \
431             -friend 'class java::io::ObjectInputStream;' \
432             java/lang/reflect/Method
433
434 java/lang/reflect/Proxy.h: classpath/lib/java/lang/reflect/Proxy.class
435         $(GCJH) -classpath '' -bootclasspath classpath/lib \
436             java/lang/reflect/Proxy
437
438 java/lang/reflect/Proxy$$ProxyData.h: classpath/lib/java/lang/reflect/Proxy.class
439         $(GCJH) -classpath '' -bootclasspath classpath/lib \
440         'java/lang/reflect/Proxy$$ProxyData'
441
442 java/lang/reflect/Proxy$$ProxyType.h: classpath/lib/java/lang/reflect/Proxy.class
443         $(GCJH) -classpath '' -bootclasspath classpath/lib \
444         'java/lang/reflect/Proxy$$ProxyType'
445
446 gnu/gcj/runtime/ExtensionClassLoader.h: classpath/lib/gnu/gcj/runtime/ExtensionClassLoader.class
447         $(GCJH) -classpath '' -bootclasspath classpath/lib \
448             -friend 'class ::java::lang::ClassLoader;' \
449             gnu/gcj/runtime/ExtensionClassLoader
450
451 java/io/ObjectInputStream$$GetField.h: classpath/lib/java/io/ObjectInputStream.class
452         $(GCJH) -classpath '' -bootclasspath classpath/lib \
453         'java/io/ObjectInputStream$$GetField'
454
455 java/io/ObjectOutputStream$$PutField.h: classpath/lib/java/io/ObjectOutputStream.class
456         $(GCJH) -classpath '' -bootclasspath classpath/lib \
457         'java/io/ObjectOutputStream$$PutField'
458
459 java/nio/DirectByteBufferImpl$$ReadWrite.h: classpath/lib/java/nio/DirectByteBufferImpl.class
460         $(GCJH) -classpath '' -bootclasspath classpath/lib \
461         'java/nio/DirectByteBufferImpl$$ReadWrite'
462
463 java/nio/channels/Pipe$$SinkChannel.h: classpath/lib/java/nio/channels/Pipe.class
464         $(GCJH) -classpath '' -bootclasspath classpath/lib \
465         'java/nio/channels/Pipe$$SinkChannel'
466
467 java/nio/channels/Pipe$$SourceChannel.h: classpath/lib/java/nio/channels/Pipe.class
468         $(GCJH) -classpath '' -bootclasspath classpath/lib \
469         'java/nio/channels/Pipe$$SourceChannel'
470
471 gnu/java/net/PlainSocketImpl$$SocketInputStream.h: classpath/lib/gnu/java/net/PlainSocketImpl.class
472         $(GCJH) -classpath '' -bootclasspath classpath/lib \
473         'gnu/java/net/PlainSocketImpl$$SocketInputStream'
474
475 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h: classpath/lib/gnu/java/net/PlainSocketImpl.class
476         $(GCJH) -classpath '' -bootclasspath classpath/lib \
477         'gnu/java/net/PlainSocketImpl$$SocketOutputStream'
478
479 gnu/java/nio/PipeImpl$$SinkChannelImpl.h: classpath/lib/gnu/java/nio/PipeImpl.class
480         $(GCJH) -classpath '' -bootclasspath classpath/lib \
481         'gnu/java/nio/PipeImpl$$SinkChannelImpl'
482
483 gnu/java/nio/PipeImpl$$SourceChannelImpl.h: classpath/lib/gnu/java/nio/PipeImpl.class
484         $(GCJH) -classpath '' -bootclasspath classpath/lib \
485         'gnu/java/nio/PipeImpl$$SourceChannelImpl'
486
487 ## Only used by PosixProcess.java
488 java/lang/ConcreteProcess$$ProcessManager.h: classpath/lib/java/lang/ConcreteProcess.class
489         $(GCJH) -classpath '' -bootclasspath classpath/lib \
490         'java/lang/ConcreteProcess$$ProcessManager'
491
492 ## Headers we maintain by hand and which we want to install.
493 extra_headers = java/lang/Object.h java/lang/Class.h
494
495 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
496         @:
497
498 ## Install the headers.  It is fairly ugly that we have to do this by
499 ## hand.
500 install-data-local:
501         $(PRE_INSTALL)
502 ## We use a GNU make trick here so that we don't go over the command
503 ## length limit of some shells.
504         @echo Creating list of headers to install...
505         @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
506         @cat tmp-ilist | while read f; do \
507           d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \
508           $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$d; \
509           if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \
510           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f"; \
511           $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f; \
512         done
513         -@rm -f tmp-ilist
514 ## FIXME: the obvious approach using lib_DATA doesn't work with
515 ## automake 1.4.
516         $(mkinstalldirs) $(DESTDIR)$(secdir)
517         @for f in libgcj.security; do \
518           echo " $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f"; \
519           $(INSTALL_DATA) $(srcdir)/java/security/$$f $(DESTDIR)$(secdir)/$$f; \
520         done
521         $(INSTALL_DATA) $(srcdir)/java/util/logging/logging.properties $(DESTDIR)$(propdir)/logging.properties
522 ## Install inner class headers.
523         $(INSTALL_DATA) 'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
524         $(INSTALL_DATA) 'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
525         $(INSTALL_DATA) 'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
526         $(INSTALL_DATA) 'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
527         $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
528         $(INSTALL_DATA) 'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
529         $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
530         $(INSTALL_DATA) 'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
531         $(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
532         $(INSTALL_DATA) 'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
533 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
534
535
536 ## ################################################################
537
538 ##
539 ## Additional `check' targets for maintainer convenience.
540 ##
541
542 ## This is used for maintainer-check.  FIXME: should set from
543 ## configure using AC_CHECK_TOOL.
544 NM = nm
545
546 ## Try to make sure our library doesn't stomp the namespace.
547 maintainer-check: libgcj.la
548         $(NM) .libs/libgcj.a | grep ' T ' \
549 ## Anything with `4java' is assumed to be from .java source.
550           | grep -v '4java' \
551 ## Anything with Jv is ok.
552           | grep -v 'Jv' \
553 ## `terminate' and `unexpected' are part of the runtime.
554           | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
555
556 ## This rule can be used to see if the headers are more or less
557 ## correct.
558 header-check: libgcj-$(gcc_version).jar $(nat_headers)
559         rm -f htest.cc; \
560         for h in $(nat_headers); do \
561           echo "#include \"$$h\"" >> htest.cc; \
562         done; \
563         $(CXXCOMPILE) -fsyntax-only htest.cc
564
565 ## This rule can be used to see if all the .class files verify
566 ## correctly.
567 class-check: libgcj-$(gcc_version).jar
568         @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
569         while read f; do \
570           echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
571           if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
572           :; else ok=1; fi; \
573         done; exit $$ok
574
575 ## This rule checks whether write_entries_to_file works properly.
576 write-entries-to-file-check:
577         @echo Creating list of files to link...
578         @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
579
580 ## ################################################################
581
582 ##
583 ## The `jv-convert' program and code to rebuild the converter header
584 ## files.
585 ##
586
587 ## it only makes sense to try to rebuild the JIS .h files on native
588 ## systems.
589 if NATIVE
590 if MAINTAINER_MODE
591 noinst_PROGRAMS = gen-from-JIS
592
593 gen_from_JIS_SOURCES = \
594         gnu/gcj/convert/gen-from-JIS.c \
595         gnu/gcj/convert/make-trie.c
596
597 gen_from_JIS_DEPENDENCIES = \
598         gnu/gcj/convert/JIS0201.h \
599         gnu/gcj/convert/JIS0208.h \
600         gnu/gcj/convert/JIS0212.h
601
602 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
603          ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
604
605 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
606          ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
607
608 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
609          ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
610
611 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
612 # You can get it from
613 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
614
615 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
616         echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
617         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
618         | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2)  /*\3 */|p' \
619         >> tmp-0201; \
620         mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
621
622 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
623 # You can get it from
624 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
625
626 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
627         echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
628         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
629         | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4)  /*\5 */|p' \
630         >> tmp-0208; \
631         mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
632
633 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
634 # You can get it from
635 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
636
637 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
638         echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
639         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
640         | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3)  /*\4 */|p' \
641         >> tmp-0212; \
642         mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
643
644 endif
645 endif 
646
647
648 jv_convert_SOURCES =
649 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
650 ## need this because we are explicitly using libtool to link using the
651 ## `.la' file.
652 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
653         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
654 jv_convert_LINK = $(GCJLINK)
655 ## We don't explicitly link in the libraries we need; libgcj.la brings
656 ## in all dependencies.  We need the -L so that gcj can find libgcj
657 ## with `-lgcj', but it must come first, otherwise the -L flags
658 ## brought in from libgcj.la would cause the install directories to be
659 ## searched before the build-tree ones, and we'd get errors because of
660 ## different libraries with the same SONAME from picky linkers such as
661 ## Solaris'.  FIXME: should be _libs on some systems.
662 jv_convert_LDADD = -L$(here)/.libs libgcj.la
663 ## Depend on the spec file to make sure it is up to date before
664 ## linking this program.
665 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
666
667 gcj_dbtool_SOURCES = \
668 gnu/gcj/tools/gcj_dbtool/Main.java \
669 gnu/gcj/tools/gcj_dbtool/natMain.cc
670
671 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
672 ## need this because we are explicitly using libtool to link using the
673 ## `.la' file.
674 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
675         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
676 gcj_dbtool_LINK = $(GCJLINK)
677 ## We don't explicitly link in the libraries we need; libgcj.la brings
678 ## in all dependencies.  We need the -L so that gcj can find libgcj
679 ## with `-lgcj', but it must come first, otherwise the -L flags
680 ## brought in from libgcj.la would cause the install directories to be
681 ## searched before the build-tree ones, and we'd get errors because of
682 ## different libraries with the same SONAME from picky linkers such as
683 ## Solaris'.  FIXME: should be _libs on some systems.
684 gcj_dbtool_LDADD = -L$(here)/.libs libgcj.la
685 ## Depend on the spec file to make sure it is up to date before
686 ## linking this program.
687 gcj_dbtool_DEPENDENCIES = libgcj.la libgcj.spec
688
689 gij_SOURCES = 
690 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
691 ## need this because we are explicitly using libtool to link using the
692 ## `.la' file.
693 gij_LDFLAGS = -rpath $(libdir)/gcj-$(gcc_version) -rpath $(toolexeclibdir) \
694         -shared-libgcc $(THREADLDFLAGS)
695 gij_LINK = $(GCJLINK)
696 ## See jv_convert_LDADD.
697 gij_LDADD = -L$(here)/.libs libgij.la
698 ## Depend on the spec file to make sure it is up to date before
699 ## linking this program.
700 gij_DEPENDENCIES = libgij.la
701
702 ## This is a dummy definition.
703 grmic_SOURCES =
704 grmic_LDFLAGS = --main=gnu.java.rmi.rmic.RMIC \
705         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
706 grmic_LINK = $(GCJLINK)
707 ## See jv_convert_LDADD.
708 grmic_LDADD = -L$(here)/.libs libgcj.la
709 ## Depend on the spec file to make sure it is up to date before
710 ## linking this program.
711 grmic_DEPENDENCIES = libgcj.la libgcj.spec
712
713 ## This is a dummy definition.
714 grmiregistry_SOURCES =
715 grmiregistry_LDFLAGS = --main=gnu.java.rmi.registry.RegistryImpl \
716         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
717 grmiregistry_LINK = $(GCJLINK)
718 ## See jv_convert_LDADD.
719 grmiregistry_LDADD = -L$(here)/.libs libgcj.la
720 ## Depend on the spec file to make sure it is up to date before
721 ## linking this program.
722 grmiregistry_DEPENDENCIES = libgcj.la libgcj.spec
723
724 ## ################################################################
725
726 ## This lists all the C++ source files in subdirectories.
727 nat_source_files = \
728 gnu/classpath/natSystemProperties.cc \
729 gnu/gcj/natCore.cc \
730 gnu/gcj/convert/JIS0208_to_Unicode.cc \
731 gnu/gcj/convert/JIS0212_to_Unicode.cc \
732 gnu/gcj/convert/Unicode_to_JIS.cc \
733 gnu/gcj/convert/natIconv.cc \
734 gnu/gcj/convert/natInput_EUCJIS.cc \
735 gnu/gcj/convert/natInput_SJIS.cc \
736 gnu/gcj/convert/natOutput_EUCJIS.cc \
737 gnu/gcj/convert/natOutput_SJIS.cc \
738 gnu/gcj/io/natSimpleSHSStream.cc \
739 gnu/gcj/io/shs.cc \
740 gnu/gcj/runtime/natFinalizerThread.cc \
741 gnu/gcj/runtime/natSharedLibLoader.cc \
742 gnu/gcj/runtime/natSystemClassLoader.cc \
743 gnu/gcj/runtime/natStringBuffer.cc \
744 gnu/gcj/util/natDebug.cc \
745 gnu/java/lang/natMainThread.cc \
746 gnu/java/net/natPlainDatagramSocketImpl.cc \
747 gnu/java/net/natPlainSocketImpl.cc \
748 gnu/java/net/protocol/core/natCoreInputStream.cc \
749 gnu/java/nio/natPipeImpl.cc \
750 gnu/java/nio/natSelectorImpl.cc \
751 gnu/java/nio/natNIOServerSocket.cc \
752 gnu/java/nio/channels/natFileChannelImpl.cc \
753 java/io/natFile.cc \
754 java/io/natObjectInputStream.cc \
755 java/io/natVMObjectStreamClass.cc \
756 java/lang/natCharacter.cc \
757 java/lang/natClass.cc \
758 java/lang/natClassLoader.cc \
759 java/lang/natConcreteProcess.cc \
760 java/lang/natDouble.cc \
761 java/lang/natFloat.cc \
762 java/lang/natMath.cc \
763 java/lang/natObject.cc \
764 java/lang/natRuntime.cc \
765 java/lang/natString.cc \
766 java/lang/natStringBuffer.cc \
767 java/lang/natStringBuilder.cc \
768 java/lang/natSystem.cc \
769 java/lang/natThread.cc \
770 java/lang/natVMClassLoader.cc \
771 java/lang/natVMSecurityManager.cc \
772 java/lang/natVMThrowable.cc \
773 java/lang/ref/natReference.cc \
774 java/lang/reflect/natArray.cc \
775 java/lang/reflect/natConstructor.cc \
776 java/lang/reflect/natField.cc \
777 java/lang/reflect/natMethod.cc \
778 java/net/natVMNetworkInterface.cc \
779 java/net/natInetAddress.cc \
780 java/nio/channels/natVMChannels.cc \
781 java/nio/natDirectByteBufferImpl.cc \
782 java/text/natCollator.cc \
783 java/util/natResourceBundle.cc \
784 java/util/natVMTimeZone.cc \
785 java/util/logging/natLogger.cc \
786 java/util/zip/natDeflater.cc \
787 java/util/zip/natInflater.cc
788
789 xlib_nat_source_files = \
790 gnu/gcj/xlib/natClip.cc \
791 gnu/gcj/xlib/natColormap.cc \
792 gnu/gcj/xlib/natDisplay.cc \
793 gnu/gcj/xlib/natDrawable.cc \
794 gnu/gcj/xlib/natFont.cc \
795 gnu/gcj/xlib/natGC.cc \
796 gnu/gcj/xlib/natPixmap.cc \
797 gnu/gcj/xlib/natScreen.cc \
798 gnu/gcj/xlib/natVisual.cc \
799 gnu/gcj/xlib/natWMSizeHints.cc \
800 gnu/gcj/xlib/natWindow.cc \
801 gnu/gcj/xlib/natWindowAttributes.cc \
802 gnu/gcj/xlib/natXAnyEvent.cc \
803 gnu/gcj/xlib/natXButtonEvent.cc \
804 gnu/gcj/xlib/natXColor.cc \
805 gnu/gcj/xlib/natXConfigureEvent.cc \
806 gnu/gcj/xlib/natXException.cc \
807 gnu/gcj/xlib/natXExposeEvent.cc \
808 gnu/gcj/xlib/natXImage.cc \
809 gnu/gcj/xlib/natXUnmapEvent.cc
810
811 ## ################################################################
812
813 ##
814 ## Creating and installing sources.zip
815 ##
816
817 ## Create a zip holding all the sources.  This can be meaningfully
818 ## used in Eclipse.
819 src.zip:
820         -rm -f src.zip
821         here=`pwd`; \
822         ( \
823           ( cd $(srcdir)/classpath; \
824           find java gnu javax org -name '*.java' -print | \
825           while read file; do \
826 ## Ugly code to avoid "echo -C".  Must separate each entry by a newline
827 ## Gross but easy.
828             echo "x-C" | sed -e 's/^.//'; \
829             echo $(srcdir)/classpath; \
830             echo $$file; \
831           done ); \
832 ## Now the build tree.
833           ( cd classpath; \
834             find gnu java -name '*.java' -print | \
835             while read file; do \
836             echo "x-C" | sed -e 's/^.//'; \
837             echo `pwd`; \
838             echo $$file; \
839           done ); \
840         ) | \
841 ## Many of the above circumlocutions were because ZIP used to be a
842 ## relative path to fastjar.  It didn't seem worthwhile to change the
843 ## code when we moved to an external jar.
844         $(JAR) -cfM@ $$here/src.zip
845 ## Override GNU Classpath sources with libgcj replacements.
846         here=`pwd`; \
847         ( \
848           ( cd $(srcdir); \
849           find gnu java -name '*.java' -print | \
850           while read file; do \
851             echo "x-C" | sed -e 's/^.//'; \
852             echo $(srcdir); \
853             echo $$file; \
854           done ); \
855         ) | \
856         $(JAR) -ufM@ $$here/src.zip
857
858 ## We use a variable for this in case the user wants to override it.
859 sourcesdir = $(jardir)
860
861 install-src.zip: src.zip
862         $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
863
864
865 ## ################################################################
866
867 ##
868 ## Dependency tracking madness.
869 ##
870
871 ## This is an evil hack to work around an automake limitation.  We
872 ## need to ensure that all CNI headers are built, not just the ones
873 ## used internally by libgcj. We can't make the .o files depend on
874 ## nat_headers, because in that case we'll force a complete rebuild of
875 ## the C++ code whenever any .java file is touched.  So instead we
876 ## have a dummy rule which is only used once, namely the first time a
877 ## build is done.  On subsequent builds, the dependency tracking for
878 ## the .cc compilations will have picked up the .h files, and these
879 ## will be built directly as needed.
880
881 headers.stamp:
882 ## Note that we don't use a real dependency here, since we don't want
883 ## to rebuild all the headers here when the header list changes.  If
884 ## we did rebuild here, then any addition of a .java file would cause
885 ## a large number of recompilations.
886         $(MAKE) create-headers
887         @echo > headers.stamp
888
889 headers_to_make = $(nat_headers)
890 if XLIB_AWT
891 headers_to_make += $(xlib_nat_headers)
892 endif
893
894 create-headers: $(headers_to_make)
895
896 .PHONY: create-headers
897
898 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
899 $(libgij_la_OBJECTS): headers.stamp
900 $(libjvm_la_OBJECTS): headers.stamp
901
902 ## ################################################################
903
904 ##
905 ## This section is for make and multilib madness.
906 ##
907
908 # Work around what appears to be a GNU make bug handling MAKEFLAGS
909 # values defined in terms of make variables, as is the case for CC and
910 # friends when we are called from the top level Makefile.
911 AM_MAKEFLAGS = \
912         "AR_FLAGS=$(AR_FLAGS)" \
913         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
914         "CFLAGS=$(CFLAGS)" \
915         "CXXFLAGS=$(CXXFLAGS)" \
916         "CPPFLAGS=$(CPPFLAGS)" \
917         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
918         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
919         "INSTALL=$(INSTALL)" \
920         "INSTALL_DATA=$(INSTALL_DATA)" \
921         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
922         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
923         "GCJFLAGS=$(GCJFLAGS)" \
924         "LDFLAGS=$(LDFLAGS)" \
925         "LIBCFLAGS=$(LIBCFLAGS)" \
926         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
927         "MAKE=$(MAKE)" \
928         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
929         "PICFLAG=$(PICFLAG)" \
930         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
931         "SHELL=$(SHELL)" \
932         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
933         "exec_prefix=$(exec_prefix)" \
934         "infodir=$(infodir)" \
935         "libdir=$(libdir)" \
936         "prefix=$(prefix)" \
937         "gxx_include_dir=$(gxx_include_dir)" \
938         "AR=$(AR)" \
939         "AS=$(AS)" \
940         "LD=$(LD)" \
941         "LIBCFLAGS=$(LIBCFLAGS)" \
942         "NM=$(NM)" \
943         "PICFLAG=$(PICFLAG)" \
944         "RANLIB=$(RANLIB)" \
945         "DESTDIR=$(DESTDIR)"
946
947 # Subdir rules rely on $(FLAGS_TO_PASS)
948 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
949
950 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
951
952 MAKEOVERRIDES=
953
954 # No install-html support yet.
955 .PHONY: install-html
956 install-html:
957
958 # Multilib support variables.
959 MULTISRCTOP =
960 MULTIBUILDTOP =
961 MULTIDIRS =
962 MULTISUBDIR =
963 MULTIDO = true
964 MULTICLEAN = true
965
966 # Multilib support.
967 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
968         maintainer-clean-multi
969
970 all-recursive: all-multi
971 install-recursive: install-multi
972 mostlyclean-recursive: mostlyclean-multi
973 clean-recursive: clean-multi
974 distclean-recursive: distclean-multi
975 maintainer-clean-recursive: maintainer-clean-multi
976
977 all-multi:
978         : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
979 install-multi:
980         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
981 mostlyclean-multi:
982         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
983 clean-multi:
984         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
985 distclean-multi:
986         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
987 maintainer-clean-multi:
988         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean