1 ## Process this file with automake to produce Makefile.in.
3 AUTOMAKE_OPTIONS = foreign subdir-objects
5 ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
7 # May be used by various substitution variables.
8 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
10 SUBDIRS = $(DIRLTDL) gcj include classpath
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.
20 # $(1): variable containing entries to iterate over
22 write_entries_to_file_split = 50
23 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
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)))
31 ## ################################################################
33 # autoconf2.13's target_alias
34 target_noncanonical = @target_noncanonical@
36 # This is required by TL_AC_GXX_INCLUDE_DIR.
37 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
39 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
42 ## What gets installed, and where.
45 toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la
46 toolexecmainlib_DATA = libgcj.spec
49 toolexeclib_LTLIBRARIES += libgcj_bc.la
53 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
56 dbexec_LTLIBRARIES = libjvm.la
58 pkgconfigdir = $(libdir)/pkgconfig
60 jardir = $(datadir)/java
61 jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
63 jar_DATA += $(ECJ_BUILD_JAR)
67 JAVA_HOME_DIR = $(JAVA_HOME)
68 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
70 JAVA_HOME_DIR = $(prefix)
71 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
74 ## Name of the default .db.
76 ## Compiler specific component of the .db file
77 gcjsubdir = @gcjsubdir@
78 db_pathtail = $(gcjsubdir)/$(db_name)
80 ## For now, only on native systems. FIXME.
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
91 bin_PROGRAMS = $(bin_programs)
93 noinst_PROGRAMS += $(bin_programs)
96 ## It is convenient to actually build and install the default database
97 ## when gcj-dbtool is available.
98 dbexec_DATA = $(db_name)
101 bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
104 bin_SCRIPTS += contrib/aot-compile-rpm
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
114 ## ################################################################
117 ## Compilers and compilation flags.
120 ## The compiler with whatever flags we want for both -c and -C
122 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
124 extra_ldflags_libjava = @extra_ldflags_libjava@
125 extra_ldflags = @extra_ldflags@
128 extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
131 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
132 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
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 $@
141 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
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.
152 -fnon-call-exceptions \
154 -fdollars-in-identifiers \
156 -D_FILE_OFFSET_BITS=64 \
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)\""
174 -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
176 -Wno-deprecated -fbootstrap-classes
178 AM_CFLAGS = @LIBGCJ_CFLAGS@
180 AM_CFLAGS += $(WARNINGS)
183 if SUPPRESS_LIBGCJ_BC
186 LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
189 if BUILD_LIBGCJ_REDUCED_REFLECTION
190 LIBGCJ_REDUCED_REFLECTION_FLAGS = -freduced-reflection
192 LIBGCJ_REDUCED_REFLECTION_FLAGS =
195 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
196 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
199 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
201 LIBFFIINCS = @LIBFFIINCS@
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)
211 BOOTCLASSPATH = $(srcdir)/classpath/lib
213 ## ################################################################
216 ## How to build libgcj.a and libgcj.jar
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)
228 libgcj_interpret_source_files = jvmti.cc interpret.cc
230 libgcj_interpret_source_files =
233 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
234 link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
237 ## We need to compile at least the interpreter this way.
238 interpret.lo: AM_CXXFLAGS += -fwrapv
241 libgcj_la_SOURCES += boehm.cc
245 libgcj_la_SOURCES += nogc.cc
248 if USING_POSIX_PLATFORM
249 libgcj_la_SOURCES += posix.cc
252 if USING_WIN32_PLATFORM
253 libgcj_la_SOURCES += win32.cc
257 libgcj_la_SOURCES += darwin.cc
260 if USING_POSIX_THREADS
261 libgcj_la_SOURCES += posix-threads.cc
264 if USING_WIN32_THREADS
265 libgcj_la_SOURCES += win32-threads.cc
269 libgcj_la_SOURCES += no-threads.cc
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)
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)
284 classpath/native/fdlibm/libfdlibm.la \
285 java/lang/Object.lo \
287 java/process-$(PLATFORM).lo \
288 $(all_packages_source_files:.list=.lo) \
291 $(LIBFFI) $(ZLIBS) $(GCLIBS)
292 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
293 java/lang/Object.lo \
295 java/process-$(PLATFORM).lo \
296 $(all_packages_source_files:.list=.lo) \
297 $(LIBLTDL) $(libgcj_la_LIBADD)
299 libgcj_la_DEPENDENCIES += $(srcdir)/libgcj.ver
301 libgcj_la_LINK = $(LIBLINK)
303 ## A hack to make sure the various gcj-related macros, like
304 ## LTGCJCOMPILE, are defined by automake. This is never actually
306 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
308 # We compile libgcj_tools with -findirect-dispatch so that they can
309 # depend on external classes: in particular, gjdoc uses antlr. In
310 # addition, -fno-bootstrap-classes ensures that the tools are loaded
311 # by the system class loader rather than the bootstrap class loader:
312 # only core library classes should be loaded by the bootstrap loader.
313 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
314 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
315 -fno-bootstrap-classes -fno-indirect-classes \
316 -fsource-filename=$(here)/classpath/tools/all-classes.lst
317 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
318 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
319 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
320 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
321 libgcj_tools_la_LINK = $(LIBLINK)
324 libjvm_la_SOURCES = jni-libjvm.cc
325 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
326 ## See jv_convert_LDADD.
327 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
328 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC)
330 ## The .db file. This rule is only used for native builds, so it is
331 ## safe to invoke gcj-dbtool.
332 $(db_name): gcj-dbtool$(EXEEXT)
333 ## In case it exists already.
335 ## We don't actually care if it fails -- if it does, just make an
336 ## empty file. This is simpler than trying to discover when mmap is
338 ./gcj-dbtool -n $(db_name) || touch $(db_name)
340 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
341 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
342 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
343 libgcj.la libgcj.spec \
344 $(lib_gnu_awt_xlib_la_LIBADD)
345 ## We require libstdc++-v3 to be in the same build tree.
346 lib_gnu_awt_xlib_la_CPPFLAGS = \
348 -I../libstdc++-v3/include \
349 -I../libstdc++-v3/include/$(target_noncanonical) \
350 -I$(srcdir)/../libstdc++-v3/libsupc++
351 ## The mysterious backslash in the grep pattern is consumed by make.
352 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
353 @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
354 -rpath $(toolexeclibdir) \
355 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
356 lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
358 ## Support for libgcj_bc: dummy shared library.
360 ## This lets us have one soname in BC objects and another in C++ ABI objects.
361 libgcj_bc_la_SOURCES = libgcj_bc.c
362 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
363 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
364 libgcj_bc_la_LIBADD = libgcj.la
365 libgcj_bc_la_DEPENDENCIES = libgcj.la
366 libgcj_bc_la_LINK = $(LIBLINK)
367 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
368 ## USE_LIBGCJ_BC shouldn't be set on other targets.
369 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
372 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
374 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
375 $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
376 $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
377 rm .libs/libgcj_bc.so; \
378 mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
379 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
380 -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
381 rm .libs/libgcj_bc.so.1; \
382 $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
384 ## Note that property_files is defined in sources.am.
385 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
387 $(propertyo_files): %.lo: classpath/resource/%
388 $(mkinstalldirs) `dirname $@`; \
389 $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
391 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
392 ## Note that this now omits the property files.
393 ## It doesn't matter since we don't use the jar at runtime.
394 here=`pwd`; cd $(srcdir)/classpath/lib; \
395 find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
396 $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
398 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
401 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
402 DISTCLEANFILES = native.dirs
405 ## Use libtool rm to remove each libtool object
406 find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
409 ## Remove every .d file that was created.
410 find . -name '*.d' -print | xargs rm -f
412 # Just remove the objects from C++ sources, for testing the C++ compiler.
414 rm -f $(nat_files) $(xlib_nat_files)
416 SUFFIXES = .class .java .h .properties .list
418 ## Pass the list of object files to libtool in a temporary file to
419 ## avoid tripping platform command line length limits.
420 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
421 @echo Creating list of files to link...
422 @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
423 $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
424 -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
426 ## ################################################################
428 ## Compiling a list of java sources to a single .o.
430 # Concurrent things use reflection internally.
431 java/util/concurrent.lo \
432 java/util/concurrent/atomic.lo \
433 java/util/concurrent/locks.lo: LIBGCJ_REDUCED_REFLECTION_FLAGS =
436 $(LTGCJCOMPILE) $(LIBGCJ_REDUCED_REFLECTION_FLAGS) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
438 java/lang/Object.lo: classpath/lib/java/lang/Object.class
439 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
441 java/lang/Class.lo: classpath/lib/java/lang/Class.class
442 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
444 ## ################################################################
446 ## This pulls in a number of variable and target definitions.
449 ## ################################################################
452 ## How to build header files.
455 ## We have special rules for certain headers.
456 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
457 java/lang/String.h java/lang/reflect/Constructor.h \
458 java/lang/reflect/Field.h java/lang/reflect/Method.h \
459 java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
461 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
462 java/io/ObjectInputStream$$GetField.h \
463 java/nio/DirectByteBufferImpl$$ReadWrite.h \
464 java/nio/channels/Pipe$$SinkChannel.h \
465 java/nio/channels/Pipe$$SourceChannel.h \
466 java/lang/VMProcess$ImmediateEOFInputStream.h \
467 java/lang/reflect/Proxy$$ProxyData.h \
468 java/lang/reflect/Proxy$$ProxyType.h \
469 gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
470 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
471 gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
472 gnu/java/nio/PipeImpl$$SourceChannelImpl.h
474 generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
479 $(generic_header_files): gcjh.stamp
481 gcjh.stamp: classpath/lib/compile-classes
482 if JAVA_MAINTAINER_MODE
483 $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
484 --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
488 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
489 nat_headers_install = $(ordinary_header_files)
491 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
493 ## Headers we maintain by hand and which we want to install.
494 extra_headers = java/lang/Object.h java/lang/Class.h
496 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
499 install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
500 install-libexecsubPROGRAMS
501 ## Support for libgcj_bc: dummy shared library used only at link-time.
503 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
504 ## libtool's .la file, this prevents libtool resetting the lib again
506 @echo Installing dummy lib libgcj_bc.so.1.0.0; \
507 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
508 mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
509 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
510 -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
511 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
512 $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
513 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
516 ## Undo any prepending of the target prefix and transform
517 ## to the actual host's executable suffix.
518 mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
521 ## Install the headers. It is fairly ugly that we have to do this by
523 install_data_local_split = 50
526 ## Install the .pc file.
527 @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
528 file="libgcj-$${pc_version}.pc"; \
529 $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
530 echo " $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
531 $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
532 ## We use a GNU make trick here so that we don't go over the command
533 ## length limit of some shells.
534 @echo Creating list of headers to install...
535 @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
536 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
537 while read file; do echo "$$file $$file"; done < tmp-ilist | \
538 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
539 $(AWK) 'BEGIN { files["."] = "" } \
540 { files[$$2] = files[$$2] " " $$1; \
541 if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
542 END { for (dir in files) print dir, files[dir] }' | \
543 while read dir files; do \
544 xfiles=; for file in $$files; do \
545 if test -f "$$file"; then xfiles="$$xfiles $$file"; \
546 else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
547 test -z "$$xfiles" || { \
548 test "x$$dir" = x. || { \
549 echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
550 $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
551 echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
552 $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
555 ## Install inner class headers.
556 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
557 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
558 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
559 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
560 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
561 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
562 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
563 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
564 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
565 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
566 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
567 ## Install Python modules for aot-compile.
568 $(mkinstalldirs) $(DESTDIR)$(python_mod_dir); \
569 $(INSTALL_DATA) $(srcdir)/contrib/classfile.py \
570 $(DESTDIR)$(python_mod_dir)/classfile.py; \
571 $(INSTALL_DATA) contrib/aotcompile.py \
572 $(DESTDIR)$(python_mod_dir)/aotcompile.py;
574 ## Create sdk style directories
575 $(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
576 $(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
577 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)
578 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
579 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)
580 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
582 $(PERL) -e 'use File::Spec; \
583 print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
585 RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
586 ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
587 $(DESTDIR)$(SDK_BIN_DIR)/java; \
588 ln -sf $$RELATIVE/`echo gjar | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
589 $(DESTDIR)$(SDK_BIN_DIR)/jar; \
590 ln -sf $$RELATIVE/`echo gjdoc | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
591 $(DESTDIR)$(SDK_BIN_DIR)/javadoc; \
592 ln -sf $$RELATIVE/`echo grmic | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
593 $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
594 ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
595 $(DESTDIR)$(SDK_BIN_DIR)/javah; \
596 ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
597 $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
598 ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
599 $(DESTDIR)$(SDK_BIN_DIR)/jarsigner; \
600 ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
601 $(DESTDIR)$(SDK_BIN_DIR)/rmiregistry; \
602 ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
603 $(DESTDIR)$(SDK_BIN_DIR)/keytool; \
604 ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
605 $(DESTDIR)$(SDK_BIN_DIR)/orbd; \
606 ln -sf $$RELATIVE/`echo gnative2ascii | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
607 $(DESTDIR)$(SDK_BIN_DIR)/native2ascii; \
608 ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
609 $(DESTDIR)$(SDK_BIN_DIR)/rmid; \
610 ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
611 $(DESTDIR)$(SDK_BIN_DIR)/tnameserv; \
612 ln -sf $$RELATIVE/`echo gserialver | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
613 $(DESTDIR)$(SDK_BIN_DIR)/serialver; \
614 RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(JRE_BIN_DIR)); \
615 ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
616 $(DESTDIR)$(JRE_BIN_DIR)/rmiregistry; \
617 ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
618 $(DESTDIR)$(JRE_BIN_DIR)/keytool; \
619 ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
620 $(DESTDIR)$(JRE_BIN_DIR)/java; \
621 ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
622 $(DESTDIR)$(JRE_BIN_DIR)/orbd; \
623 ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
624 $(DESTDIR)$(JRE_BIN_DIR)/rmid; \
625 ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
626 $(DESTDIR)$(JRE_BIN_DIR)/tnameserv; \
627 $(mkinstalldirs) $(DESTDIR)$(JVM_JAR_DIR); \
628 version=$(JAVA_VERSION).$(BUILD_VERSION); \
630 cd $(DESTDIR)$(JVM_JAR_DIR); \
631 RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
632 $(DESTDIR)$(JVM_JAR_DIR)); \
633 for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
634 jndi-ldap jndi-rmi jsse sasl; \
636 ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
638 RELATIVE=$$(relative $(DESTDIR)$(jardir) \
639 $(DESTDIR)$(JVM_JAR_DIR)); \
640 for jar in *-$$version.jar; \
642 ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
643 ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|.jar|g"); \
646 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
647 RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
648 $(DESTDIR)$(JRE_LIB_DIR)/security); \
649 cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
650 ln -sf $$RELATIVE/classpath.security java.security; \
652 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/linux; \
653 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
654 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
655 $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
656 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
657 $(DESTDIR)$(JRE_LIB_DIR)); \
658 ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
659 $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
660 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
661 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)); \
662 ln -sf $$RELATIVE/libjawt.so \
663 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so; \
664 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
665 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client); \
666 ln -sf $$RELATIVE/libjvm.so \
667 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client/libjvm.so; \
668 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
669 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
670 ln -sf $$RELATIVE/libjvm.so \
671 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so; \
672 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
673 $(DESTDIR)$(SDK_LIB_DIR)); \
674 ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
675 $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
676 for headername in jawt jni; do \
677 DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
678 -print-file-name=include/$$headername.h)); \
679 RELATIVE=$$(relative $$DIRECTORY \
680 $(DESTDIR)$(SDK_INCLUDE_DIR)); \
681 ln -sf $$RELATIVE/$$headername.h \
682 $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
684 for headername in jawt_md jni_md; do \
685 DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
686 -print-file-name=include/$$headername.h)); \
687 RELATIVE=$$(relative $$DIRECTORY \
688 $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
689 ln -sf $$RELATIVE/$$headername.h \
690 $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
692 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
693 $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR));
696 ## ################################################################
699 ## Additional `check' targets for maintainer convenience.
702 ## This is used for maintainer-check. FIXME: should set from
703 ## configure using AC_CHECK_TOOL.
706 ## Try to make sure our library doesn't stomp the namespace.
707 maintainer-check: libgcj.la
708 $(NM) .libs/libgcj.a | grep ' T ' \
709 ## Anything with `4java' is assumed to be from .java source.
711 ## Anything with Jv is ok.
713 ## `terminate' and `unexpected' are part of the runtime.
714 | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
716 ## This rule can be used to see if the headers are more or less
718 header-check: libgcj-$(gcc_version).jar $(nat_headers)
720 for h in $(nat_headers); do \
721 echo "#include \"$$h\"" >> htest.cc; \
723 $(CXXCOMPILE) -fsyntax-only htest.cc
725 ## This rule can be used to see if all the .class files verify
727 class-check: libgcj-$(gcc_version).jar
728 @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
730 echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
731 if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
735 ## This rule checks whether write_entries_to_file works properly.
736 write-entries-to-file-check:
737 @echo Creating list of files to link...
738 @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
740 ## ################################################################
743 ## The `jv-convert' program and code to rebuild the converter header
747 ## it only makes sense to try to rebuild the JIS .h files on native
751 noinst_PROGRAMS += gen-from-JIS
753 gen_from_JIS_SOURCES = \
754 gnu/gcj/convert/gen-from-JIS.c \
755 gnu/gcj/convert/make-trie.c \
756 gnu/gcj/convert/make-trie.h
758 gen_from_JIS_DEPENDENCIES = \
759 gnu/gcj/convert/JIS0201.h \
760 gnu/gcj/convert/JIS0208.h \
761 gnu/gcj/convert/JIS0212.h
763 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
764 ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
766 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
767 ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
769 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
770 ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
772 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
773 # You can get it from
774 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
776 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
777 echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
778 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
779 | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2) /*\3 */|p' \
781 mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
783 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
784 # You can get it from
785 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
787 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
788 echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
789 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
790 | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4) /*\5 */|p' \
792 mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
794 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
795 # You can get it from
796 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
798 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
799 echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
800 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
801 | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3) /*\4 */|p' \
803 mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
810 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
811 ## need this because we are explicitly using libtool to link using the
813 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
814 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
815 jv_convert_LINK = $(GCJLINK)
816 ## We don't explicitly link in the libraries we need; libgcj.la brings
817 ## in all dependencies. We need the -L so that gcj can find libgcj
818 ## with `-lgcj', but it must come first, otherwise the -L flags
819 ## brought in from libgcj.la would cause the install directories to be
820 ## searched before the build-tree ones, and we'd get errors because of
821 ## different libraries with the same SONAME from picky linkers such as
822 ## Solaris'. FIXME: should be _libs on some systems.
823 jv_convert_LDADD = -L$(here)/.libs libgcj.la
824 ## Depend on the spec file to make sure it is up to date before
825 ## linking this program.
826 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
828 gcj_dbtool_SOURCES = \
829 gnu/gcj/tools/gcj_dbtool/natMain.cc
831 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
832 ## need this because we are explicitly using libtool to link using the
834 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
835 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
836 gcj_dbtool_LINK = $(GCJLINK)
837 ## We don't explicitly link in the libraries we need; libgcj.la brings
838 ## in all dependencies. We need the -L so that gcj can find libgcj
839 ## with `-lgcj', but it must come first, otherwise the -L flags
840 ## brought in from libgcj.la would cause the install directories to be
841 ## searched before the build-tree ones, and we'd get errors because of
842 ## different libraries with the same SONAME from picky linkers such as
843 ## Solaris'. FIXME: should be _libs on some systems.
844 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
845 ## Depend on the spec file to make sure it is up to date before
846 ## linking this program.
847 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
851 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
852 ## need this because we are explicitly using libtool to link using the
854 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
855 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
856 gc_analyze_LINK = $(GCJLINK)
857 ## See jv_convert_LDADD.
858 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
859 ## Depend on the spec file to make sure it is up to date before
860 ## linking this program.
861 gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
864 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
865 ## need this because we are explicitly using libtool to link using the
867 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
868 -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
870 gij_LINK = $(GCJLINK)
871 ## See jv_convert_LDADD.
872 gij_LDADD = -L$(here)/.libs libgij.la
873 ## Depend on the spec file to make sure it is up to date before
874 ## linking this program.
875 gij_DEPENDENCIES = libgij.la
877 ## Build an ecjx from a .jar.
878 ecjx_SOURCES = ecjx.cc
879 ## We use the BC ABI here so that we don't need to compile ecj.jar.
880 ## Hopefully the user has compiled it into his system .db.
881 ## However, even if not it will run reasonably quickly.
883 ECJX_BASE_FLAGS = -findirect-dispatch \
884 --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
888 ecjx_LINK = $(GCJLINK)
891 ## Use ecj.jar at runtime.
892 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
894 ## Use ecj.jar at compile time.
895 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
898 ecjx_LDADD = -L$(here)/.libs $(extra_ldflags)
899 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
901 ecjx_DEPENDENCIES += libgcj_bc.la
903 ecjx_LDADD += libgcj.la
908 ecjx_LINK = $(GCJ_FOR_ECJX_LINK)
909 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
915 ## This is a dummy definition.
916 gappletviewer_SOURCES =
917 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
918 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
919 gappletviewer_LINK = $(GCJLINK)
920 ## See jv_convert_LDADD.
921 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
922 gappletviewer_DEPENDENCIES = libgcj-tools.la
924 ## This is a dummy definition.
926 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
927 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
928 gjarsigner_LINK = $(GCJLINK)
929 ## See jv_convert_LDADD.
930 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
931 gjarsigner_DEPENDENCIES = libgcj-tools.la
933 ## This is a dummy definition.
935 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
936 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
937 gkeytool_LINK = $(GCJLINK)
938 ## See jv_convert_LDADD.
939 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
940 gkeytool_DEPENDENCIES = libgcj-tools.la
942 ## This is a dummy definition.
944 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
945 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
946 gjar_LINK = $(GCJLINK)
947 ## See jv_convert_LDADD.
948 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
949 gjar_DEPENDENCIES = libgcj-tools.la
951 ## This is a dummy definition.
953 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
954 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
955 gjavah_LINK = $(GCJLINK)
956 ## See jv_convert_LDADD.
957 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
958 gjavah_DEPENDENCIES = libgcj-tools.la
960 ## This is a dummy definition.
962 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
963 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
964 gcjh_LINK = $(GCJLINK)
965 ## See jv_convert_LDADD.
966 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
967 gcjh_DEPENDENCIES = libgcj-tools.la
969 ## This is a dummy definition.
970 gnative2ascii_SOURCES =
971 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
972 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
973 gnative2ascii_LINK = $(GCJLINK)
974 ## See jv_convert_LDADD.
975 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
976 gnative2ascii_DEPENDENCIES = libgcj-tools.la
978 ## This is a dummy definition.
980 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
981 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
982 gorbd_LINK = $(GCJLINK)
983 ## See jv_convert_LDADD.
984 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
985 gorbd_DEPENDENCIES = libgcj-tools.la
987 ## This is a dummy definition.
989 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
990 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
991 grmid_LINK = $(GCJLINK)
992 ## See jv_convert_LDADD.
993 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
994 grmid_DEPENDENCIES = libgcj-tools.la
996 ## This is a dummy definition.
998 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
999 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1000 gserialver_LINK = $(GCJLINK)
1001 ## See jv_convert_LDADD.
1002 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
1003 gserialver_DEPENDENCIES = libgcj-tools.la
1005 ## This is a dummy definition.
1006 gtnameserv_SOURCES =
1007 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
1008 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1009 gtnameserv_LINK = $(GCJLINK)
1010 ## See jv_convert_LDADD.
1011 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
1012 gtnameserv_DEPENDENCIES = libgcj-tools.la
1014 ## This is a dummy definition.
1016 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
1017 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1018 grmic_LINK = $(GCJLINK)
1019 ## See jv_convert_LDADD.
1020 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
1021 grmic_DEPENDENCIES = libgcj-tools.la
1023 ## This is a dummy definition.
1024 grmiregistry_SOURCES =
1025 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
1026 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1027 grmiregistry_LINK = $(GCJLINK)
1028 ## See jv_convert_LDADD.
1029 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
1030 grmiregistry_DEPENDENCIES = libgcj-tools.la
1032 ## This is a dummy definition.
1034 gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
1035 -Djava.class.path=$(ANTLR_JAR) \
1036 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1037 gjdoc_LINK = $(GCJLINK)
1038 ## See jv_convert_LDADD.
1039 gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
1040 gjdoc_DEPENDENCIES = libgcj-tools.la
1042 ## ################################################################
1044 nat_jdwp_source_files = \
1045 gnu/classpath/jdwp/natVMFrame.cc \
1046 gnu/classpath/jdwp/natVMMethod.cc \
1047 gnu/classpath/jdwp/natVMVirtualMachine.cc
1049 nat_jvmti_source_files = \
1050 gnu/gcj/jvmti/natBreakpoint.cc \
1051 gnu/gcj/jvmti/natNormalBreakpoint.cc
1053 nat_jdwp_source_files =
1054 nat_jvmti_source_files =
1056 ## This lists all the C++ source files in subdirectories.
1057 nat_source_files = \
1058 $(nat_jdwp_source_files) \
1059 gnu/classpath/natConfiguration.cc \
1060 gnu/classpath/natSystemProperties.cc \
1061 gnu/classpath/natVMStackWalker.cc \
1062 gnu/gcj/natCore.cc \
1063 gnu/gcj/convert/JIS0208_to_Unicode.cc \
1064 gnu/gcj/convert/JIS0212_to_Unicode.cc \
1065 gnu/gcj/convert/Unicode_to_JIS.cc \
1066 gnu/gcj/convert/natIconv.cc \
1067 gnu/gcj/convert/natInput_EUCJIS.cc \
1068 gnu/gcj/convert/natInput_SJIS.cc \
1069 gnu/gcj/convert/natOutput_EUCJIS.cc \
1070 gnu/gcj/convert/natOutput_SJIS.cc \
1071 gnu/gcj/io/natSimpleSHSStream.cc \
1073 $(nat_jvmti_source_files) \
1074 gnu/gcj/runtime/natFinalizerThread.cc \
1075 gnu/gcj/runtime/natSharedLibLoader.cc \
1076 gnu/gcj/runtime/natSystemClassLoader.cc \
1077 gnu/gcj/runtime/natStringBuffer.cc \
1078 gnu/gcj/util/natDebug.cc \
1079 gnu/gcj/util/natGCInfo.cc \
1080 gnu/java/lang/natMainThread.cc \
1081 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
1082 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
1083 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
1084 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
1085 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
1086 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
1087 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
1088 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
1089 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
1090 gnu/java/net/natPlainDatagramSocketImpl.cc \
1091 gnu/java/net/natPlainSocketImpl.cc \
1092 gnu/java/net/protocol/core/natCoreInputStream.cc \
1093 gnu/java/nio/natVMPipe.cc \
1094 gnu/java/nio/natVMSelector.cc \
1095 gnu/java/nio/natNIOServerSocket.cc \
1096 gnu/java/nio/natVMChannel.cc \
1097 gnu/java/nio/channels/natFileChannelImpl.cc \
1098 gnu/java/security/jce/prng/natVMSecureRandom.cc \
1099 java/io/natFile.cc \
1100 java/io/natVMObjectInputStream.cc \
1101 java/io/natVMObjectStreamClass.cc \
1102 java/lang/natCharacter.cc \
1103 java/lang/natClass.cc \
1104 java/lang/natClassLoader.cc \
1105 java/lang/natConcreteProcess.cc \
1106 java/lang/natVMDouble.cc \
1107 java/lang/natVMFloat.cc \
1108 java/lang/natMath.cc \
1109 java/lang/natObject.cc \
1110 java/lang/natRuntime.cc \
1111 java/lang/natString.cc \
1112 java/lang/natAbstractStringBuffer.cc \
1113 java/lang/natSystem.cc \
1114 java/lang/natThread.cc \
1115 java/lang/natThreadLocal.cc \
1116 java/lang/natVMClassLoader.cc \
1117 java/lang/natVMProcess.cc \
1118 java/lang/natVMThrowable.cc \
1119 java/lang/ref/natReference.cc \
1120 java/lang/reflect/natArray.cc \
1121 java/lang/reflect/natConstructor.cc \
1122 java/lang/reflect/natField.cc \
1123 java/lang/reflect/natMethod.cc \
1124 java/lang/reflect/natVMProxy.cc \
1125 java/net/natVMInetAddress.cc \
1126 java/net/natVMNetworkInterface.cc \
1127 java/net/natVMURLConnection.cc \
1128 java/nio/channels/natVMChannels.cc \
1129 java/nio/natVMDirectByteBufferImpl.cc \
1130 java/security/natVMAccessController.cc \
1131 java/security/natVMAccessControlState.cc \
1132 java/text/natCollator.cc \
1133 java/util/natVMTimeZone.cc \
1134 java/util/concurrent/atomic/natAtomicLong.cc \
1135 java/util/logging/natLogger.cc \
1136 java/util/zip/natDeflater.cc \
1137 java/util/zip/natInflater.cc \
1138 sun/misc/natUnsafe.cc
1140 xlib_nat_source_files = \
1141 gnu/gcj/xlib/natClip.cc \
1142 gnu/gcj/xlib/natColormap.cc \
1143 gnu/gcj/xlib/natDisplay.cc \
1144 gnu/gcj/xlib/natDrawable.cc \
1145 gnu/gcj/xlib/natFont.cc \
1146 gnu/gcj/xlib/natGC.cc \
1147 gnu/gcj/xlib/natPixmap.cc \
1148 gnu/gcj/xlib/natScreen.cc \
1149 gnu/gcj/xlib/natVisual.cc \
1150 gnu/gcj/xlib/natWMSizeHints.cc \
1151 gnu/gcj/xlib/natWindow.cc \
1152 gnu/gcj/xlib/natWindowAttributes.cc \
1153 gnu/gcj/xlib/natXAnyEvent.cc \
1154 gnu/gcj/xlib/natXButtonEvent.cc \
1155 gnu/gcj/xlib/natXColor.cc \
1156 gnu/gcj/xlib/natXConfigureEvent.cc \
1157 gnu/gcj/xlib/natXException.cc \
1158 gnu/gcj/xlib/natXExposeEvent.cc \
1159 gnu/gcj/xlib/natXImage.cc \
1160 gnu/gcj/xlib/natXUnmapEvent.cc
1162 ## ################################################################
1165 ## Creating and installing sources.zip
1168 ## Create a zip holding all the sources. This can be meaningfully
1174 ( cd $(srcdir)/classpath; \
1175 find java gnu javax org sun -name '*.java' -print | \
1176 while read file; do \
1177 ## Ugly code to avoid "echo -C". Must separate each entry by a newline
1179 echo "x-C" | sed -e 's/^.//'; \
1180 echo $(srcdir)/classpath; \
1183 ( cd $(srcdir)/classpath/external/sax; \
1184 find org -name '*.java' -print | \
1185 while read file; do \
1186 echo "x-C" | sed -e 's/^.//'; \
1187 echo $(srcdir)/classpath/external/sax; \
1190 ( cd $(srcdir)/classpath/external/relaxngDatatype; \
1191 find org -name '*.java' -print | \
1192 while read file; do \
1193 echo "x-C" | sed -e 's/^.//'; \
1194 echo $(srcdir)/classpath/external/relaxngDatatype; \
1197 ( cd $(srcdir)/classpath/external/w3c_dom; \
1198 find org -name '*.java' -print | \
1199 while read file; do \
1200 echo "x-C" | sed -e 's/^.//'; \
1201 echo $(srcdir)/classpath/external/w3c_dom; \
1204 ## Now the build tree.
1206 find gnu java -name '*.java' -print | \
1207 while read file; do \
1208 echo "x-C" | sed -e 's/^.//'; \
1213 ## Many of the above circumlocutions were because ZIP used to be a
1214 ## relative path to fastjar. It didn't seem worthwhile to change the
1215 ## code when we moved to an external jar.
1216 $(JAR) -cfM@ $$here/src.zip
1217 ## Override GNU Classpath sources with libgcj replacements.
1221 find gnu java -name '*.java' -print | \
1222 while read file; do \
1223 echo "x-C" | sed -e 's/^.//'; \
1228 $(JAR) -ufM@ $$here/src.zip
1230 ## We use a variable for this in case the user wants to override it.
1231 sourcesdir = $(jardir)
1233 install-src.zip: src.zip
1234 $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
1237 ## ################################################################
1240 ## Dependency tracking madness.
1243 ## This is an evil hack to work around an automake limitation. We
1244 ## need to ensure that all CNI headers are built, not just the ones
1245 ## used internally by libgcj. We can't make the .o files depend on
1246 ## nat_headers, because in that case we'll force a complete rebuild of
1247 ## the C++ code whenever any .java file is touched. So instead we
1248 ## have a dummy rule which is only used once, namely the first time a
1249 ## build is done. On subsequent builds, the dependency tracking for
1250 ## the .cc compilations will have picked up the .h files, and these
1251 ## will be built directly as needed.
1254 ## Note that we don't use a real dependency here, since we don't want
1255 ## to rebuild all the headers here when the header list changes. If
1256 ## we did rebuild here, then any addition of a .java file would cause
1257 ## a large number of recompilations.
1258 $(MAKE) create-headers
1259 @echo > headers.stamp
1261 headers_to_make = $(nat_headers)
1263 headers_to_make += $(xlib_nat_headers)
1266 create-headers: $(headers_to_make)
1268 .PHONY: create-headers
1270 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1271 $(libgij_la_OBJECTS): headers.stamp
1272 $(libjvm_la_OBJECTS): headers.stamp
1274 ## ################################################################
1277 ## This section is for make and multilib madness.
1280 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1281 # values defined in terms of make variables, as is the case for CC and
1282 # friends when we are called from the top level Makefile.
1284 "AR_FLAGS=$(AR_FLAGS)" \
1285 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1286 "CFLAGS=$(CFLAGS)" \
1287 "CXXFLAGS=$(CXXFLAGS)" \
1288 "CPPFLAGS=$(CPPFLAGS)" \
1289 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1290 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1291 "INSTALL=$(INSTALL)" \
1292 "INSTALL_DATA=$(INSTALL_DATA)" \
1293 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1294 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1295 "GCJFLAGS=$(GCJFLAGS)" \
1296 "LDFLAGS=$(LDFLAGS)" \
1297 "LIBCFLAGS=$(LIBCFLAGS)" \
1298 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1300 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1301 "PICFLAG=$(PICFLAG)" \
1302 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1304 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1305 "exec_prefix=$(exec_prefix)" \
1306 "datadir=$(datadir)" \
1307 "infodir=$(infodir)" \
1308 "libdir=$(libdir)" \
1309 "mandir=$(mandir)" \
1310 "prefix=$(prefix)" \
1311 "gxx_include_dir=$(gxx_include_dir)" \
1315 "LIBCFLAGS=$(LIBCFLAGS)" \
1317 "PICFLAG=$(PICFLAG)" \
1318 "RANLIB=$(RANLIB)" \
1319 "DESTDIR=$(DESTDIR)" \
1322 # Subdir rules rely on $(FLAGS_TO_PASS)
1323 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1325 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1329 # No install-html or install-pdf support in automake yet
1330 .PHONY: install-html install-pdf
1334 # Multilib support variables.
1343 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1344 maintainer-clean-multi
1346 all-recursive: all-multi
1347 install-recursive: install-multi
1348 mostlyclean-recursive: mostlyclean-multi
1349 clean-recursive: clean-multi
1350 distclean-recursive: distclean-multi
1351 maintainer-clean-recursive: maintainer-clean-multi
1354 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1356 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1358 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1360 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1362 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1363 maintainer-clean-multi:
1364 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean