OSDN Git Service

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