OSDN Git Service

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