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