OSDN Git Service

2009-02-17 Richard Guenther <rguenther@suse.de>
[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 -I libltdl
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.  Entries are written in chunks of
17 # $(write_entries_to_file_split) to accomodate systems with
18 # severe command-line-length limitations.
19 # Parameters:
20 # $(1): variable containing entries to iterate over
21 # $(2): output file
22 write_entries_to_file_split = 50
23 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
24         $(foreach range, \
25           $(shell i=1; while test $$i -le $(words $(1)); do \
26              echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
27           $(shell echo $(wordlist $(range), \
28                           $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \
29              | tr ' ' '\n' >> $(2)))
30
31 ## ################################################################
32
33 # autoconf2.13's target_alias
34 target_noncanonical = @target_noncanonical@
35
36 # This is required by TL_AC_GXX_INCLUDE_DIR.
37 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
38
39 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
40
41 ##
42 ## What gets installed, and where.
43 ##
44
45 toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la
46 toolexecmainlib_DATA = libgcj.spec
47
48 if USE_LIBGCJ_BC
49 toolexeclib_LTLIBRARIES += libgcj_bc.la
50 endif
51
52 if XLIB_AWT
53 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
54 endif
55
56 dbexec_LTLIBRARIES = libjvm.la
57
58 pkgconfigdir = $(libdir)/pkgconfig
59
60 jardir = $(datadir)/java
61 jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
62 if INSTALL_ECJ_JAR
63 jar_DATA += $(ECJ_BUILD_JAR)
64 endif
65
66 if JAVA_HOME_SET
67 JAVA_HOME_DIR = $(JAVA_HOME)
68 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
69 else
70 JAVA_HOME_DIR = $(prefix)
71 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
72 endif
73
74 ## Name of the default .db.
75 db_name = classmap.db
76 ## Compiler specific component of the .db file
77 gcjsubdir = @gcjsubdir@
78 db_pathtail = $(gcjsubdir)/$(db_name)
79
80 ## For now, only on native systems.  FIXME.
81 if NATIVE
82 bin_programs = jv-convert gij grmic grmiregistry gcj-dbtool \
83         gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
84         gorbd grmid gserialver gtnameserv gc-analyze
85 if CREATE_GJDOC
86 bin_programs += gjdoc
87 endif
88
89 noinst_PROGRAMS =
90 if INSTALL_BINARIES
91 bin_PROGRAMS = $(bin_programs)
92 else
93 noinst_PROGRAMS += $(bin_programs)
94 endif
95
96 ## It is convenient to actually build and install the default database
97 ## when gcj-dbtool is available.
98 dbexec_DATA = $(db_name)
99 endif 
100
101 bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
102
103 if INSTALL_AOT_RPM
104 bin_SCRIPTS += contrib/aot-compile-rpm
105 endif
106
107 if BUILD_ECJ1
108 ## We build ecjx and not ecj1 because in one mode, ecjx will not work
109 ## until after 'make install', and we don't want it to be picked up in
110 ## the build tree by gcj via a -B option.
111 libexecsub_PROGRAMS = ecjx
112 endif
113
114 ## ################################################################
115
116 ##
117 ## Compilers and compilation flags.
118 ##
119
120 ## The compiler with whatever flags we want for both -c and -C
121 ## compiles.
122 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
123
124 extra_ldflags_libjava = @extra_ldflags_libjava@
125 extra_ldflags = @extra_ldflags@
126
127 if ANONVERSCRIPT
128 extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
129 endif
130
131 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
132 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
133           $(LTLDFLAGS) -o $@
134 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
135 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
136 LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
137           $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
138 CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
139         $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
140
141 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
142
143 WARNINGS = -Wextra -Wall
144 ## Some systems don't allow `$' in identifiers by default, so we force
145 ## it with -fdollars-in-identifiers.  -Wswitch-enum detects bugs in
146 ## the verifier implementation, and maybe other places.  We need
147 ## _GNU_SOURCE defined for some Linux builds.  It doesn't hurt to
148 ## always define it.  Some systems, including Linux, need
149 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
150 AM_CXXFLAGS = \
151         -fno-rtti \
152         -fnon-call-exceptions \
153         $(THREADCXXFLAGS) \
154         -fdollars-in-identifiers \
155         -Wswitch-enum \
156         -D_FILE_OFFSET_BITS=64 \
157         @LIBGCJ_CXXFLAGS@ \
158         $(WARNINGS) \
159         -D_GNU_SOURCE \
160         -DPREFIX="\"$(prefix)\"" \
161         -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
162         -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
163         -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
164         -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
165         -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
166         -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
167         -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
168         -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
169         -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
170         -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
171
172 AM_GCJFLAGS = \
173         @LIBGCJ_JAVAFLAGS@ \
174         -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
175         --encoding=UTF-8 \
176         -Wno-deprecated -fbootstrap-classes
177
178 AM_CFLAGS = @LIBGCJ_CFLAGS@
179 if USING_GCC
180 AM_CFLAGS += $(WARNINGS)
181 endif
182
183 if SUPPRESS_LIBGCJ_BC
184 LIBGCJ_BC_FLAGS =
185 else
186 LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
187 endif
188
189 if BUILD_LIBGCJ_REDUCED_REFLECTION
190 LIBGCJ_REDUCED_REFLECTION_FLAGS = -freduced-reflection
191 else
192 LIBGCJ_REDUCED_REFLECTION_FLAGS =
193 endif
194
195 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
196 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
197
198 JCFLAGS = -g
199 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
200
201 LIBFFIINCS = @LIBFFIINCS@
202
203 AM_CPPFLAGS = -I$(top_srcdir) \
204         -Iinclude -I$(top_srcdir)/include \
205         -I$(top_srcdir)/classpath/include \
206         -Iclasspath/include \
207         -I$(top_srcdir)/classpath/native/fdlibm \
208         $(GCINCS) $(THREADINCS) $(INCLTDL) \
209         $(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
210
211 BOOTCLASSPATH = $(srcdir)/classpath/lib
212
213 ## ################################################################
214
215 ##
216 ## How to build libgcj.a and libgcj.jar
217 ##
218
219 libgij_la_SOURCES = gij.cc
220 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
221 ## See jv_convert_LDADD.
222 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
223 ## The mysterious backslash in the grep pattern is consumed by make.
224 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
225         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
226
227 if INTERPRETER
228 libgcj_interpret_source_files = jvmti.cc interpret.cc
229 else
230 libgcj_interpret_source_files = 
231 endif
232
233 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
234         link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
235         $(nat_source_files)
236
237 ## We need to compile at least the interpreter this way.
238 interpret.lo:  AM_CXXFLAGS += -fwrapv
239
240 if USING_BOEHMGC
241 libgcj_la_SOURCES += boehm.cc
242 endif
243
244 if USING_NOGC
245 libgcj_la_SOURCES += nogc.cc
246 endif
247
248 if USING_POSIX_PLATFORM
249 libgcj_la_SOURCES += posix.cc
250 endif
251
252 if USING_WIN32_PLATFORM
253 libgcj_la_SOURCES += win32.cc
254 endif
255
256 if USING_DARWIN_CRT
257 libgcj_la_SOURCES += darwin.cc
258 endif
259
260 if USING_POSIX_THREADS
261 libgcj_la_SOURCES += posix-threads.cc
262 endif
263
264 if USING_WIN32_THREADS
265 libgcj_la_SOURCES += win32-threads.cc
266 endif
267
268 if USING_NO_THREADS
269 libgcj_la_SOURCES += no-threads.cc
270 endif
271
272 ## Objects from C++ sources in subdirs.
273 nat_files = $(nat_source_files:.cc=.lo)
274 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
275
276 # Include THREADLIBS here to ensure that the correct version of
277 # certain linuxthread functions get linked:
278 ## The mysterious backslash in the grep pattern is consumed by make.
279 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
280         $(LIBLTDL) $(SYS_ZLIBS) \
281         -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
282         $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
283 libgcj_la_LIBADD = \
284         classpath/native/fdlibm/libfdlibm.la \
285         java/lang/Object.lo \
286         java/lang/Class.lo \
287         java/process-$(PLATFORM).lo \
288         $(all_packages_source_files:.list=.lo) \
289         $(bc_objects) \
290         $(propertyo_files) \
291         $(LIBFFI) $(ZLIBS) $(GCLIBS)
292 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
293         java/lang/Object.lo \
294         java/lang/Class.lo \
295         java/process-$(PLATFORM).lo \
296         $(all_packages_source_files:.list=.lo) \
297         $(LIBLTDL) $(libgcj_la_LIBADD)
298 if ANONVERSCRIPT
299 libgcj_la_DEPENDENCIES += $(srcdir)/libgcj.ver
300 endif
301 libgcj_la_LINK = $(LIBLINK)
302
303 ## A hack to make sure the various gcj-related macros, like
304 ## LTGCJCOMPILE, are defined by automake.  This is never actually
305 ## compiled.
306 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
307
308 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
309 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes  -fsource-filename=$(here)/classpath/tools/all-classes.lst
310 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
311  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
312  $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
313 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
314 libgcj_tools_la_LINK = $(LIBLINK)
315
316 ## libjvm.so
317 libjvm_la_SOURCES = jni-libjvm.cc
318 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
319 ## See jv_convert_LDADD.
320 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
321 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC)
322
323 ## The .db file.  This rule is only used for native builds, so it is
324 ## safe to invoke gcj-dbtool.
325 $(db_name): gcj-dbtool$(EXEEXT)
326 ## In case it exists already.
327         @rm -f $(db_name)
328 ## We don't actually care if it fails -- if it does, just make an
329 ## empty file.  This is simpler than trying to discover when mmap is
330 ## not available.
331         ./gcj-dbtool -n $(db_name) || touch $(db_name)
332
333 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
334 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
335 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
336         libgcj.la libgcj.spec \
337         $(lib_gnu_awt_xlib_la_LIBADD)
338 ## We require libstdc++-v3 to be in the same build tree.
339 lib_gnu_awt_xlib_la_CPPFLAGS = \
340         $(AM_CPPFLAGS) \
341         -I../libstdc++-v3/include \
342         -I../libstdc++-v3/include/$(target_noncanonical) \
343         -I$(srcdir)/../libstdc++-v3/libsupc++
344 ## The mysterious backslash in the grep pattern is consumed by make.
345 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
346         @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
347         -rpath $(toolexeclibdir) \
348         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
349 lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
350
351 ## Support for libgcj_bc: dummy shared library.
352 ##
353 ## This lets us have one soname in BC objects and another in C++ ABI objects.
354 libgcj_bc_la_SOURCES = libgcj_bc.c
355 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
356         $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
357 libgcj_bc_la_LIBADD = libgcj.la
358 libgcj_bc_la_DEPENDENCIES = libgcj.la
359 libgcj_bc_la_LINK = $(LIBLINK)
360 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
361 ## USE_LIBGCJ_BC shouldn't be set on other targets.
362 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
363         -fPIC -nostdlib
364
365 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
366 ## when testing.
367 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
368         $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
369         $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
370         rm .libs/libgcj_bc.so; \
371         mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
372         $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
373         -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
374         rm .libs/libgcj_bc.so.1; \
375         $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
376
377 ## Note that property_files is defined in sources.am.
378 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
379
380 $(propertyo_files): %.lo: classpath/resource/%
381         $(mkinstalldirs) `dirname $@`; \
382         $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
383
384 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
385 ## Note that this now omits the property files.
386 ## It doesn't matter since we don't use the jar at runtime.
387         here=`pwd`; cd $(srcdir)/classpath/lib; \
388         find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
389         $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
390
391 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
392         cp $< $@
393
394 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
395 DISTCLEANFILES = native.dirs
396
397 mostlyclean-local:
398 ## Use libtool rm to remove each libtool object
399         find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
400
401 distclean-local:
402 ## Remove every .d file that was created.
403         find . -name '*.d' -print | xargs rm -f
404
405 # Just remove the objects from C++ sources, for testing the C++ compiler.
406 clean-nat:
407         rm -f $(nat_files) $(xlib_nat_files)
408
409 SUFFIXES = .class .java .h .properties .list
410
411 ## Pass the list of object files to libtool in a temporary file to
412 ## avoid tripping platform command line length limits.
413 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
414         @echo Creating list of files to link...
415         @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
416         $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
417         -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
418
419 ## ################################################################
420
421 ## Compiling a list of java sources to a single .o.
422
423 # Concurrent things use reflection internally.
424 java/util/concurrent.lo \
425 java/util/concurrent/atomic.lo \
426 java/util/concurrent/locks.lo: LIBGCJ_REDUCED_REFLECTION_FLAGS =
427
428 %.lo: %.list
429         $(LTGCJCOMPILE) $(LIBGCJ_REDUCED_REFLECTION_FLAGS) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
430
431 java/lang/Object.lo: classpath/lib/java/lang/Object.class
432         $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
433
434 java/lang/Class.lo: classpath/lib/java/lang/Class.class
435         $(LTGCJCOMPILE) -c -o $@  -fsource-filename=$(srcdir)/$(basename $@).java $<
436
437 ## ################################################################
438
439 ## This pulls in a number of variable and target definitions.
440 include sources.am
441
442 ## ################################################################
443
444 ##
445 ## How to build header files.
446 ##
447
448 ## We have special rules for certain headers.
449 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
450         java/lang/String.h java/lang/reflect/Constructor.h \
451         java/lang/reflect/Field.h java/lang/reflect/Method.h \
452         java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
453
454 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
455         java/io/ObjectInputStream$$GetField.h \
456         java/nio/DirectByteBufferImpl$$ReadWrite.h \
457         java/nio/channels/Pipe$$SinkChannel.h \
458         java/nio/channels/Pipe$$SourceChannel.h \
459         java/lang/VMProcess$ImmediateEOFInputStream.h \
460         java/lang/reflect/Proxy$$ProxyData.h \
461         java/lang/reflect/Proxy$$ProxyType.h \
462         gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
463         gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
464         gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
465         gnu/java/nio/PipeImpl$$SourceChannelImpl.h
466
467 generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
468         $(xlib_nat_headers)
469
470 MYGCJH = gjavah
471
472 $(generic_header_files): gcjh.stamp
473
474 gcjh.stamp: classpath/lib/compile-classes
475 if JAVA_MAINTAINER_MODE
476         $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
477             --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
478 endif
479         echo > gcjh.stamp
480
481 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
482 nat_headers_install = $(ordinary_header_files)
483
484 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
485
486 ## Headers we maintain by hand and which we want to install.
487 extra_headers = java/lang/Object.h java/lang/Class.h
488
489 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
490         @:
491
492 install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
493         install-libexecsubPROGRAMS
494 ## Support for libgcj_bc: dummy shared library used only at link-time.
495 if USE_LIBGCJ_BC
496 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
497 ## libtool's .la file, this prevents libtool resetting the lib again 
498 ## later.
499         @echo Installing dummy lib libgcj_bc.so.1.0.0; \
500         rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
501         mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
502         $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
503         -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
504         rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
505         $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
506         rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
507 endif
508 if BUILD_ECJ1
509 ## Undo any prepending of the target prefix and transform
510 ## to the actual host's executable suffix.
511         mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
512 endif BUILD_ECJ1
513
514 ## Install the headers.  It is fairly ugly that we have to do this by
515 ## hand.
516 install_data_local_split = 50
517 install-data-local:
518         $(PRE_INSTALL)
519 ## Install the .pc file.
520         @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
521         file="libgcj-$${pc_version}.pc"; \
522         $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
523         echo "  $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
524         $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
525 ## We use a GNU make trick here so that we don't go over the command
526 ## length limit of some shells.
527         @echo Creating list of headers to install...
528         @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
529         @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
530         while read file; do echo "$$file $$file"; done < tmp-ilist | \
531         sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
532         $(AWK) 'BEGIN { files["."] = "" } \
533           { files[$$2] = files[$$2] " " $$1; \
534             if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
535              END { for (dir in files) print dir, files[dir] }' | \
536         while read dir files; do \
537           xfiles=; for file in $$files; do \
538             if test -f "$$file"; then xfiles="$$xfiles $$file"; \
539             else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
540           test -z "$$xfiles" || { \
541             test "x$$dir" = x. || { \
542               echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
543               $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
544             echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
545             $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
546         done
547         -@rm -f tmp-ilist
548 ## Install inner class headers.
549         $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
550         $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
551         $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
552         $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
553         $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
554         $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
555         $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
556         $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
557         $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
558         $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
559 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
560 ## Install Python modules for aot-compile.
561         $(mkinstalldirs) $(DESTDIR)$(python_mod_dir); \
562         $(INSTALL_DATA) $(srcdir)/contrib/classfile.py \
563           $(DESTDIR)$(python_mod_dir)/classfile.py; \
564         $(INSTALL_DATA) contrib/aotcompile.py \
565           $(DESTDIR)$(python_mod_dir)/aotcompile.py;
566 if CREATE_JAVA_HOME
567 ## Create sdk style directories
568         $(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
569         $(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
570         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)
571         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
572         $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)
573         $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
574         relative() { \
575           $(PERL) -e 'use File::Spec; \
576             print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
577         }; \
578         RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
579         ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
580           $(DESTDIR)$(SDK_BIN_DIR)/java; \
581         ln -sf $$RELATIVE/`echo gjar | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
582           $(DESTDIR)$(SDK_BIN_DIR)/jar; \
583         ln -sf $$RELATIVE/`echo gjdoc | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
584           $(DESTDIR)$(SDK_BIN_DIR)/javadoc; \
585         ln -sf $$RELATIVE/`echo grmic | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
586           $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
587         ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
588           $(DESTDIR)$(SDK_BIN_DIR)/javah; \
589         ln -sf $$RELATIVE/ecj $(DESTDIR)$(SDK_BIN_DIR)/javac; \
590         ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
591           $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
592         ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
593           $(DESTDIR)$(SDK_BIN_DIR)/jarsigner; \
594         ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
595           $(DESTDIR)$(SDK_BIN_DIR)/rmiregistry; \
596         ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
597           $(DESTDIR)$(SDK_BIN_DIR)/keytool; \
598         ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
599           $(DESTDIR)$(SDK_BIN_DIR)/orbd; \
600         ln -sf $$RELATIVE/`echo gnative2ascii | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
601           $(DESTDIR)$(SDK_BIN_DIR)/native2ascii; \
602         ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
603           $(DESTDIR)$(SDK_BIN_DIR)/rmid; \
604         ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
605           $(DESTDIR)$(SDK_BIN_DIR)/tnameserv; \
606         ln -sf $$RELATIVE/`echo gserialver | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
607           $(DESTDIR)$(SDK_BIN_DIR)/serialver; \
608         RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(JRE_BIN_DIR)); \
609         ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
610           $(DESTDIR)$(JRE_BIN_DIR)/rmiregistry; \
611         ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
612           $(DESTDIR)$(JRE_BIN_DIR)/keytool; \
613         ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
614           $(DESTDIR)$(JRE_BIN_DIR)/java; \
615         ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
616           $(DESTDIR)$(JRE_BIN_DIR)/orbd; \
617         ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
618           $(DESTDIR)$(JRE_BIN_DIR)/rmid; \
619         ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
620           $(DESTDIR)$(JRE_BIN_DIR)/tnameserv; \
621         $(mkinstalldirs) $(DESTDIR)$(JVM_JAR_DIR); \
622         version=$(JAVA_VERSION).$(BUILD_VERSION); \
623         working_dir=`pwd`; \
624         cd $(DESTDIR)$(JVM_JAR_DIR); \
625           RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
626             $(DESTDIR)$(JVM_JAR_DIR)); \
627           for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
628             jndi-ldap jndi-rmi jsse sasl; \
629           do \
630             ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
631           done; \
632           RELATIVE=$$(relative $(DESTDIR)$(jardir) \
633             $(DESTDIR)$(JVM_JAR_DIR)); \
634           for jar in *-$$version.jar; \
635           do \
636             ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
637             ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|.jar|g"); \
638           done; \
639         cd $$working_dir; \
640         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
641         RELATIVE=$$(relative $(DESTDIR)$(libdir)/security \
642           $(DESTDIR)$(JRE_LIB_DIR)/security); \
643         cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
644           ln -sf $$RELATIVE/classpath.security java.security; \
645         cd $$working_dir; \
646         $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/linux; \
647         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
648         $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
649         $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
650         RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
651           $(DESTDIR)$(JRE_LIB_DIR)); \
652         ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
653           $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
654         RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
655           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)); \
656         ln -sf $$RELATIVE/libjawt.so \
657           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so; \
658         RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
659           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client); \
660         ln -sf $$RELATIVE/libjvm.so \
661           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client/libjvm.so; \
662         RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
663           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
664         ln -sf $$RELATIVE/libjvm.so \
665           $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so;     \
666         RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
667           $(DESTDIR)$(SDK_LIB_DIR)); \
668         ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
669           $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
670         for headername in jawt jni; do \
671           DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/gcj \
672             -print-file-name=include/$$headername.h)); \
673           RELATIVE=$$(relative $$DIRECTORY \
674             $(DESTDIR)$(SDK_INCLUDE_DIR)); \
675           ln -sf $$RELATIVE/$$headername.h \
676             $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
677         done; \
678         for headername in jawt_md jni_md; do \
679           DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/gcj \
680             -print-file-name=include/$$headername.h)); \
681           RELATIVE=$$(relative $$DIRECTORY \
682             $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
683           ln -sf $$RELATIVE/$$headername.h \
684             $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
685         done; \
686         RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
687           $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)); \
688         ln -sf $$RELATIVE/src-$(gcc_version).zip \
689           $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR)/src.zip;
690 endif
691
692 ## ################################################################
693
694 ##
695 ## Additional `check' targets for maintainer convenience.
696 ##
697
698 ## This is used for maintainer-check.  FIXME: should set from
699 ## configure using AC_CHECK_TOOL.
700 NM = nm
701
702 ## Try to make sure our library doesn't stomp the namespace.
703 maintainer-check: libgcj.la
704         $(NM) .libs/libgcj.a | grep ' T ' \
705 ## Anything with `4java' is assumed to be from .java source.
706           | grep -v '4java' \
707 ## Anything with Jv is ok.
708           | grep -v 'Jv' \
709 ## `terminate' and `unexpected' are part of the runtime.
710           | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
711
712 ## This rule can be used to see if the headers are more or less
713 ## correct.
714 header-check: libgcj-$(gcc_version).jar $(nat_headers)
715         rm -f htest.cc; \
716         for h in $(nat_headers); do \
717           echo "#include \"$$h\"" >> htest.cc; \
718         done; \
719         $(CXXCOMPILE) -fsyntax-only htest.cc
720
721 ## This rule can be used to see if all the .class files verify
722 ## correctly.
723 class-check: libgcj-$(gcc_version).jar
724         @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
725         while read f; do \
726           echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
727           if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
728           :; else ok=1; fi; \
729         done; exit $$ok
730
731 ## This rule checks whether write_entries_to_file works properly.
732 write-entries-to-file-check:
733         @echo Creating list of files to link...
734         @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
735
736 ## ################################################################
737
738 ##
739 ## The `jv-convert' program and code to rebuild the converter header
740 ## files.
741 ##
742
743 ## it only makes sense to try to rebuild the JIS .h files on native
744 ## systems.
745 if NATIVE
746 if MAINTAINER_MODE
747 noinst_PROGRAMS += gen-from-JIS
748
749 gen_from_JIS_SOURCES = \
750         gnu/gcj/convert/gen-from-JIS.c \
751         gnu/gcj/convert/make-trie.c \
752         gnu/gcj/convert/make-trie.h
753
754 gen_from_JIS_DEPENDENCIES = \
755         gnu/gcj/convert/JIS0201.h \
756         gnu/gcj/convert/JIS0208.h \
757         gnu/gcj/convert/JIS0212.h
758
759 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
760          ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
761
762 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
763          ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
764
765 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
766          ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
767
768 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
769 # You can get it from
770 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
771
772 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
773         echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
774         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
775         | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2)  /*\3 */|p' \
776         >> tmp-0201; \
777         mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
778
779 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
780 # You can get it from
781 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
782
783 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
784         echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
785         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
786         | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4)  /*\5 */|p' \
787         >> tmp-0208; \
788         mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
789
790 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
791 # You can get it from
792 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
793
794 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
795         echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
796         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
797         | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3)  /*\4 */|p' \
798         >> tmp-0212; \
799         mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
800
801 endif
802 endif 
803
804
805 jv_convert_SOURCES =
806 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
807 ## need this because we are explicitly using libtool to link using the
808 ## `.la' file.
809 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
810         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
811 jv_convert_LINK = $(GCJLINK)
812 ## We don't explicitly link in the libraries we need; libgcj.la brings
813 ## in all dependencies.  We need the -L so that gcj can find libgcj
814 ## with `-lgcj', but it must come first, otherwise the -L flags
815 ## brought in from libgcj.la would cause the install directories to be
816 ## searched before the build-tree ones, and we'd get errors because of
817 ## different libraries with the same SONAME from picky linkers such as
818 ## Solaris'.  FIXME: should be _libs on some systems.
819 jv_convert_LDADD = -L$(here)/.libs libgcj.la
820 ## Depend on the spec file to make sure it is up to date before
821 ## linking this program.
822 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
823
824 gcj_dbtool_SOURCES = \
825 gnu/gcj/tools/gcj_dbtool/natMain.cc
826
827 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
828 ## need this because we are explicitly using libtool to link using the
829 ## `.la' file.
830 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
831         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
832 gcj_dbtool_LINK = $(GCJLINK)
833 ## We don't explicitly link in the libraries we need; libgcj.la brings
834 ## in all dependencies.  We need the -L so that gcj can find libgcj
835 ## with `-lgcj', but it must come first, otherwise the -L flags
836 ## brought in from libgcj.la would cause the install directories to be
837 ## searched before the build-tree ones, and we'd get errors because of
838 ## different libraries with the same SONAME from picky linkers such as
839 ## Solaris'.  FIXME: should be _libs on some systems.
840 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
841 ## Depend on the spec file to make sure it is up to date before
842 ## linking this program.
843 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
844
845 gc_analyze_SOURCES =
846
847 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
848 ## need this because we are explicitly using libtool to link using the
849 ## `.la' file.
850 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
851         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
852 gc_analyze_LINK = $(GCJLINK)
853 ## See jv_convert_LDADD.
854 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
855 ## Depend on the spec file to make sure it is up to date before
856 ## linking this program.
857 gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
858
859 gij_SOURCES = 
860 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
861 ## need this because we are explicitly using libtool to link using the
862 ## `.la' file.
863 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
864         -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
865         $(extra_gij_ldflags) 
866 gij_LINK = $(GCJLINK)
867 ## See jv_convert_LDADD.
868 gij_LDADD = -L$(here)/.libs libgij.la
869 ## Depend on the spec file to make sure it is up to date before
870 ## linking this program.
871 gij_DEPENDENCIES = libgij.la
872
873 ## Build an ecjx from a .jar.
874 ecjx_SOURCES = ecjx.cc
875 ## We use the BC ABI here so that we don't need to compile ecj.jar.
876 ## Hopefully the user has compiled it into his system .db.
877 ## However, even if not it will run reasonably quickly.
878
879 ECJX_BASE_FLAGS = -findirect-dispatch \
880         --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
881
882 if NATIVE
883
884 ecjx_LINK = $(GCJLINK)
885
886 if ENABLE_SHARED
887 ## Use ecj.jar at runtime.
888 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
889 else !ENABLE_SHARED
890 ## Use ecj.jar at compile time.
891 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
892 endif !ENABLE_SHARED
893
894 ecjx_LDADD = -L$(here)/.libs $(extra_ldflags)
895 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
896 if USE_LIBGCJ_BC
897 ecjx_DEPENDENCIES += libgcj_bc.la
898 else
899 ecjx_LDADD += libgcj.la
900 endif
901
902 else !NATIVE
903
904 ecjx_LINK = $(GCJ_FOR_ECJX_LINK)
905 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
906 ecjx_LDADD = 
907 ecjx_DEPENDENCIES = 
908
909 endif !NATIVE
910
911 ## This is a dummy definition.
912 gappletviewer_SOURCES =
913 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
914         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
915 gappletviewer_LINK = $(GCJLINK)
916 ## See jv_convert_LDADD.
917 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
918 gappletviewer_DEPENDENCIES = libgcj-tools.la
919
920 ## This is a dummy definition.
921 gjarsigner_SOURCES =
922 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
923         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
924 gjarsigner_LINK = $(GCJLINK)
925 ## See jv_convert_LDADD.
926 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
927 gjarsigner_DEPENDENCIES = libgcj-tools.la
928
929 ## This is a dummy definition.
930 gkeytool_SOURCES =
931 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
932         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
933 gkeytool_LINK = $(GCJLINK)
934 ## See jv_convert_LDADD.
935 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
936 gkeytool_DEPENDENCIES = libgcj-tools.la
937
938 ## This is a dummy definition.
939 gjar_SOURCES =
940 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
941         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
942 gjar_LINK = $(GCJLINK)
943 ## See jv_convert_LDADD.
944 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
945 gjar_DEPENDENCIES = libgcj-tools.la
946
947 ## This is a dummy definition.
948 gjavah_SOURCES =
949 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
950         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
951 gjavah_LINK = $(GCJLINK)
952 ## See jv_convert_LDADD.
953 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
954 gjavah_DEPENDENCIES = libgcj-tools.la
955
956 ## This is a dummy definition.
957 gcjh_SOURCES =
958 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
959         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
960 gcjh_LINK = $(GCJLINK)
961 ## See jv_convert_LDADD.
962 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
963 gcjh_DEPENDENCIES = libgcj-tools.la
964
965 ## This is a dummy definition.
966 gnative2ascii_SOURCES =
967 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
968         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
969 gnative2ascii_LINK = $(GCJLINK)
970 ## See jv_convert_LDADD.
971 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
972 gnative2ascii_DEPENDENCIES = libgcj-tools.la
973
974 ## This is a dummy definition.
975 gorbd_SOURCES =
976 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
977         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
978 gorbd_LINK = $(GCJLINK)
979 ## See jv_convert_LDADD.
980 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
981 gorbd_DEPENDENCIES = libgcj-tools.la
982
983 ## This is a dummy definition.
984 grmid_SOURCES =
985 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
986         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
987 grmid_LINK = $(GCJLINK)
988 ## See jv_convert_LDADD.
989 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
990 grmid_DEPENDENCIES = libgcj-tools.la
991
992 ## This is a dummy definition.
993 gserialver_SOURCES =
994 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
995         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
996 gserialver_LINK = $(GCJLINK)
997 ## See jv_convert_LDADD.
998 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
999 gserialver_DEPENDENCIES = libgcj-tools.la
1000
1001 ## This is a dummy definition.
1002 gtnameserv_SOURCES =
1003 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
1004         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1005 gtnameserv_LINK = $(GCJLINK)
1006 ## See jv_convert_LDADD.
1007 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
1008 gtnameserv_DEPENDENCIES = libgcj-tools.la
1009
1010 ## This is a dummy definition.
1011 grmic_SOURCES =
1012 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
1013         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1014 grmic_LINK = $(GCJLINK)
1015 ## See jv_convert_LDADD.
1016 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
1017 grmic_DEPENDENCIES = libgcj-tools.la
1018
1019 ## This is a dummy definition.
1020 grmiregistry_SOURCES =
1021 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
1022         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1023 grmiregistry_LINK = $(GCJLINK)
1024 ## See jv_convert_LDADD.
1025 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
1026 grmiregistry_DEPENDENCIES = libgcj-tools.la
1027
1028 ## This is a dummy definition.
1029 gjdoc_SOURCES =
1030 gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
1031         -Djava.class.path=$(ANTLR_JAR) \
1032         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1033 gjdoc_LINK = $(GCJLINK)
1034 ## See jv_convert_LDADD.
1035 gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
1036 gjdoc_DEPENDENCIES = libgcj-tools.la
1037
1038 ## ################################################################
1039 if INTERPRETER
1040 nat_jdwp_source_files = \
1041 gnu/classpath/jdwp/natVMFrame.cc \
1042 gnu/classpath/jdwp/natVMMethod.cc \
1043 gnu/classpath/jdwp/natVMVirtualMachine.cc
1044
1045 nat_jvmti_source_files = \
1046 gnu/gcj/jvmti/natBreakpoint.cc \
1047 gnu/gcj/jvmti/natNormalBreakpoint.cc
1048 else
1049 nat_jdwp_source_files = 
1050 nat_jvmti_source_files =
1051 endif
1052 ## This lists all the C++ source files in subdirectories.
1053 nat_source_files = \
1054 $(nat_jdwp_source_files) \
1055 gnu/classpath/natConfiguration.cc \
1056 gnu/classpath/natSystemProperties.cc \
1057 gnu/classpath/natVMStackWalker.cc \
1058 gnu/gcj/natCore.cc \
1059 gnu/gcj/convert/JIS0208_to_Unicode.cc \
1060 gnu/gcj/convert/JIS0212_to_Unicode.cc \
1061 gnu/gcj/convert/Unicode_to_JIS.cc \
1062 gnu/gcj/convert/natIconv.cc \
1063 gnu/gcj/convert/natInput_EUCJIS.cc \
1064 gnu/gcj/convert/natInput_SJIS.cc \
1065 gnu/gcj/convert/natOutput_EUCJIS.cc \
1066 gnu/gcj/convert/natOutput_SJIS.cc \
1067 gnu/gcj/io/natSimpleSHSStream.cc \
1068 gnu/gcj/io/shs.cc \
1069 $(nat_jvmti_source_files) \
1070 gnu/gcj/runtime/natFinalizerThread.cc \
1071 gnu/gcj/runtime/natSharedLibLoader.cc \
1072 gnu/gcj/runtime/natSystemClassLoader.cc \
1073 gnu/gcj/runtime/natStringBuffer.cc \
1074 gnu/gcj/util/natDebug.cc \
1075 gnu/gcj/util/natGCInfo.cc \
1076 gnu/java/lang/natMainThread.cc \
1077 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
1078 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
1079 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
1080 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
1081 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
1082 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
1083 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
1084 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
1085 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
1086 gnu/java/net/natPlainDatagramSocketImpl.cc \
1087 gnu/java/net/natPlainSocketImpl.cc \
1088 gnu/java/net/protocol/core/natCoreInputStream.cc \
1089 gnu/java/nio/natVMPipe.cc \
1090 gnu/java/nio/natVMSelector.cc \
1091 gnu/java/nio/natNIOServerSocket.cc \
1092 gnu/java/nio/natVMChannel.cc \
1093 gnu/java/nio/channels/natFileChannelImpl.cc \
1094 java/io/natFile.cc \
1095 java/io/natVMObjectInputStream.cc \
1096 java/io/natVMObjectStreamClass.cc \
1097 java/lang/natCharacter.cc \
1098 java/lang/natClass.cc \
1099 java/lang/natClassLoader.cc \
1100 java/lang/natConcreteProcess.cc \
1101 java/lang/natVMDouble.cc \
1102 java/lang/natVMFloat.cc \
1103 java/lang/natMath.cc \
1104 java/lang/natObject.cc \
1105 java/lang/natRuntime.cc \
1106 java/lang/natString.cc \
1107 java/lang/natAbstractStringBuffer.cc \
1108 java/lang/natSystem.cc \
1109 java/lang/natThread.cc \
1110 java/lang/natThreadLocal.cc \
1111 java/lang/natVMClassLoader.cc \
1112 java/lang/natVMProcess.cc \
1113 java/lang/natVMThrowable.cc \
1114 java/lang/ref/natReference.cc \
1115 java/lang/reflect/natArray.cc \
1116 java/lang/reflect/natConstructor.cc \
1117 java/lang/reflect/natField.cc \
1118 java/lang/reflect/natMethod.cc \
1119 java/lang/reflect/natVMProxy.cc \
1120 java/net/natVMInetAddress.cc \
1121 java/net/natVMNetworkInterface.cc \
1122 java/net/natVMURLConnection.cc \
1123 java/nio/channels/natVMChannels.cc \
1124 java/nio/natVMDirectByteBufferImpl.cc \
1125 java/security/natVMAccessController.cc \
1126 java/security/natVMAccessControlState.cc \
1127 java/text/natCollator.cc \
1128 java/util/natVMTimeZone.cc \
1129 java/util/concurrent/atomic/natAtomicLong.cc \
1130 java/util/logging/natLogger.cc \
1131 java/util/zip/natDeflater.cc \
1132 java/util/zip/natInflater.cc \
1133 sun/misc/natUnsafe.cc
1134
1135 xlib_nat_source_files = \
1136 gnu/gcj/xlib/natClip.cc \
1137 gnu/gcj/xlib/natColormap.cc \
1138 gnu/gcj/xlib/natDisplay.cc \
1139 gnu/gcj/xlib/natDrawable.cc \
1140 gnu/gcj/xlib/natFont.cc \
1141 gnu/gcj/xlib/natGC.cc \
1142 gnu/gcj/xlib/natPixmap.cc \
1143 gnu/gcj/xlib/natScreen.cc \
1144 gnu/gcj/xlib/natVisual.cc \
1145 gnu/gcj/xlib/natWMSizeHints.cc \
1146 gnu/gcj/xlib/natWindow.cc \
1147 gnu/gcj/xlib/natWindowAttributes.cc \
1148 gnu/gcj/xlib/natXAnyEvent.cc \
1149 gnu/gcj/xlib/natXButtonEvent.cc \
1150 gnu/gcj/xlib/natXColor.cc \
1151 gnu/gcj/xlib/natXConfigureEvent.cc \
1152 gnu/gcj/xlib/natXException.cc \
1153 gnu/gcj/xlib/natXExposeEvent.cc \
1154 gnu/gcj/xlib/natXImage.cc \
1155 gnu/gcj/xlib/natXUnmapEvent.cc
1156
1157 ## ################################################################
1158
1159 ##
1160 ## Creating and installing sources.zip
1161 ##
1162
1163 ## Create a zip holding all the sources.  This can be meaningfully
1164 ## used in Eclipse.
1165 src.zip:
1166         -rm -f src.zip
1167         here=`pwd`; \
1168         ( \
1169           ( cd $(srcdir)/classpath; \
1170           find java gnu javax org sun -name '*.java' -print | \
1171           while read file; do \
1172 ## Ugly code to avoid "echo -C".  Must separate each entry by a newline
1173 ## Gross but easy.
1174             echo "x-C" | sed -e 's/^.//'; \
1175             echo $(srcdir)/classpath; \
1176             echo $$file; \
1177           done ); \
1178           ( cd $(srcdir)/classpath/external/sax; \
1179           find org -name '*.java' -print | \
1180           while read file; do \
1181             echo "x-C" | sed -e 's/^.//'; \
1182             echo $(srcdir)/classpath/external/sax; \
1183             echo $$file; \
1184           done ); \
1185           ( cd $(srcdir)/classpath/external/relaxngDatatype; \
1186           find org -name '*.java' -print | \
1187           while read file; do \
1188             echo "x-C" | sed -e 's/^.//'; \
1189             echo $(srcdir)/classpath/external/relaxngDatatype; \
1190             echo $$file; \
1191           done ); \
1192           ( cd $(srcdir)/classpath/external/w3c_dom; \
1193           find org -name '*.java' -print | \
1194           while read file; do \
1195             echo "x-C" | sed -e 's/^.//'; \
1196             echo $(srcdir)/classpath/external/w3c_dom; \
1197             echo $$file; \
1198           done ); \
1199 ## Now the build tree.
1200           ( cd classpath; \
1201             find gnu java -name '*.java' -print | \
1202             while read file; do \
1203             echo "x-C" | sed -e 's/^.//'; \
1204             echo `pwd`; \
1205             echo $$file; \
1206           done ); \
1207         ) | \
1208 ## Many of the above circumlocutions were because ZIP used to be a
1209 ## relative path to fastjar.  It didn't seem worthwhile to change the
1210 ## code when we moved to an external jar.
1211         $(JAR) -cfM@ $$here/src.zip
1212 ## Override GNU Classpath sources with libgcj replacements.
1213         here=`pwd`; \
1214         ( \
1215           ( cd $(srcdir); \
1216           find gnu java -name '*.java' -print | \
1217           while read file; do \
1218             echo "x-C" | sed -e 's/^.//'; \
1219             echo $(srcdir); \
1220             echo $$file; \
1221           done ); \
1222         ) | \
1223         $(JAR) -ufM@ $$here/src.zip
1224
1225 ## We use a variable for this in case the user wants to override it.
1226 sourcesdir = $(jardir)
1227
1228 install-src.zip: src.zip
1229         $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
1230
1231
1232 ## ################################################################
1233
1234 ##
1235 ## Dependency tracking madness.
1236 ##
1237
1238 ## This is an evil hack to work around an automake limitation.  We
1239 ## need to ensure that all CNI headers are built, not just the ones
1240 ## used internally by libgcj. We can't make the .o files depend on
1241 ## nat_headers, because in that case we'll force a complete rebuild of
1242 ## the C++ code whenever any .java file is touched.  So instead we
1243 ## have a dummy rule which is only used once, namely the first time a
1244 ## build is done.  On subsequent builds, the dependency tracking for
1245 ## the .cc compilations will have picked up the .h files, and these
1246 ## will be built directly as needed.
1247
1248 headers.stamp:
1249 ## Note that we don't use a real dependency here, since we don't want
1250 ## to rebuild all the headers here when the header list changes.  If
1251 ## we did rebuild here, then any addition of a .java file would cause
1252 ## a large number of recompilations.
1253         $(MAKE) create-headers
1254         @echo > headers.stamp
1255
1256 headers_to_make = $(nat_headers)
1257 if XLIB_AWT
1258 headers_to_make += $(xlib_nat_headers)
1259 endif
1260
1261 create-headers: $(headers_to_make)
1262
1263 .PHONY: create-headers
1264
1265 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1266 $(libgij_la_OBJECTS): headers.stamp
1267 $(libjvm_la_OBJECTS): headers.stamp
1268
1269 ## ################################################################
1270
1271 ##
1272 ## This section is for make and multilib madness.
1273 ##
1274
1275 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1276 # values defined in terms of make variables, as is the case for CC and
1277 # friends when we are called from the top level Makefile.
1278 AM_MAKEFLAGS = \
1279         "AR_FLAGS=$(AR_FLAGS)" \
1280         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1281         "CFLAGS=$(CFLAGS)" \
1282         "CXXFLAGS=$(CXXFLAGS)" \
1283         "CPPFLAGS=$(CPPFLAGS)" \
1284         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1285         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1286         "INSTALL=$(INSTALL)" \
1287         "INSTALL_DATA=$(INSTALL_DATA)" \
1288         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1289         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1290         "GCJFLAGS=$(GCJFLAGS)" \
1291         "LDFLAGS=$(LDFLAGS)" \
1292         "LIBCFLAGS=$(LIBCFLAGS)" \
1293         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1294         "MAKE=$(MAKE)" \
1295         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1296         "PICFLAG=$(PICFLAG)" \
1297         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1298         "SHELL=$(SHELL)" \
1299         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1300         "exec_prefix=$(exec_prefix)" \
1301         "datadir=$(datadir)" \
1302         "infodir=$(infodir)" \
1303         "libdir=$(libdir)" \
1304         "mandir=$(mandir)" \
1305         "prefix=$(prefix)" \
1306         "gxx_include_dir=$(gxx_include_dir)" \
1307         "AR=$(AR)" \
1308         "AS=$(AS)" \
1309         "LD=$(LD)" \
1310         "LIBCFLAGS=$(LIBCFLAGS)" \
1311         "NM=$(NM)" \
1312         "PICFLAG=$(PICFLAG)" \
1313         "RANLIB=$(RANLIB)" \
1314         "DESTDIR=$(DESTDIR)" \
1315         "JAR=$(JAR)"
1316
1317 # Subdir rules rely on $(FLAGS_TO_PASS)
1318 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1319
1320 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1321
1322 MAKEOVERRIDES=
1323
1324 # No install-html or install-pdf support in automake yet
1325 .PHONY: install-html install-pdf
1326 install-html:
1327 install-pdf:
1328
1329 # Multilib support variables.
1330 MULTISRCTOP =
1331 MULTIBUILDTOP =
1332 MULTIDIRS =
1333 MULTISUBDIR =
1334 MULTIDO = true
1335 MULTICLEAN = true
1336
1337 # Multilib support.
1338 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1339         maintainer-clean-multi
1340
1341 all-recursive: all-multi
1342 install-recursive: install-multi
1343 mostlyclean-recursive: mostlyclean-multi
1344 clean-recursive: clean-multi
1345 distclean-recursive: distclean-multi
1346 maintainer-clean-recursive: maintainer-clean-multi
1347
1348 all-multi:
1349         : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1350 install-multi:
1351         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1352 mostlyclean-multi:
1353         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1354 clean-multi:
1355         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1356 distclean-multi:
1357         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1358 maintainer-clean-multi:
1359         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean