OSDN Git Service

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