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)
11 SUBDIRS = $(DIRLTDL) gcj include classpath
16 # write_entries_to_file - writes each entry in a list
17 # to the specified file. Entries are written in chunks of
18 # $(write_entries_to_file_split) to accomodate systems with
19 # severe command-line-length limitations.
21 # $(1): variable containing entries to iterate over
23 write_entries_to_file_split = 50
24 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
26 $(shell i=1; while test $$i -le $(words $(1)); do \
27 echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
28 $(shell echo $(wordlist $(range), \
29 $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \
30 | tr ' ' '\012' >> $(2)))
32 ## ################################################################
34 # autoconf2.13's target_alias
35 target_noncanonical = @target_noncanonical@
37 # This is required by TL_AC_GXX_INCLUDE_DIR.
38 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
40 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
43 ## What gets installed, and where.
46 toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la
47 toolexecmainlib_DATA = libgcj.spec
50 ## These files form a closed dependency group at the lower
51 ## edge of libjava's dependency graph, so can be separated out.
52 ## For details of how the list was generated, see the GCC wiki:
54 ## http://gcc.gnu.org/wiki/Internal_dependencies_of_libgcj
56 LOWER_PACKAGE_FILES_LO = \
59 gnu-java-awt-dnd-peer-gtk.lo \
60 gnu-java-awt-peer-gtk.lo \
61 gnu-java-awt-peer-swing.lo \
62 gnu-java-lang-management.lo \
63 gnu-javax-management.lo \
65 gnu-javax-sound-midi.lo \
71 gnu-xml-transform.lo \
73 gnu-xml-validation.lo \
75 java-lang-management.lo \
80 org-omg-CORBA_2_3.lo \
81 org-omg-CosNaming.lo \
83 org-omg-DynamicAny.lo \
85 org-omg-Messaging.lo \
86 org-omg-PortableInterceptor.lo \
87 org-omg-PortableServer.lo \
88 org-omg-SendingContext.lo \
92 META-INF/services/java.util.prefs.PreferencesFactory.in.lo \
93 META-INF/services/java.util.prefs.PreferencesFactory.lo \
94 META-INF/services/javax.sound.midi.spi.MidiDeviceProvider.lo \
95 META-INF/services/javax.sound.midi.spi.MidiFileReader.lo \
96 META-INF/services/javax.sound.midi.spi.MidiFileWriter.lo \
97 META-INF/services/javax.sound.sampled.spi.AudioFileReader.lo \
98 classpath/native/jni/classpath/jcl.lo \
99 classpath/native/jni/classpath/jnilink.lo \
100 classpath/native/jni/java-math/gnu_java_math_GMP.lo \
101 classpath/tools/libgcj_tools_la-tools.lo \
105 gnu/gcj/io/natSimpleSHSStream.lo \
107 gnu/gcj/tools/gcj_dbtool.lo \
108 gnu/gcj/util/natDebug.lo \
109 gnu/gcj/util/natGCInfo.lo \
110 gnu/java/awt/dnd.lo \
111 gnu/java/awt/font.lo \
112 gnu/java/awt/image.lo \
113 gnu/java/awt/print.lo \
114 gnu/java/awt/font/autofit.lo \
115 gnu/java/awt/font/opentype.lo \
116 gnu/java/awt/font/opentype/truetype.lo \
117 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.lo \
118 gnu/java/lang/management/natVMCompilationMXBeanImpl.lo \
119 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.lo \
120 gnu/java/lang/management/natVMMemoryMXBeanImpl.lo \
121 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.lo \
122 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.lo \
123 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.lo \
124 gnu/java/lang/management/natVMRuntimeMXBeanImpl.lo \
125 gnu/java/lang/management/natVMThreadMXBeanImpl.lo \
126 gnu/java/net/local.lo \
127 gnu/java/net/protocol/ftp.lo \
128 gnu/java/net/protocol/gcjlib.lo \
129 gnu/java/net/protocol/https.lo \
130 gnu/javax/imageio.lo \
133 gnu/javax/activation/viewers.lo \
134 gnu/javax/imageio/bmp.lo \
135 gnu/javax/imageio/gif.lo \
136 gnu/javax/imageio/jpeg.lo \
137 gnu/javax/imageio/png.lo \
138 gnu/javax/naming/giop.lo \
139 gnu/javax/naming/ictxImpl/trans.lo \
140 gnu/javax/naming/jndi/url/corbaname.lo \
141 gnu/javax/naming/jndi/url/rmi.lo \
142 gnu/javax/print/ipp.lo \
143 gnu/javax/print/ipp/attribute.lo \
144 gnu/javax/print/ipp/attribute/defaults.lo \
145 gnu/javax/print/ipp/attribute/job.lo \
146 gnu/javax/print/ipp/attribute/printer.lo \
147 gnu/javax/print/ipp/attribute/supported.lo \
148 gnu/javax/security/auth/login.lo \
149 gnu/javax/sound/sampled/AU.lo \
150 gnu/javax/sound/sampled/WAV.lo \
151 gnu/javax/swing/plaf/gnu.lo \
152 gnu/javax/swing/plaf/metal.lo \
157 java/security/acl.lo \
158 javax/activation.lo \
160 javax/management.lo \
165 javax/transaction.lo \
166 javax/management/loading.lo \
167 javax/management/openmbean.lo \
168 javax/management/remote.lo \
169 javax/management/remote/rmi.lo \
170 javax/naming/directory.lo \
171 javax/naming/event.lo \
172 javax/naming/ldap.lo \
173 javax/naming/spi.lo \
174 javax/print/attribute.lo \
175 javax/print/event.lo \
176 javax/print/attribute/standard.lo \
177 javax/security/cert.lo \
178 javax/security/auth/kerberos.lo \
179 javax/security/auth/login.lo \
180 javax/security/auth/spi.lo \
181 javax/sound/midi.lo \
182 javax/sound/midi/spi.lo \
183 javax/swing/plaf/multi.lo \
184 javax/swing/plaf/synth.lo \
185 javax/swing/text/rtf.lo \
186 javax/swing/text/html/default.css.lo \
187 javax/transaction/xa.lo \
192 ## Lists of all .lo files, and filtered core and non-core lists.
194 ALL_PACKAGE_SOURCE_FILES_LO = $(all_packages_source_files:.list=.lo) $(propertyo_files) $(bc_objects)
195 NONCORE_PACKAGE_SOURCE_FILES_LO = $(filter $(LOWER_PACKAGE_FILES_LO),$(ALL_PACKAGE_SOURCE_FILES_LO))
196 CORE_PACKAGE_SOURCE_FILES_LO = $(filter-out $(LOWER_PACKAGE_FILES_LO),$(ALL_PACKAGE_SOURCE_FILES_LO))
199 ## Assign objects to output libraries.
202 toolexeclib_LTLIBRARIES += libgcj-noncore.la
203 libgcj_noncore_la_LIBADD_SUBOBJECTS = $(NONCORE_PACKAGE_SOURCE_FILES_LO)
204 libgcj_la_LIBADD_SUBOBJECTS = $(CORE_PACKAGE_SOURCE_FILES_LO)
205 LIBJAVA_LDFLAGS_NOUNDEF = $(LIBGCJ_SUBLIB_LTFLAGS)
206 LIBJAVA_CORE_EXTRA = @LIBGCJ_SUBLIB_CORE_EXTRA_DEPS@
208 # If not building sublibraries, everything goes in libgcj,
209 # and it cannot be usefully built shared on PE platforms.
210 libgcj_la_LIBADD_SUBOBJECTS = $(ALL_PACKAGE_SOURCE_FILES_LO)
211 LIBJAVA_LDFLAGS_NOUNDEF =
216 toolexeclib_LTLIBRARIES += install/libgcj_bc.la
217 noinst_LTLIBRARIES = libgcj_bc.la
221 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
224 dbexec_LTLIBRARIES = libjvm.la
226 pkgconfigdir = $(toolexeclibdir)/pkgconfig
228 jardir = $(datadir)/java
229 jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
231 jar_DATA += $(ECJ_BUILD_JAR)
235 JAVA_HOME_DIR = $(JAVA_HOME)
236 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
238 JAVA_HOME_DIR = $(prefix)
239 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
242 ## Name of the default .db.
243 db_name = classmap.db
244 ## Compiler specific component of the .db file
245 gcjsubdir = @gcjsubdir@
246 db_pathtail = $(gcjsubdir)/$(db_name)
248 ## For now, only on native systems. FIXME.
250 bin_programs = jv-convert gij grmic grmiregistry gcj-dbtool \
251 gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
252 gorbd grmid gserialver gtnameserv gc-analyze
254 bin_programs += gjdoc
259 bin_PROGRAMS = $(bin_programs)
261 noinst_PROGRAMS += $(bin_programs)
264 ## It is convenient to actually build and install the default database
265 ## when gcj-dbtool is available.
266 dbexec_DATA = $(db_name)
269 bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
272 bin_SCRIPTS += contrib/aot-compile-rpm
276 ## We build ecjx and not ecj1 because in one mode, ecjx will not work
277 ## until after 'make install', and we don't want it to be picked up in
278 ## the build tree by gcj via a -B option.
279 libexecsub_PROGRAMS = ecjx
282 ## ################################################################
285 ## Compilers and compilation flags.
288 ## The compiler with whatever flags we want for both -c and -C
290 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
292 extra_ldflags_libjava = @extra_ldflags_libjava@
293 extra_ldflags = @extra_ldflags@
297 version_arg = -Wl,--version-script=$(srcdir)/libgcj.ver
298 libgcj_la_version_arg = $(version_arg)
299 libgcj_tools_la_version_arg = $(version_arg)
300 lib_gnu_awt_xlib_la_version_arg = $(version_arg)
301 libgcj_bc_la_version_arg = $(version_arg)
303 version_dep = $(srcdir)/libgcj.ver
304 libgcj_la_version_dep = $(version_dep)
305 libgcj_tools_la_version_dep = $(version_dep)
306 lib_gnu_awt_xlib_la_version_dep = $(version_dep)
307 libgcj_bc_la_version_dep = $(version_dep)
310 libgcj_la_version_arg = -Wl,-M,libgcj.ver-sun
311 libgcj_tools_la_version_arg = -Wl,-M,libgcj_tools.ver-sun
312 lib_gnu_awt_xlib_la_version_arg = -Wl,-M,lib_gnu_awt_xlib.ver-sun
313 libgcj_bc_la_version_arg = -Wl,-M,libgcj_bc.ver-sun
315 libgcj_la_version_dep = libgcj.ver-sun
316 libgcj_tools_la_version_dep = libgcj_tools.ver-sun
317 lib_gnu_awt_xlib_la_version_dep = lib_gnu_awt_xlib.ver-sun
318 libgcj_bc_la_version_dep = libgcj_bc.ver-sun
320 # The pattern rule necessary to build the *.ver-sun mapfiles is at the end
321 # of the file, see below.
325 libgcj_la_version_arg = $(version_arg)
326 libgcj_tools_la_version_arg = $(version_arg)
327 lib_gnu_awt_xlib_la_version_arg = $(version_arg)
328 libgcj_bc_la_version_arg = $(version_arg)
331 libgcj_la_version_dep = $(version_dep)
332 libgcj_tools_la_version_dep = $(version_dep)
333 lib_gnu_awt_xlib_la_version_dep = $(version_dep)
334 libgcj_bc_la_version_dep = $(version_dep)
337 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
338 GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
339 $(JC1FLAGS) $(LTLDFLAGS) -o $@
340 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
341 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
342 LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
343 $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
344 CXXLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
345 $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
347 LIBGCC_UNWIND_INCLUDE = @LIBGCC_UNWIND_INCLUDE@
349 WARNINGS = -Wextra -Wall
350 ## Some systems don't allow `$' in identifiers by default, so we force
351 ## it with -fdollars-in-identifiers. -Wswitch-enum detects bugs in
352 ## the verifier implementation, and maybe other places. We need
353 ## _GNU_SOURCE defined for some Linux builds. It doesn't hurt to
354 ## always define it. Some systems, including Linux, need
355 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
358 -fnon-call-exceptions \
360 -fdollars-in-identifiers \
362 -D_FILE_OFFSET_BITS=64 \
366 -DPREFIX="\"$(prefix)\"" \
367 -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
368 -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
369 -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
370 -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
371 -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
372 -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
373 -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
374 -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
375 -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
376 -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
380 -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
382 -Wno-deprecated -fbootstrap-classes
384 AM_CFLAGS = @LIBGCJ_CFLAGS@
386 AM_CFLAGS += $(WARNINGS)
389 if SUPPRESS_LIBGCJ_BC
392 LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
395 if BUILD_LIBGCJ_REDUCED_REFLECTION
396 LIBGCJ_REDUCED_REFLECTION_FLAGS = -freduced-reflection
398 LIBGCJ_REDUCED_REFLECTION_FLAGS =
401 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
402 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
405 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
407 LIBFFIINCS = @LIBFFIINCS@
409 AM_CPPFLAGS = -I$(top_srcdir) \
410 -Iinclude -I$(top_srcdir)/include \
411 -I$(top_srcdir)/classpath/include \
412 -Iclasspath/include \
413 -I$(top_srcdir)/classpath/native/fdlibm \
414 $(GCINCS) $(THREADINCS) $(INCLTDL) \
415 $(LIBGCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
417 BOOTCLASSPATH = $(srcdir)/classpath/lib
419 ## ################################################################
422 ## How to build libgcj.a and libgcj.jar
425 libgij_la_SOURCES = gij.cc
426 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
428 libgij_la_DEPENDENCIES += libgcj-noncore.la
430 ## See jv_convert_LDADD.
431 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
432 ## The mysterious backslash in the grep pattern is consumed by make.
433 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
434 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
435 libgij_la_LINK = $(CXXLINK) $(libgij_la_LDFLAGS)
438 libgcj_interpret_source_files = jvmti.cc interpret.cc
440 libgcj_interpret_source_files =
443 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
444 link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
447 ## We need to compile at least the interpreter this way.
448 interpret.lo: AM_CXXFLAGS += -fwrapv
449 ## Necessary so EH works on 64-bit Solaris 2.
450 prims.lo: AM_CXXFLAGS += -fno-omit-frame-pointer
453 libgcj_la_SOURCES += boehm.cc
457 libgcj_la_SOURCES += nogc.cc
460 if USING_POSIX_PLATFORM
461 libgcj_la_SOURCES += posix.cc
464 if USING_WIN32_PLATFORM
465 libgcj_la_SOURCES += win32.cc
469 libgcj_la_SOURCES += darwin.cc
470 LIBJAVA_LDFLAGS_LIBMATH =
472 LIBJAVA_LDFLAGS_LIBMATH = -lm
475 if USING_POSIX_THREADS
476 libgcj_la_SOURCES += posix-threads.cc
479 if USING_WIN32_THREADS
480 libgcj_la_SOURCES += win32-threads.cc
484 libgcj_la_SOURCES += no-threads.cc
487 ## Objects from C++ sources in subdirs.
488 nat_files = $(nat_source_files:.cc=.lo)
489 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
491 # Include THREADLIBS here to ensure that the correct version of
492 # certain linuxthread functions get linked:
493 ## The mysterious backslash in the grep pattern is consumed by make.
494 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
495 $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
496 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
497 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL)
499 classpath/native/fdlibm/libfdlibm.la \
500 java/lang/Object.lo \
502 java/process-$(PLATFORM).lo \
503 $(libgcj_la_LIBADD_SUBOBJECTS) \
504 $(LIBFFI) $(ZLIBS) $(GCLIBS)
505 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
506 java/lang/Object.lo \
508 java/process-$(PLATFORM).lo \
509 $(ALL_PACKAGE_SOURCE_FILES_LO) \
510 $(LIBLTDL) $(libgcj_la_LIBADD) \
511 $(LIBJAVA_CORE_EXTRA) \
512 $(libgcj_la_version_dep)
513 libgcj_la_LINK = $(LIBLINK) $(libgcj_la_LDFLAGS) $(libgcj_la_version_arg)
515 ## A hack to make sure the various gcj-related macros, like
516 ## LTGCJCOMPILE, are defined by automake. This is never actually
518 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
521 ## This extra target is invoked on windows hosts only by adding it
522 ## to LIBGCJ_SUBLIB_CORE_EXTRA_SRCS in configure.host, which causes
523 ## it to be linked in to the core DLL and generate a circular import
524 ## dependency loop between the two DLLs. This is required to fix
525 ## PR42811 by ensuring that any application that links against
526 ## either always loads both at runtime.
527 DLL_VERSION=`expr \`grep -v '^\#' $(srcdir)/libtool-version | sed -e 's/\(.*\):\(.*\):.*/\1 + \2/'\``
528 libgcj-noncore-dummy.dll.a : $(srcdir)/libgcj-noncore-dummy.def
529 $(DLLTOOL) -d $^ -l $@ --dllname cyggcj-noncore-$(DLL_VERSION).dll
531 ## These are the libtool definitions for the noncore library.
532 libgcj_noncore_la_SOURCES =
533 libgcj_noncore_la_LDFLAGS = $(libgcj_la_LDFLAGS)
534 libgcj_noncore_la_LIBADD = $(libgcj_noncore_la_LIBADD_SUBOBJECTS) libgcj.la
535 libgcj_noncore_la_DEPENDENCIES = libgcj-$(gcc_version).jar $(LIBLTDL) \
536 $(libgcj_noncore_la_LIBADD) libgcj.la $(libgcj_la_version_dep)
537 libgcj_noncore_la_LINK = $(libgcj_la_LINK)
539 endif # BUILD_SUBLIBS
541 # We compile libgcj_tools with -findirect-dispatch so that they can
542 # depend on external classes: in particular, gjdoc uses antlr. In
543 # addition, -fno-bootstrap-classes ensures that the tools are loaded
544 # by the system class loader rather than the bootstrap class loader:
545 # only core library classes should be loaded by the bootstrap loader.
546 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
547 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
548 -fno-bootstrap-classes -fno-indirect-classes \
549 -fsource-filename=$(here)/classpath/tools/all-classes.lst
550 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
551 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
552 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
553 $(LIBJAVA_LDFLAGS_LIBMATH)
555 libgcj_tools_la_LIBADD = libgcj.la
556 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \
557 $(libgcj_tools_la_version_dep)
559 libgcj_tools_la_DEPENDENCIES += libgcj-noncore.la
561 libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS) \
562 $(libgcj_tools_la_version_arg)
565 libjvm_la_SOURCES = jni-libjvm.cc
566 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
568 libjvm_la_DEPENDENCIES += libgcj-noncore.la
570 ## See jv_convert_LDADD.
571 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
572 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC) \
573 $(LIBJAVA_LDFLAGS_NOUNDEF)
574 libjvm_la_LINK = $(CXXLINK) $(libjvm_la_LDFLAGS)
576 ## The .db file. This rule is only used for native builds, so it is
577 ## safe to invoke gcj-dbtool.
578 $(db_name): gcj-dbtool$(EXEEXT)
579 ## In case it exists already.
581 ## We don't actually care if it fails -- if it does, just make an
582 ## empty file. This is simpler than trying to discover when mmap is
584 ./gcj-dbtool -n $(db_name) || touch $(db_name)
586 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
587 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
588 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
589 libgcj.la libgcj.spec \
590 $(lib_gnu_awt_xlib_la_version_dep) \
591 $(lib_gnu_awt_xlib_la_LIBADD)
593 lib_gnu_awt_xlib_la_DEPENDENCIES += libgcj-noncore.la
595 lib_gnu_awt_xlib_la_CPPFLAGS = \
597 $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
598 ## The mysterious backslash in the grep pattern is consumed by make.
599 lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDFLAGS) \
600 @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
601 -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
602 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
603 lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS) \
604 $(lib_gnu_awt_xlib_la_version_arg)
606 ## Support for libgcj_bc: dummy shared library.
608 ## This lets us have one soname in BC objects and another in C++ ABI objects.
609 ## This library is not linked against libgcj.
610 libgcj_bc_la_SOURCES = libgcj_bc.c
611 install_libgcj_bc_la_SOURCES = $(libgcj_bc_la_SOURCES)
612 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
613 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
614 libgcj_bc_la_DEPENDENCIES = libgcj.la $(libgcj_bc_la_version_dep)
615 libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS) \
616 $(libgcj_bc_la_version_arg)
617 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
618 ## USE_LIBGCJ_BC shouldn't be set on other targets.
619 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
622 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
624 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
625 $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
626 $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
627 rm .libs/libgcj_bc.so; \
628 mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
629 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
630 -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
631 rm .libs/libgcj_bc.so.1; \
632 $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
634 ## This rule creates the libgcj_bc library that is actually installed.
635 install/libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES) install/$(am__dirstamp)
636 $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
637 $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS)
639 ## Note that property_files is defined in sources.am.
640 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
642 $(propertyo_files): %.lo: classpath/resource/%
643 $(mkinstalldirs) `dirname $@`; \
644 $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
646 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
647 ## Note that this now omits the property files.
648 ## It doesn't matter since we don't use the jar at runtime.
649 here=`pwd`; cd $(srcdir)/classpath/lib; \
650 find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
651 $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
653 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
656 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
657 DISTCLEANFILES = native.dirs
660 ## Use libtool rm to remove each libtool object
661 find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
664 ## Remove every .d file that was created.
665 find . -name '*.d' -print | xargs rm -f
667 # Just remove the objects from C++ sources, for testing the C++ compiler.
669 rm -f $(nat_files) $(xlib_nat_files)
671 SUFFIXES = .class .java .h .properties .list
673 ## Pass the list of object files to libtool in a temporary file to
674 ## avoid tripping platform command line length limits.
675 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
676 @echo Creating list of files to link...
677 @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
678 $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
679 -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
681 ## ################################################################
683 ## Compiling a list of java sources to a single .o.
685 # Concurrent things use reflection internally.
686 java/util/concurrent.lo \
687 java/util/concurrent/atomic.lo \
688 java/util/concurrent/locks.lo: LIBGCJ_REDUCED_REFLECTION_FLAGS =
691 $(LTGCJCOMPILE) $(LIBGCJ_REDUCED_REFLECTION_FLAGS) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
693 java/lang/Object.lo: classpath/lib/java/lang/Object.class
694 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
696 java/lang/Class.lo: classpath/lib/java/lang/Class.class
697 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
699 ## ################################################################
701 ## This pulls in a number of variable and target definitions.
704 ## ################################################################
707 ## How to build header files.
710 ## We have special rules for certain headers.
711 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
712 java/lang/String.h java/lang/reflect/Constructor.h \
713 java/lang/reflect/Field.h java/lang/reflect/Method.h \
714 java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
716 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
717 java/io/ObjectInputStream$$GetField.h \
718 java/nio/DirectByteBufferImpl$$ReadWrite.h \
719 java/nio/channels/Pipe$$SinkChannel.h \
720 java/nio/channels/Pipe$$SourceChannel.h \
721 java/lang/VMProcess$ImmediateEOFInputStream.h \
722 java/lang/reflect/Proxy$$ProxyData.h \
723 java/lang/reflect/Proxy$$ProxyType.h \
724 gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
725 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
726 gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
727 gnu/java/nio/PipeImpl$$SourceChannelImpl.h
729 generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
734 $(generic_header_files): gcjh.stamp
736 gcjh.stamp: classpath/lib/compile-classes
737 if JAVA_MAINTAINER_MODE
738 $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
739 --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
743 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
744 nat_headers_install = $(ordinary_header_files)
746 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
748 ## Headers we maintain by hand and which we want to install.
749 extra_headers = java/lang/Object.h java/lang/Class.h
751 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
754 install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
755 install-libexecsubPROGRAMS
756 ## Support for libgcj_bc: dummy shared library used only at link-time.
758 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
759 ## libtool's .la file, this prevents libtool resetting the lib again
761 @echo Installing dummy lib libgcj_bc.so.1.0.0; \
762 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
763 mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
764 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
765 -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
766 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
767 $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
768 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
771 ## Undo any prepending of the target prefix and transform
772 ## to the actual host's executable suffix.
773 mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
776 ## Install the headers. It is fairly ugly that we have to do this by
778 install_data_local_split = 50
781 ## Install the .pc file.
782 @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*[.][^.]*$$//'`; \
783 file="libgcj-$${pc_version}.pc"; \
784 $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
785 echo " $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
786 $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
787 ## We use a GNU make trick here so that we don't go over the command
788 ## length limit of some shells.
789 @echo Creating list of headers to install...
790 @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
791 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
792 while read file; do echo "$$file $$file"; done < tmp-ilist | \
793 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
794 $(AWK) 'BEGIN { files["."] = "" } \
795 { files[$$2] = files[$$2] " " $$1; \
796 if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
797 END { for (dir in files) print dir, files[dir] }' | \
798 while read dir files; do \
799 xfiles=; for file in $$files; do \
800 if test -f "$$file"; then xfiles="$$xfiles $$file"; \
801 else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
802 test -z "$$xfiles" || { \
803 test "x$$dir" = x. || { \
804 echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
805 $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
806 echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
807 $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
810 ## Install inner class headers.
811 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
812 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
813 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
814 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
815 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
816 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
817 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
818 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
819 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
820 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
821 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
822 ## Install Python modules for aot-compile.
823 $(mkinstalldirs) $(DESTDIR)$(python_mod_dir); \
824 $(INSTALL_DATA) $(srcdir)/contrib/classfile.py \
825 $(DESTDIR)$(python_mod_dir)/classfile.py; \
826 $(INSTALL_DATA) contrib/aotcompile.py \
827 $(DESTDIR)$(python_mod_dir)/aotcompile.py;
829 ## Create sdk style directories
830 $(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
831 $(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
832 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)
833 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
834 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)
835 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
837 $(PERL) -e 'use File::Spec; \
838 print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
840 RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
841 ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
842 $(DESTDIR)$(SDK_BIN_DIR)/java; \
843 ln -sf $$RELATIVE/`echo gjar | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
844 $(DESTDIR)$(SDK_BIN_DIR)/jar; \
845 ln -sf $$RELATIVE/`echo gjdoc | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
846 $(DESTDIR)$(SDK_BIN_DIR)/javadoc; \
847 ln -sf $$RELATIVE/`echo grmic | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
848 $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
849 ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
850 $(DESTDIR)$(SDK_BIN_DIR)/javah; \
851 ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
852 $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
853 ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
854 $(DESTDIR)$(SDK_BIN_DIR)/jarsigner; \
855 ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
856 $(DESTDIR)$(SDK_BIN_DIR)/rmiregistry; \
857 ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
858 $(DESTDIR)$(SDK_BIN_DIR)/keytool; \
859 ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
860 $(DESTDIR)$(SDK_BIN_DIR)/orbd; \
861 ln -sf $$RELATIVE/`echo gnative2ascii | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
862 $(DESTDIR)$(SDK_BIN_DIR)/native2ascii; \
863 ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
864 $(DESTDIR)$(SDK_BIN_DIR)/rmid; \
865 ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
866 $(DESTDIR)$(SDK_BIN_DIR)/tnameserv; \
867 ln -sf $$RELATIVE/`echo gserialver | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
868 $(DESTDIR)$(SDK_BIN_DIR)/serialver; \
869 RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(JRE_BIN_DIR)); \
870 ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
871 $(DESTDIR)$(JRE_BIN_DIR)/rmiregistry; \
872 ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
873 $(DESTDIR)$(JRE_BIN_DIR)/keytool; \
874 ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
875 $(DESTDIR)$(JRE_BIN_DIR)/java; \
876 ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
877 $(DESTDIR)$(JRE_BIN_DIR)/orbd; \
878 ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
879 $(DESTDIR)$(JRE_BIN_DIR)/rmid; \
880 ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
881 $(DESTDIR)$(JRE_BIN_DIR)/tnameserv; \
882 $(mkinstalldirs) $(DESTDIR)$(JVM_JAR_DIR); \
883 version=$(JAVA_VERSION).$(BUILD_VERSION); \
885 cd $(DESTDIR)$(JVM_JAR_DIR); \
886 RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
887 $(DESTDIR)$(JVM_JAR_DIR)); \
888 for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
889 jndi-ldap jndi-rmi jsse sasl; \
891 ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
893 RELATIVE=$$(relative $(DESTDIR)$(jardir) \
894 $(DESTDIR)$(JVM_JAR_DIR)); \
895 for jar in *-$$version.jar; \
897 ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
898 ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|.jar|g"); \
901 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
902 RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
903 $(DESTDIR)$(JRE_LIB_DIR)/security); \
904 cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
905 ln -sf $$RELATIVE/classpath.security java.security; \
907 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/linux; \
908 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
909 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
910 $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
911 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
912 $(DESTDIR)$(JRE_LIB_DIR)); \
913 ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
914 $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
915 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
916 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)); \
917 ln -sf $$RELATIVE/libjawt.so \
918 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so; \
919 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
920 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client); \
921 ln -sf $$RELATIVE/libjvm.so \
922 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client/libjvm.so; \
923 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
924 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
925 ln -sf $$RELATIVE/libjvm.so \
926 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so; \
927 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
928 $(DESTDIR)$(SDK_LIB_DIR)); \
929 ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
930 $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
931 for headername in jawt jni; do \
932 DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
933 -print-file-name=include/$$headername.h)); \
934 RELATIVE=$$(relative $$DIRECTORY \
935 $(DESTDIR)$(SDK_INCLUDE_DIR)); \
936 ln -sf $$RELATIVE/$$headername.h \
937 $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
939 for headername in jawt_md jni_md; do \
940 DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
941 -print-file-name=include/$$headername.h)); \
942 RELATIVE=$$(relative $$DIRECTORY \
943 $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
944 ln -sf $$RELATIVE/$$headername.h \
945 $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
947 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
948 $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR));
951 ## ################################################################
954 ## Additional `check' targets for maintainer convenience.
957 ## This is used for maintainer-check. FIXME: should set from
958 ## configure using AC_CHECK_TOOL.
961 ## Try to make sure our library doesn't stomp the namespace.
962 maintainer-check: libgcj.la
963 $(NM) .libs/libgcj.a | grep ' T ' \
964 ## Anything with `4java' is assumed to be from .java source.
966 ## Anything with Jv is ok.
968 ## `terminate' and `unexpected' are part of the runtime.
969 | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
971 ## This rule can be used to see if the headers are more or less
973 header-check: libgcj-$(gcc_version).jar $(nat_headers)
975 for h in $(nat_headers); do \
976 echo "#include \"$$h\"" >> htest.cc; \
978 $(CXXCOMPILE) -fsyntax-only htest.cc
980 ## This rule can be used to see if all the .class files verify
982 class-check: libgcj-$(gcc_version).jar
983 @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
985 echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
986 if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
990 ## This rule checks whether write_entries_to_file works properly.
991 write-entries-to-file-check:
992 @echo Creating list of files to link...
993 @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
995 ## ################################################################
998 ## The `jv-convert' program and code to rebuild the converter header
1002 ## it only makes sense to try to rebuild the JIS .h files on native
1006 noinst_PROGRAMS += gen-from-JIS
1008 gen_from_JIS_SOURCES = \
1009 gnu/gcj/convert/gen-from-JIS.c \
1010 gnu/gcj/convert/make-trie.c \
1011 gnu/gcj/convert/make-trie.h
1013 gen_from_JIS_DEPENDENCIES = \
1014 gnu/gcj/convert/JIS0201.h \
1015 gnu/gcj/convert/JIS0208.h \
1016 gnu/gcj/convert/JIS0212.h
1018 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
1019 ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
1021 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
1022 ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
1024 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
1025 ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
1027 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
1028 # You can get it from
1029 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
1031 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
1032 echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
1033 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
1034 | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2) /*\3 */|p' \
1036 mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
1038 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
1039 # You can get it from
1040 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
1042 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
1043 echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
1044 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
1045 | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4) /*\5 */|p' \
1047 mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
1049 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
1050 # You can get it from
1051 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
1053 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
1054 echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
1055 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
1056 | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3) /*\4 */|p' \
1058 mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
1064 jv_convert_SOURCES =
1065 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1066 ## need this because we are explicitly using libtool to link using the
1068 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
1069 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1070 jv_convert_LINK = $(GCJLINK) $(jv_convert_LDFLAGS)
1071 ## We don't explicitly link in the libraries we need; libgcj.la brings
1072 ## in all dependencies. We need the -L so that gcj can find libgcj
1073 ## with `-lgcj', but it must come first, otherwise the -L flags
1074 ## brought in from libgcj.la would cause the install directories to be
1075 ## searched before the build-tree ones, and we'd get errors because of
1076 ## different libraries with the same SONAME from picky linkers such as
1077 ## Solaris'. FIXME: should be _libs on some systems.
1078 jv_convert_LDADD = -L$(here)/.libs libgcj.la
1079 ## Depend on the spec file to make sure it is up to date before
1080 ## linking this program.
1081 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
1083 jv_convert_DEPENDENCIES += libgcj-noncore.la
1086 gcj_dbtool_SOURCES = \
1087 gnu/gcj/tools/gcj_dbtool/natMain.cc
1089 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1090 ## need this because we are explicitly using libtool to link using the
1092 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
1093 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1094 gcj_dbtool_LINK = $(GCJLINK) $(gcj_dbtool_LDFLAGS)
1095 ## We don't explicitly link in the libraries we need; libgcj.la brings
1096 ## in all dependencies. We need the -L so that gcj can find libgcj
1097 ## with `-lgcj', but it must come first, otherwise the -L flags
1098 ## brought in from libgcj.la would cause the install directories to be
1099 ## searched before the build-tree ones, and we'd get errors because of
1100 ## different libraries with the same SONAME from picky linkers such as
1101 ## Solaris'. FIXME: should be _libs on some systems.
1102 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
1103 ## Depend on the spec file to make sure it is up to date before
1104 ## linking this program.
1105 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
1107 gcj_dbtool_DEPENDENCIES += libgcj-noncore.la
1110 gc_analyze_SOURCES =
1112 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1113 ## need this because we are explicitly using libtool to link using the
1115 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
1116 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1117 gc_analyze_LINK = $(GCJLINK) $(gc_analyze_LDFLAGS)
1118 ## See jv_convert_LDADD.
1119 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
1120 ## Depend on the spec file to make sure it is up to date before
1121 ## linking this program.
1122 gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
1124 gc_analyze_DEPENDENCIES += libgcj-noncore.la
1128 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1129 ## need this because we are explicitly using libtool to link using the
1131 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
1132 -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1133 gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
1134 ## See jv_convert_LDADD.
1135 gij_LDADD = -L$(here)/.libs libgij.la
1136 ## Depend on the spec file to make sure it is up to date before
1137 ## linking this program.
1138 gij_DEPENDENCIES = libgij.la
1140 ## Build an ecjx from a .jar.
1141 ecjx_SOURCES = ecjx.cc
1142 ## We use the BC ABI here so that we don't need to compile ecj.jar.
1143 ## Hopefully the user has compiled it into his system .db.
1144 ## However, even if not it will run reasonably quickly.
1146 ECJX_BASE_FLAGS = -findirect-dispatch \
1147 --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
1151 ecjx_LINK = $(GCJLINK) $(ecjx_LDFLAGS)
1154 ## Use ecj.jar at runtime.
1155 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
1157 ## Use ecj.jar at compile time.
1158 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
1159 endif !ENABLE_SHARED
1161 ecjx_LDADD = -L$(here)/.libs $(extra_ldflags)
1162 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
1164 ecjx_DEPENDENCIES += libgcj-noncore.la
1167 ecjx_DEPENDENCIES += libgcj_bc.la
1169 ecjx_LDADD += libgcj.la
1174 ecjx_LINK = $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS)
1175 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
1178 ecjx.$(OBJEXT): ecjx.cc
1179 $(GCC_FOR_ECJX) -c $<
1183 ## This is a dummy definition.
1184 gappletviewer_SOURCES =
1185 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
1186 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1187 gappletviewer_LINK = $(GCJLINK) $(gappletviewer_LDFLAGS)
1188 ## See jv_convert_LDADD.
1189 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
1190 gappletviewer_DEPENDENCIES = libgcj-tools.la
1192 ## This is a dummy definition.
1193 gjarsigner_SOURCES =
1194 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
1195 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1196 gjarsigner_LINK = $(GCJLINK) $(gjarsigner_LDFLAGS)
1197 ## See jv_convert_LDADD.
1198 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
1199 gjarsigner_DEPENDENCIES = libgcj-tools.la
1201 ## This is a dummy definition.
1203 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
1204 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1205 gkeytool_LINK = $(GCJLINK) $(gkeytool_LDFLAGS)
1206 ## See jv_convert_LDADD.
1207 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
1208 gkeytool_DEPENDENCIES = libgcj-tools.la
1210 ## This is a dummy definition.
1212 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
1213 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1214 gjar_LINK = $(GCJLINK) $(gjar_LDFLAGS)
1215 ## See jv_convert_LDADD.
1216 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
1217 gjar_DEPENDENCIES = libgcj-tools.la
1219 ## This is a dummy definition.
1221 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
1222 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1223 gjavah_LINK = $(GCJLINK) $(gjavah_LDFLAGS)
1224 ## See jv_convert_LDADD.
1225 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
1226 gjavah_DEPENDENCIES = libgcj-tools.la
1228 ## This is a dummy definition.
1230 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
1231 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1232 gcjh_LINK = $(GCJLINK) $(gcjh_LDFLAGS)
1233 ## See jv_convert_LDADD.
1234 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
1235 gcjh_DEPENDENCIES = libgcj-tools.la
1237 ## This is a dummy definition.
1238 gnative2ascii_SOURCES =
1239 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
1240 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1241 gnative2ascii_LINK = $(GCJLINK) $(gnative2ascii_LDFLAGS)
1242 ## See jv_convert_LDADD.
1243 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
1244 gnative2ascii_DEPENDENCIES = libgcj-tools.la
1246 ## This is a dummy definition.
1248 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
1249 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1250 gorbd_LINK = $(GCJLINK) $(gorbd_LDFLAGS)
1251 ## See jv_convert_LDADD.
1252 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
1253 gorbd_DEPENDENCIES = libgcj-tools.la
1255 ## This is a dummy definition.
1257 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
1258 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1259 grmid_LINK = $(GCJLINK) $(grmid_LDFLAGS)
1260 ## See jv_convert_LDADD.
1261 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
1262 grmid_DEPENDENCIES = libgcj-tools.la
1264 ## This is a dummy definition.
1265 gserialver_SOURCES =
1266 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
1267 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1268 gserialver_LINK = $(GCJLINK) $(gserialver_LDFLAGS)
1269 ## See jv_convert_LDADD.
1270 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
1271 gserialver_DEPENDENCIES = libgcj-tools.la
1273 ## This is a dummy definition.
1274 gtnameserv_SOURCES =
1275 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
1276 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1277 gtnameserv_LINK = $(GCJLINK) $(gtnameserv_LDFLAGS)
1278 ## See jv_convert_LDADD.
1279 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
1280 gtnameserv_DEPENDENCIES = libgcj-tools.la
1282 ## This is a dummy definition.
1284 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
1285 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1286 grmic_LINK = $(GCJLINK) $(grmic_LDFLAGS)
1287 ## See jv_convert_LDADD.
1288 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
1289 grmic_DEPENDENCIES = libgcj-tools.la
1291 ## This is a dummy definition.
1292 grmiregistry_SOURCES =
1293 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
1294 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1295 grmiregistry_LINK = $(GCJLINK) $(grmiregistry_LDFLAGS)
1296 ## See jv_convert_LDADD.
1297 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
1298 grmiregistry_DEPENDENCIES = libgcj-tools.la
1300 ## This is a dummy definition.
1302 gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
1303 -Djava.class.path=$(ANTLR_JAR) \
1304 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1305 gjdoc_LINK = $(GCJLINK) $(gjdoc_LDFLAGS)
1306 ## See jv_convert_LDADD.
1307 gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
1308 gjdoc_DEPENDENCIES = libgcj-tools.la
1310 ## ################################################################
1312 nat_jdwp_source_files = \
1313 gnu/classpath/jdwp/natVMFrame.cc \
1314 gnu/classpath/jdwp/natVMMethod.cc \
1315 gnu/classpath/jdwp/natVMVirtualMachine.cc
1317 nat_jvmti_source_files = \
1318 gnu/gcj/jvmti/natBreakpoint.cc \
1319 gnu/gcj/jvmti/natNormalBreakpoint.cc
1321 nat_jdwp_source_files =
1322 nat_jvmti_source_files =
1324 ## This lists all the C++ source files in subdirectories.
1325 nat_source_files = \
1326 $(nat_jdwp_source_files) \
1327 gnu/classpath/natConfiguration.cc \
1328 gnu/classpath/natSystemProperties.cc \
1329 gnu/classpath/natVMStackWalker.cc \
1330 gnu/gcj/natCore.cc \
1331 gnu/gcj/convert/JIS0208_to_Unicode.cc \
1332 gnu/gcj/convert/JIS0212_to_Unicode.cc \
1333 gnu/gcj/convert/Unicode_to_JIS.cc \
1334 gnu/gcj/convert/natIconv.cc \
1335 gnu/gcj/convert/natInput_EUCJIS.cc \
1336 gnu/gcj/convert/natInput_SJIS.cc \
1337 gnu/gcj/convert/natOutput_EUCJIS.cc \
1338 gnu/gcj/convert/natOutput_SJIS.cc \
1339 gnu/gcj/io/natSimpleSHSStream.cc \
1341 $(nat_jvmti_source_files) \
1342 gnu/gcj/runtime/natFinalizerThread.cc \
1343 gnu/gcj/runtime/natSharedLibLoader.cc \
1344 gnu/gcj/runtime/natSystemClassLoader.cc \
1345 gnu/gcj/runtime/natStringBuffer.cc \
1346 gnu/gcj/util/natDebug.cc \
1347 gnu/gcj/util/natGCInfo.cc \
1348 gnu/java/lang/natMainThread.cc \
1349 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
1350 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
1351 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
1352 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
1353 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
1354 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
1355 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
1356 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
1357 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
1358 gnu/java/net/natPlainDatagramSocketImpl.cc \
1359 gnu/java/net/natPlainSocketImpl.cc \
1360 gnu/java/net/protocol/core/natCoreInputStream.cc \
1361 gnu/java/nio/natVMPipe.cc \
1362 gnu/java/nio/natVMSelector.cc \
1363 gnu/java/nio/natNIOServerSocket.cc \
1364 gnu/java/nio/natVMChannel.cc \
1365 gnu/java/nio/channels/natFileChannelImpl.cc \
1366 gnu/java/security/jce/prng/natVMSecureRandom.cc \
1367 java/io/natFile.cc \
1368 java/io/natVMConsole.cc \
1369 java/io/natVMObjectInputStream.cc \
1370 java/io/natVMObjectStreamClass.cc \
1371 java/lang/natCharacter.cc \
1372 java/lang/natClass.cc \
1373 java/lang/natClassLoader.cc \
1374 java/lang/natConcreteProcess.cc \
1375 java/lang/natVMDouble.cc \
1376 java/lang/natVMFloat.cc \
1377 java/lang/natMath.cc \
1378 java/lang/natObject.cc \
1379 java/lang/natRuntime.cc \
1380 java/lang/natString.cc \
1381 java/lang/natAbstractStringBuffer.cc \
1382 java/lang/natSystem.cc \
1383 java/lang/natThread.cc \
1384 java/lang/natThreadLocal.cc \
1385 java/lang/natVMClassLoader.cc \
1386 java/lang/natVMProcess.cc \
1387 java/lang/natVMThrowable.cc \
1388 java/lang/ref/natReference.cc \
1389 java/lang/reflect/natArray.cc \
1390 java/lang/reflect/natConstructor.cc \
1391 java/lang/reflect/natField.cc \
1392 java/lang/reflect/natMethod.cc \
1393 java/lang/reflect/natVMProxy.cc \
1394 java/net/natVMInetAddress.cc \
1395 java/net/natVMNetworkInterface.cc \
1396 java/net/natVMURLConnection.cc \
1397 java/nio/channels/natVMChannels.cc \
1398 java/nio/natVMDirectByteBufferImpl.cc \
1399 java/security/natVMAccessController.cc \
1400 java/security/natVMAccessControlState.cc \
1401 java/text/natCollator.cc \
1402 java/util/natVMTimeZone.cc \
1403 java/util/concurrent/atomic/natAtomicLong.cc \
1404 java/util/logging/natLogger.cc \
1405 java/util/zip/natDeflater.cc \
1406 java/util/zip/natInflater.cc \
1407 sun/misc/natUnsafe.cc
1409 xlib_nat_source_files = \
1410 gnu/gcj/xlib/natClip.cc \
1411 gnu/gcj/xlib/natColormap.cc \
1412 gnu/gcj/xlib/natDisplay.cc \
1413 gnu/gcj/xlib/natDrawable.cc \
1414 gnu/gcj/xlib/natFont.cc \
1415 gnu/gcj/xlib/natGC.cc \
1416 gnu/gcj/xlib/natPixmap.cc \
1417 gnu/gcj/xlib/natScreen.cc \
1418 gnu/gcj/xlib/natVisual.cc \
1419 gnu/gcj/xlib/natWMSizeHints.cc \
1420 gnu/gcj/xlib/natWindow.cc \
1421 gnu/gcj/xlib/natWindowAttributes.cc \
1422 gnu/gcj/xlib/natXAnyEvent.cc \
1423 gnu/gcj/xlib/natXButtonEvent.cc \
1424 gnu/gcj/xlib/natXColor.cc \
1425 gnu/gcj/xlib/natXConfigureEvent.cc \
1426 gnu/gcj/xlib/natXException.cc \
1427 gnu/gcj/xlib/natXExposeEvent.cc \
1428 gnu/gcj/xlib/natXImage.cc \
1429 gnu/gcj/xlib/natXUnmapEvent.cc
1431 ## ################################################################
1434 ## Creating and installing sources.zip
1437 ## Create a zip holding all the sources. This can be meaningfully
1443 ( cd $(srcdir)/classpath; \
1444 find java gnu javax org sun -name '*.java' -print | \
1445 while read file; do \
1446 ## Ugly code to avoid "echo -C". Must separate each entry by a newline
1448 echo "x-C" | sed -e 's/^.//'; \
1449 echo $(srcdir)/classpath; \
1452 ( cd $(srcdir)/classpath/external/sax; \
1453 find org -name '*.java' -print | \
1454 while read file; do \
1455 echo "x-C" | sed -e 's/^.//'; \
1456 echo $(srcdir)/classpath/external/sax; \
1459 ( cd $(srcdir)/classpath/external/relaxngDatatype; \
1460 find org -name '*.java' -print | \
1461 while read file; do \
1462 echo "x-C" | sed -e 's/^.//'; \
1463 echo $(srcdir)/classpath/external/relaxngDatatype; \
1466 ( cd $(srcdir)/classpath/external/w3c_dom; \
1467 find org -name '*.java' -print | \
1468 while read file; do \
1469 echo "x-C" | sed -e 's/^.//'; \
1470 echo $(srcdir)/classpath/external/w3c_dom; \
1473 ## Now the build tree.
1475 find gnu java -name '*.java' -print | \
1476 while read file; do \
1477 echo "x-C" | sed -e 's/^.//'; \
1482 ## Many of the above circumlocutions were because ZIP used to be a
1483 ## relative path to fastjar. It didn't seem worthwhile to change the
1484 ## code when we moved to an external jar.
1485 $(JAR) -cfM@ $$here/src.zip
1486 ## Override GNU Classpath sources with libgcj replacements.
1490 find gnu java -name '*.java' -print | \
1491 while read file; do \
1492 echo "x-C" | sed -e 's/^.//'; \
1497 $(JAR) -ufM@ $$here/src.zip
1499 ## We use a variable for this in case the user wants to override it.
1500 sourcesdir = $(jardir)
1502 install-src.zip: src.zip
1503 $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
1506 ## ################################################################
1509 ## Dependency tracking madness.
1512 ## This is an evil hack to work around an automake limitation. We
1513 ## need to ensure that all CNI headers are built, not just the ones
1514 ## used internally by libgcj. We can't make the .o files depend on
1515 ## nat_headers, because in that case we'll force a complete rebuild of
1516 ## the C++ code whenever any .java file is touched. So instead we
1517 ## have a dummy rule which is only used once, namely the first time a
1518 ## build is done. On subsequent builds, the dependency tracking for
1519 ## the .cc compilations will have picked up the .h files, and these
1520 ## will be built directly as needed.
1523 ## Note that we don't use a real dependency here, since we don't want
1524 ## to rebuild all the headers here when the header list changes. If
1525 ## we did rebuild here, then any addition of a .java file would cause
1526 ## a large number of recompilations.
1527 $(MAKE) create-headers
1528 @echo > headers.stamp
1530 headers_to_make = $(nat_headers)
1532 headers_to_make += $(xlib_nat_headers)
1535 create-headers: $(headers_to_make)
1537 .PHONY: create-headers
1539 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1540 $(libgij_la_OBJECTS): headers.stamp
1541 $(libjvm_la_OBJECTS): headers.stamp
1543 ## ################################################################
1546 ## This section is for make and multilib madness.
1549 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1550 # values defined in terms of make variables, as is the case for CC and
1551 # friends when we are called from the top level Makefile.
1553 "AR_FLAGS=$(AR_FLAGS)" \
1554 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1555 "CFLAGS=$(CFLAGS)" \
1556 "CXXFLAGS=$(CXXFLAGS)" \
1557 "CPPFLAGS=$(CPPFLAGS)" \
1558 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1559 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1560 "INSTALL=$(INSTALL)" \
1561 "INSTALL_DATA=$(INSTALL_DATA)" \
1562 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1563 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1564 "GCJFLAGS=$(GCJFLAGS)" \
1565 "LDFLAGS=$(LDFLAGS)" \
1566 "LIBCFLAGS=$(LIBCFLAGS)" \
1567 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1569 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1570 "PICFLAG=$(PICFLAG)" \
1571 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1573 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1574 "exec_prefix=$(exec_prefix)" \
1575 "datadir=$(datadir)" \
1576 "infodir=$(infodir)" \
1577 "libdir=$(libdir)" \
1578 "mandir=$(mandir)" \
1579 "prefix=$(prefix)" \
1580 "gxx_include_dir=$(gxx_include_dir)" \
1583 "DLLTOOL=$(DLLTOOL)" \
1585 "LIBCFLAGS=$(LIBCFLAGS)" \
1587 "PICFLAG=$(PICFLAG)" \
1588 "RANLIB=$(RANLIB)" \
1589 "DESTDIR=$(DESTDIR)" \
1592 # Subdir rules rely on $(FLAGS_TO_PASS)
1593 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1595 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1599 # Multilib support variables.
1608 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1609 maintainer-clean-multi
1611 all-recursive: all-multi
1612 install-recursive: install-multi
1613 mostlyclean-recursive: mostlyclean-multi
1614 clean-recursive: clean-multi
1615 distclean-recursive: distclean-multi
1616 maintainer-clean-recursive: maintainer-clean-multi
1619 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1621 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1623 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1625 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1627 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1628 maintainer-clean-multi:
1629 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
1632 if ANONVERSCRIPT_SUN
1633 # This must be at the end of the Makefile, otherwise .SECONDEXPANSION
1634 # causes expansion of filenames with $ in their names, which breaks the build.
1635 # .SECONDEXPANSION is necessary to allow the use of automatic variables ($@
1636 # in this case) in the requisites of pattern rules.
1639 %.ver-sun : $(srcdir)/libgcj.ver \
1640 $(top_srcdir)/../contrib/make_sunver.pl \
1641 $$($$(basename $$@)_la_OBJECTS) $$($$(basename $$@)_la_LIBADD)
1642 perl $(top_srcdir)/../contrib/make_sunver.pl \
1643 $(srcdir)/libgcj.ver \
1644 `echo $($(basename $@)_la_OBJECTS) $($(basename $@)_la_LIBADD) | \
1645 sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
1646 > $@ || (rm -f $@ ; exit 1)