OSDN Git Service

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