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 ' ' '\012' >> $(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 ## These files form a closed dependency group at the lower
50 ## edge of libjava's dependency graph, so can be separated out.
51 ## For details of how the list was generated, see the GCC wiki:
53 ## http://gcc.gnu.org/wiki/Internal_dependencies_of_libgcj
55 LOWER_PACKAGE_FILES_LO = \
58 gnu-java-awt-dnd-peer-gtk.lo \
59 gnu-java-awt-peer-gtk.lo \
60 gnu-java-awt-peer-swing.lo \
61 gnu-java-lang-management.lo \
62 gnu-javax-management.lo \
64 gnu-javax-sound-midi.lo \
70 gnu-xml-transform.lo \
72 gnu-xml-validation.lo \
74 java-lang-management.lo \
79 org-omg-CORBA_2_3.lo \
80 org-omg-CosNaming.lo \
82 org-omg-DynamicAny.lo \
84 org-omg-Messaging.lo \
85 org-omg-PortableInterceptor.lo \
86 org-omg-PortableServer.lo \
87 org-omg-SendingContext.lo \
91 META-INF/services/java.util.prefs.PreferencesFactory.in.lo \
92 META-INF/services/java.util.prefs.PreferencesFactory.lo \
93 META-INF/services/javax.sound.midi.spi.MidiDeviceProvider.lo \
94 META-INF/services/javax.sound.midi.spi.MidiFileReader.lo \
95 META-INF/services/javax.sound.midi.spi.MidiFileWriter.lo \
96 META-INF/services/javax.sound.sampled.spi.AudioFileReader.lo \
97 classpath/native/jni/classpath/jcl.lo \
98 classpath/native/jni/classpath/jnilink.lo \
99 classpath/native/jni/java-math/gnu_java_math_GMP.lo \
100 classpath/tools/libgcj_tools_la-tools.lo \
104 gnu/gcj/io/natSimpleSHSStream.lo \
106 gnu/gcj/tools/gcj_dbtool.lo \
107 gnu/gcj/util/natDebug.lo \
108 gnu/gcj/util/natGCInfo.lo \
109 gnu/java/awt/dnd.lo \
110 gnu/java/awt/font.lo \
111 gnu/java/awt/image.lo \
112 gnu/java/awt/print.lo \
113 gnu/java/awt/font/autofit.lo \
114 gnu/java/awt/font/opentype.lo \
115 gnu/java/awt/font/opentype/truetype.lo \
116 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.lo \
117 gnu/java/lang/management/natVMCompilationMXBeanImpl.lo \
118 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.lo \
119 gnu/java/lang/management/natVMMemoryMXBeanImpl.lo \
120 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.lo \
121 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.lo \
122 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.lo \
123 gnu/java/lang/management/natVMRuntimeMXBeanImpl.lo \
124 gnu/java/lang/management/natVMThreadMXBeanImpl.lo \
125 gnu/java/net/local.lo \
126 gnu/java/net/protocol/ftp.lo \
127 gnu/java/net/protocol/gcjlib.lo \
128 gnu/java/net/protocol/https.lo \
129 gnu/javax/imageio.lo \
132 gnu/javax/activation/viewers.lo \
133 gnu/javax/imageio/bmp.lo \
134 gnu/javax/imageio/gif.lo \
135 gnu/javax/imageio/jpeg.lo \
136 gnu/javax/imageio/png.lo \
137 gnu/javax/naming/giop.lo \
138 gnu/javax/naming/ictxImpl/trans.lo \
139 gnu/javax/naming/jndi/url/corbaname.lo \
140 gnu/javax/naming/jndi/url/rmi.lo \
141 gnu/javax/print/ipp.lo \
142 gnu/javax/print/ipp/attribute.lo \
143 gnu/javax/print/ipp/attribute/defaults.lo \
144 gnu/javax/print/ipp/attribute/job.lo \
145 gnu/javax/print/ipp/attribute/printer.lo \
146 gnu/javax/print/ipp/attribute/supported.lo \
147 gnu/javax/security/auth/login.lo \
148 gnu/javax/sound/sampled/AU.lo \
149 gnu/javax/sound/sampled/WAV.lo \
150 gnu/javax/swing/plaf/gnu.lo \
151 gnu/javax/swing/plaf/metal.lo \
156 java/security/acl.lo \
157 javax/activation.lo \
159 javax/management.lo \
164 javax/transaction.lo \
165 javax/management/loading.lo \
166 javax/management/openmbean.lo \
167 javax/management/remote.lo \
168 javax/management/remote/rmi.lo \
169 javax/naming/directory.lo \
170 javax/naming/event.lo \
171 javax/naming/ldap.lo \
172 javax/naming/spi.lo \
173 javax/print/attribute.lo \
174 javax/print/event.lo \
175 javax/print/attribute/standard.lo \
176 javax/security/cert.lo \
177 javax/security/auth/kerberos.lo \
178 javax/security/auth/login.lo \
179 javax/security/auth/spi.lo \
180 javax/sound/midi.lo \
181 javax/sound/midi/spi.lo \
182 javax/swing/plaf/multi.lo \
183 javax/swing/plaf/synth.lo \
184 javax/swing/text/rtf.lo \
185 javax/swing/text/html/default.css.lo \
186 javax/transaction/xa.lo \
191 ## Lists of all .lo files, and filtered core and non-core lists.
193 ALL_PACKAGE_SOURCE_FILES_LO = $(all_packages_source_files:.list=.lo) $(propertyo_files) $(bc_objects)
194 NONCORE_PACKAGE_SOURCE_FILES_LO = $(filter $(LOWER_PACKAGE_FILES_LO),$(ALL_PACKAGE_SOURCE_FILES_LO))
195 CORE_PACKAGE_SOURCE_FILES_LO = $(filter-out $(LOWER_PACKAGE_FILES_LO),$(ALL_PACKAGE_SOURCE_FILES_LO))
198 ## Assign objects to output libraries.
201 toolexeclib_LTLIBRARIES += libgcj-noncore.la
202 libgcj_noncore_la_LIBADD_SUBOBJECTS = $(NONCORE_PACKAGE_SOURCE_FILES_LO)
203 libgcj_la_LIBADD_SUBOBJECTS = $(CORE_PACKAGE_SOURCE_FILES_LO)
204 LIBJAVA_LDFLAGS_NOUNDEF = $(LIBGCJ_SUBLIB_LTFLAGS)
205 LIBJAVA_CORE_EXTRA = @LIBGCJ_SUBLIB_CORE_EXTRA_DEPS@
207 # If not building sublibraries, everything goes in libgcj,
208 # and it cannot be usefully built shared on PE platforms.
209 libgcj_la_LIBADD_SUBOBJECTS = $(ALL_PACKAGE_SOURCE_FILES_LO)
210 LIBJAVA_LDFLAGS_NOUNDEF =
215 toolexeclib_LTLIBRARIES += install/libgcj_bc.la
216 noinst_LTLIBRARIES = libgcj_bc.la
220 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
223 dbexec_LTLIBRARIES = libjvm.la
225 pkgconfigdir = $(toolexeclibdir)/pkgconfig
227 jardir = $(datadir)/java
228 jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
230 jar_DATA += $(ECJ_BUILD_JAR)
234 JAVA_HOME_DIR = $(JAVA_HOME)
235 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
237 JAVA_HOME_DIR = $(prefix)
238 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
241 ## Name of the default .db.
242 db_name = classmap.db
243 ## Compiler specific component of the .db file
244 gcjsubdir = @gcjsubdir@
245 db_pathtail = $(gcjsubdir)/$(db_name)
247 ## For now, only on native systems. FIXME.
249 bin_programs = jv-convert gij grmic grmiregistry gcj-dbtool \
250 gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
251 gorbd grmid gserialver gtnameserv gc-analyze
253 bin_programs += gjdoc
258 bin_PROGRAMS = $(bin_programs)
260 noinst_PROGRAMS += $(bin_programs)
263 ## It is convenient to actually build and install the default database
264 ## when gcj-dbtool is available.
265 dbexec_DATA = $(db_name)
268 bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
271 bin_SCRIPTS += contrib/aot-compile-rpm
275 ## We build ecjx and not ecj1 because in one mode, ecjx will not work
276 ## until after 'make install', and we don't want it to be picked up in
277 ## the build tree by gcj via a -B option.
278 libexecsub_PROGRAMS = ecjx
281 ## ################################################################
284 ## Compilers and compilation flags.
287 ## The compiler with whatever flags we want for both -c and -C
289 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
291 extra_ldflags_libjava = @extra_ldflags_libjava@
292 extra_ldflags = @extra_ldflags@
296 version_arg = -Wl,--version-script=$(srcdir)/libgcj.ver
297 libgcj_la_version_arg = $(version_arg)
298 libgcj_tools_la_version_arg = $(version_arg)
299 lib_gnu_awt_xlib_la_version_arg = $(version_arg)
300 libgcj_bc_la_version_arg = $(version_arg)
302 version_dep = $(srcdir)/libgcj.ver
303 libgcj_la_version_dep = $(version_dep)
304 libgcj_tools_la_version_dep = $(version_dep)
305 lib_gnu_awt_xlib_la_version_dep = $(version_dep)
306 libgcj_bc_la_version_dep = $(version_dep)
309 libgcj_la_version_arg = -Wl,-M,libgcj.ver-sun
310 libgcj_tools_la_version_arg = -Wl,-M,libgcj_tools.ver-sun
311 lib_gnu_awt_xlib_la_version_arg = -Wl,-M,lib_gnu_awt_xlib.ver-sun
312 libgcj_bc_la_version_arg = -Wl,-M,libgcj_bc.ver-sun
314 libgcj_la_version_dep = libgcj.ver-sun
315 libgcj_tools_la_version_dep = libgcj_tools.ver-sun
316 lib_gnu_awt_xlib_la_version_dep = lib_gnu_awt_xlib.ver-sun
317 libgcj_bc_la_version_dep = libgcj_bc.ver-sun
319 # The pattern rule necessary to build the *.ver-sun mapfiles is at the end
320 # of the file, see below.
324 libgcj_la_version_arg = $(version_arg)
325 libgcj_tools_la_version_arg = $(version_arg)
326 lib_gnu_awt_xlib_la_version_arg = $(version_arg)
327 libgcj_bc_la_version_arg = $(version_arg)
330 libgcj_la_version_dep = $(version_dep)
331 libgcj_tools_la_version_dep = $(version_dep)
332 lib_gnu_awt_xlib_la_version_dep = $(version_dep)
333 libgcj_bc_la_version_dep = $(version_dep)
336 LTLDFLAGS = $(shell $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
337 GCJLINK = $(LIBTOOL) --tag=GCJ $(LIBTOOLFLAGS) --mode=link $(GCJ) -L$(here) \
338 $(JC1FLAGS) $(LTLDFLAGS) -o $@
339 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
340 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
341 LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \
342 $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
343 CXXLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
344 $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@
346 LIBGCC_UNWIND_INCLUDE = @LIBGCC_UNWIND_INCLUDE@
348 WARNINGS = -Wextra -Wall
349 ## Some systems don't allow `$' in identifiers by default, so we force
350 ## it with -fdollars-in-identifiers. -Wswitch-enum detects bugs in
351 ## the verifier implementation, and maybe other places. We need
352 ## _GNU_SOURCE defined for some Linux builds. It doesn't hurt to
353 ## always define it. Some systems, including Linux, need
354 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
357 -fnon-call-exceptions \
359 -fdollars-in-identifiers \
361 -D_FILE_OFFSET_BITS=64 \
365 -DPREFIX="\"$(prefix)\"" \
366 -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
367 -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
368 -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
369 -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
370 -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
371 -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
372 -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
373 -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
374 -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
375 -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
379 -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
381 -Wno-deprecated -fbootstrap-classes
383 AM_CFLAGS = @LIBGCJ_CFLAGS@
385 AM_CFLAGS += $(WARNINGS)
388 if SUPPRESS_LIBGCJ_BC
391 LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
394 if BUILD_LIBGCJ_REDUCED_REFLECTION
395 LIBGCJ_REDUCED_REFLECTION_FLAGS = -freduced-reflection
397 LIBGCJ_REDUCED_REFLECTION_FLAGS =
400 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
401 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
404 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
406 LIBFFIINCS = @LIBFFIINCS@
408 AM_CPPFLAGS = -I$(top_srcdir) \
409 -Iinclude -I$(top_srcdir)/include \
410 -I$(top_srcdir)/classpath/include \
411 -Iclasspath/include \
412 -I$(top_srcdir)/classpath/native/fdlibm \
413 $(GCINCS) $(THREADINCS) $(INCLTDL) \
414 $(LIBGCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
416 BOOTCLASSPATH = $(srcdir)/classpath/lib
418 ## ################################################################
421 ## How to build libgcj.a and libgcj.jar
424 libgij_la_SOURCES = gij.cc
425 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
427 libgij_la_DEPENDENCIES += libgcj-noncore.la
429 ## See jv_convert_LDADD.
430 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
431 ## The mysterious backslash in the grep pattern is consumed by make.
432 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
433 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
434 libgij_la_LINK = $(CXXLINK) $(libgij_la_LDFLAGS)
437 libgcj_interpret_source_files = jvmti.cc interpret.cc
439 libgcj_interpret_source_files =
442 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
443 link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
446 ## We need to compile at least the interpreter this way.
447 interpret.lo: AM_CXXFLAGS += -fwrapv
448 ## Necessary so EH works on 64-bit Solaris 2.
449 prims.lo: AM_CXXFLAGS += -fno-omit-frame-pointer
452 libgcj_la_SOURCES += boehm.cc
456 libgcj_la_SOURCES += nogc.cc
459 if USING_POSIX_PLATFORM
460 libgcj_la_SOURCES += posix.cc
463 if USING_WIN32_PLATFORM
464 libgcj_la_SOURCES += win32.cc
468 libgcj_la_SOURCES += darwin.cc
469 LIBJAVA_LDFLAGS_LIBMATH =
471 LIBJAVA_LDFLAGS_LIBMATH = -lm
474 if USING_POSIX_THREADS
475 libgcj_la_SOURCES += posix-threads.cc
478 if USING_WIN32_THREADS
479 libgcj_la_SOURCES += win32-threads.cc
483 libgcj_la_SOURCES += no-threads.cc
486 ## Objects from C++ sources in subdirs.
487 nat_files = $(nat_source_files:.cc=.lo)
488 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
490 # Include THREADLIBS here to ensure that the correct version of
491 # certain linuxthread functions get linked:
492 ## The mysterious backslash in the grep pattern is consumed by make.
493 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
494 $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
495 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
496 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL)
498 classpath/native/fdlibm/libfdlibm.la \
499 java/lang/Object.lo \
501 java/process-$(PLATFORM).lo \
502 $(libgcj_la_LIBADD_SUBOBJECTS) \
503 $(LIBFFI) $(ZLIBS) $(GCLIBS)
504 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
505 java/lang/Object.lo \
507 java/process-$(PLATFORM).lo \
508 $(ALL_PACKAGE_SOURCE_FILES_LO) \
509 $(LIBLTDL) $(libgcj_la_LIBADD) \
510 $(LIBJAVA_CORE_EXTRA) \
511 $(libgcj_la_version_dep)
512 libgcj_la_LINK = $(LIBLINK) $(libgcj_la_LDFLAGS) $(libgcj_la_version_arg)
514 ## A hack to make sure the various gcj-related macros, like
515 ## LTGCJCOMPILE, are defined by automake. This is never actually
517 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
520 ## This extra target is invoked on windows hosts only by adding it
521 ## to LIBGCJ_SUBLIB_CORE_EXTRA_SRCS in configure.host, which causes
522 ## it to be linked in to the core DLL and generate a circular import
523 ## dependency loop between the two DLLs. This is required to fix
524 ## PR42811 by ensuring that any application that links against
525 ## either always loads both at runtime.
526 DLL_VERSION=`expr \`grep -v '^\#' $(srcdir)/libtool-version | sed -e 's/\(.*\):\(.*\):.*/\1 + \2/'\``
527 libgcj-noncore-dummy.dll.a : $(srcdir)/libgcj-noncore-dummy.def
528 $(DLLTOOL) -d $^ -l $@ --dllname cyggcj-noncore-$(DLL_VERSION).dll
530 ## These are the libtool definitions for the noncore library.
531 libgcj_noncore_la_SOURCES =
532 libgcj_noncore_la_LDFLAGS = $(libgcj_la_LDFLAGS)
533 libgcj_noncore_la_LIBADD = $(libgcj_noncore_la_LIBADD_SUBOBJECTS) libgcj.la
534 libgcj_noncore_la_DEPENDENCIES = libgcj-$(gcc_version).jar $(LIBLTDL) \
535 $(libgcj_noncore_la_LIBADD) libgcj.la $(libgcj_la_version_dep)
536 libgcj_noncore_la_LINK = $(libgcj_la_LINK)
538 endif # BUILD_SUBLIBS
540 # We compile libgcj_tools with -findirect-dispatch so that they can
541 # depend on external classes: in particular, gjdoc uses antlr. In
542 # addition, -fno-bootstrap-classes ensures that the tools are loaded
543 # by the system class loader rather than the bootstrap class loader:
544 # only core library classes should be loaded by the bootstrap loader.
545 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
546 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \
547 -fno-bootstrap-classes -fno-indirect-classes \
548 -fsource-filename=$(here)/classpath/tools/all-classes.lst
549 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
550 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
551 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
552 $(LIBJAVA_LDFLAGS_LIBMATH)
554 libgcj_tools_la_LIBADD = libgcj.la
555 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec \
556 $(libgcj_tools_la_version_dep)
558 libgcj_tools_la_DEPENDENCIES += libgcj-noncore.la
560 libgcj_tools_la_LINK = $(LIBLINK) $(libgcj_tools_la_LDFLAGS) \
561 $(libgcj_tools_la_version_arg)
564 libjvm_la_SOURCES = jni-libjvm.cc
565 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
567 libjvm_la_DEPENDENCIES += libgcj-noncore.la
569 ## See jv_convert_LDADD.
570 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
571 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC) \
572 $(LIBJAVA_LDFLAGS_NOUNDEF)
573 libjvm_la_LINK = $(CXXLINK) $(libjvm_la_LDFLAGS)
575 ## The .db file. This rule is only used for native builds, so it is
576 ## safe to invoke gcj-dbtool.
577 $(db_name): gcj-dbtool$(EXEEXT)
578 ## In case it exists already.
580 ## We don't actually care if it fails -- if it does, just make an
581 ## empty file. This is simpler than trying to discover when mmap is
583 ./gcj-dbtool -n $(db_name) || touch $(db_name)
585 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
586 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
587 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
588 libgcj.la libgcj.spec \
589 $(lib_gnu_awt_xlib_la_version_dep) \
590 $(lib_gnu_awt_xlib_la_LIBADD)
592 lib_gnu_awt_xlib_la_DEPENDENCIES += libgcj-noncore.la
594 lib_gnu_awt_xlib_la_CPPFLAGS = \
596 $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
597 ## The mysterious backslash in the grep pattern is consumed by make.
598 lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDFLAGS) \
599 @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
600 -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
601 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
602 lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS) \
603 $(lib_gnu_awt_xlib_la_version_arg)
605 ## Support for libgcj_bc: dummy shared library.
607 ## This lets us have one soname in BC objects and another in C++ ABI objects.
608 ## This library is not linked against libgcj.
609 libgcj_bc_la_SOURCES = libgcj_bc.c
610 install_libgcj_bc_la_SOURCES = $(libgcj_bc_la_SOURCES)
611 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
612 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
613 libgcj_bc_la_DEPENDENCIES = libgcj.la $(libgcj_bc_la_version_dep)
614 libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS) \
615 $(libgcj_bc_la_version_arg)
616 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
617 ## USE_LIBGCJ_BC shouldn't be set on other targets.
618 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
621 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
623 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
624 $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
625 $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
626 rm .libs/libgcj_bc.so; \
627 mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
628 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
629 -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
630 rm .libs/libgcj_bc.so.1; \
631 $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
633 ## This rule creates the libgcj_bc library that is actually installed.
634 install/libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES) install/$(am__dirstamp)
635 $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
636 $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS)
638 ## Note that property_files is defined in sources.am.
639 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
641 $(propertyo_files): %.lo: classpath/resource/%
642 $(mkinstalldirs) `dirname $@`; \
643 $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
645 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
646 ## Note that this now omits the property files.
647 ## It doesn't matter since we don't use the jar at runtime.
648 here=`pwd`; cd $(srcdir)/classpath/lib; \
649 find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
650 $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
652 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
655 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
656 DISTCLEANFILES = native.dirs
659 ## Use libtool rm to remove each libtool object
660 find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
663 ## Remove every .d file that was created.
664 find . -name '*.d' -print | xargs rm -f
666 # Just remove the objects from C++ sources, for testing the C++ compiler.
668 rm -f $(nat_files) $(xlib_nat_files)
670 SUFFIXES = .class .java .h .properties .list
672 ## Pass the list of object files to libtool in a temporary file to
673 ## avoid tripping platform command line length limits.
674 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
675 @echo Creating list of files to link...
676 @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
677 $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
678 -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
680 ## ################################################################
682 ## Compiling a list of java sources to a single .o.
684 # Concurrent things use reflection internally.
685 java/util/concurrent.lo \
686 java/util/concurrent/atomic.lo \
687 java/util/concurrent/locks.lo: LIBGCJ_REDUCED_REFLECTION_FLAGS =
690 $(LTGCJCOMPILE) $(LIBGCJ_REDUCED_REFLECTION_FLAGS) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
692 java/lang/Object.lo: classpath/lib/java/lang/Object.class
693 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
695 java/lang/Class.lo: classpath/lib/java/lang/Class.class
696 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
698 ## ################################################################
700 ## This pulls in a number of variable and target definitions.
703 ## ################################################################
706 ## How to build header files.
709 ## We have special rules for certain headers.
710 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
711 java/lang/String.h java/lang/reflect/Constructor.h \
712 java/lang/reflect/Field.h java/lang/reflect/Method.h \
713 java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
715 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
716 java/io/ObjectInputStream$$GetField.h \
717 java/nio/DirectByteBufferImpl$$ReadWrite.h \
718 java/nio/channels/Pipe$$SinkChannel.h \
719 java/nio/channels/Pipe$$SourceChannel.h \
720 java/lang/VMProcess$ImmediateEOFInputStream.h \
721 java/lang/reflect/Proxy$$ProxyData.h \
722 java/lang/reflect/Proxy$$ProxyType.h \
723 gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
724 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
725 gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
726 gnu/java/nio/PipeImpl$$SourceChannelImpl.h
728 generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
733 $(generic_header_files): gcjh.stamp
735 gcjh.stamp: classpath/lib/compile-classes
736 if JAVA_MAINTAINER_MODE
737 $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
738 --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
742 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
743 nat_headers_install = $(ordinary_header_files)
745 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
747 ## Headers we maintain by hand and which we want to install.
748 extra_headers = java/lang/Object.h java/lang/Class.h
750 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
753 install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
754 install-libexecsubPROGRAMS
755 ## Support for libgcj_bc: dummy shared library used only at link-time.
757 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
758 ## libtool's .la file, this prevents libtool resetting the lib again
760 @echo Installing dummy lib libgcj_bc.so.1.0.0; \
761 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
762 mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
763 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
764 -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
765 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
766 $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
767 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
770 ## Undo any prepending of the target prefix and transform
771 ## to the actual host's executable suffix.
772 mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
775 ## Install the headers. It is fairly ugly that we have to do this by
777 install_data_local_split = 50
780 ## Install the .pc file.
781 @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
782 file="libgcj-$${pc_version}.pc"; \
783 $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
784 echo " $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
785 $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
786 ## We use a GNU make trick here so that we don't go over the command
787 ## length limit of some shells.
788 @echo Creating list of headers to install...
789 @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
790 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
791 while read file; do echo "$$file $$file"; done < tmp-ilist | \
792 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
793 $(AWK) 'BEGIN { files["."] = "" } \
794 { files[$$2] = files[$$2] " " $$1; \
795 if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
796 END { for (dir in files) print dir, files[dir] }' | \
797 while read dir files; do \
798 xfiles=; for file in $$files; do \
799 if test -f "$$file"; then xfiles="$$xfiles $$file"; \
800 else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
801 test -z "$$xfiles" || { \
802 test "x$$dir" = x. || { \
803 echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
804 $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
805 echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
806 $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
809 ## Install inner class headers.
810 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
811 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
812 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
813 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
814 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
815 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
816 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
817 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
818 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
819 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
820 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
821 ## Install Python modules for aot-compile.
822 $(mkinstalldirs) $(DESTDIR)$(python_mod_dir); \
823 $(INSTALL_DATA) $(srcdir)/contrib/classfile.py \
824 $(DESTDIR)$(python_mod_dir)/classfile.py; \
825 $(INSTALL_DATA) contrib/aotcompile.py \
826 $(DESTDIR)$(python_mod_dir)/aotcompile.py;
828 ## Create sdk style directories
829 $(mkinstalldirs) $(DESTDIR)$(JRE_BIN_DIR)
830 $(mkinstalldirs) $(DESTDIR)$(SDK_BIN_DIR)
831 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)
832 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)
833 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)
834 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
836 $(PERL) -e 'use File::Spec; \
837 print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
839 RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
840 ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
841 $(DESTDIR)$(SDK_BIN_DIR)/java; \
842 ln -sf $$RELATIVE/`echo gjar | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
843 $(DESTDIR)$(SDK_BIN_DIR)/jar; \
844 ln -sf $$RELATIVE/`echo gjdoc | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
845 $(DESTDIR)$(SDK_BIN_DIR)/javadoc; \
846 ln -sf $$RELATIVE/`echo grmic | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
847 $(DESTDIR)$(SDK_BIN_DIR)/rmic; \
848 ln -sf $$RELATIVE/`echo gjavah | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
849 $(DESTDIR)$(SDK_BIN_DIR)/javah; \
850 ln -sf $$RELATIVE/`echo gappletviewer | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
851 $(DESTDIR)$(SDK_BIN_DIR)/appletviewer; \
852 ln -sf $$RELATIVE/`echo gjarsigner | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
853 $(DESTDIR)$(SDK_BIN_DIR)/jarsigner; \
854 ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
855 $(DESTDIR)$(SDK_BIN_DIR)/rmiregistry; \
856 ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
857 $(DESTDIR)$(SDK_BIN_DIR)/keytool; \
858 ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
859 $(DESTDIR)$(SDK_BIN_DIR)/orbd; \
860 ln -sf $$RELATIVE/`echo gnative2ascii | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
861 $(DESTDIR)$(SDK_BIN_DIR)/native2ascii; \
862 ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
863 $(DESTDIR)$(SDK_BIN_DIR)/rmid; \
864 ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
865 $(DESTDIR)$(SDK_BIN_DIR)/tnameserv; \
866 ln -sf $$RELATIVE/`echo gserialver | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
867 $(DESTDIR)$(SDK_BIN_DIR)/serialver; \
868 RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(JRE_BIN_DIR)); \
869 ln -sf $$RELATIVE/`echo grmiregistry | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
870 $(DESTDIR)$(JRE_BIN_DIR)/rmiregistry; \
871 ln -sf $$RELATIVE/`echo gkeytool | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
872 $(DESTDIR)$(JRE_BIN_DIR)/keytool; \
873 ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
874 $(DESTDIR)$(JRE_BIN_DIR)/java; \
875 ln -sf $$RELATIVE/`echo gorbd | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
876 $(DESTDIR)$(JRE_BIN_DIR)/orbd; \
877 ln -sf $$RELATIVE/`echo grmid | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
878 $(DESTDIR)$(JRE_BIN_DIR)/rmid; \
879 ln -sf $$RELATIVE/`echo gtnameserv | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
880 $(DESTDIR)$(JRE_BIN_DIR)/tnameserv; \
881 $(mkinstalldirs) $(DESTDIR)$(JVM_JAR_DIR); \
882 version=$(JAVA_VERSION).$(BUILD_VERSION); \
884 cd $(DESTDIR)$(JVM_JAR_DIR); \
885 RELATIVE=$$(relative $(DESTDIR)$(JRE_LIB_DIR) \
886 $(DESTDIR)$(JVM_JAR_DIR)); \
887 for jarname in jaas jce jdbc-stdext jndi jndi-cos jndi-dns \
888 jndi-ldap jndi-rmi jsse sasl; \
890 ln -sf $$RELATIVE/rt.jar $$jarname-$$version.jar; \
892 RELATIVE=$$(relative $(DESTDIR)$(jardir) \
893 $(DESTDIR)$(JVM_JAR_DIR)); \
894 for jar in *-$$version.jar; \
896 ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|-$(JAVA_VERSION).jar|g"); \
897 ln -sf $$jar $$(echo $$jar | sed "s|-$$version.jar|.jar|g"); \
900 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/security; \
901 RELATIVE=$$(relative $(DESTDIR)$(toolexeclibdir)/security \
902 $(DESTDIR)$(JRE_LIB_DIR)/security); \
903 cd $(DESTDIR)$(JRE_LIB_DIR)/security; \
904 ln -sf $$RELATIVE/classpath.security java.security; \
906 $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/linux; \
907 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client; \
908 $(mkinstalldirs) $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server; \
909 $(mkinstalldirs) $(DESTDIR)$(SDK_LIB_DIR); \
910 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
911 $(DESTDIR)$(JRE_LIB_DIR)); \
912 ln -sf $$RELATIVE/libgcj-$(gcc_version).jar \
913 $(DESTDIR)$(JRE_LIB_DIR)/rt.jar; \
914 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
915 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)); \
916 ln -sf $$RELATIVE/libjawt.so \
917 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/libjawt.so; \
918 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
919 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client); \
920 ln -sf $$RELATIVE/libjvm.so \
921 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/client/libjvm.so; \
922 RELATIVE=$$(relative $(DESTDIR)$(dbexecdir) \
923 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server); \
924 ln -sf $$RELATIVE/libjvm.so \
925 $(DESTDIR)$(JRE_LIB_DIR)/$(CPU)/server/libjvm.so; \
926 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
927 $(DESTDIR)$(SDK_LIB_DIR)); \
928 ln -sf $$RELATIVE/libgcj-tools-$(gcc_version).jar \
929 $(DESTDIR)$(SDK_LIB_DIR)/tools.jar; \
930 for headername in jawt jni; do \
931 DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
932 -print-file-name=include/$$headername.h)); \
933 RELATIVE=$$(relative $$DIRECTORY \
934 $(DESTDIR)$(SDK_INCLUDE_DIR)); \
935 ln -sf $$RELATIVE/$$headername.h \
936 $(DESTDIR)$(SDK_INCLUDE_DIR)/$$headername.h; \
938 for headername in jawt_md jni_md; do \
939 DIRECTORY=$$(dirname $$($(DESTDIR)$(bindir)/`echo gcj | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
940 -print-file-name=include/$$headername.h)); \
941 RELATIVE=$$(relative $$DIRECTORY \
942 $(DESTDIR)$(SDK_INCLUDE_DIR)/linux); \
943 ln -sf $$RELATIVE/$$headername.h \
944 $(DESTDIR)$(SDK_INCLUDE_DIR)/linux/$$headername.h; \
946 RELATIVE=$$(relative $(DESTDIR)$(datadir)/java \
947 $(DESTDIR)$(JVM_ROOT_DIR)/$(SDK_DIR));
950 ## ################################################################
953 ## Additional `check' targets for maintainer convenience.
956 ## This is used for maintainer-check. FIXME: should set from
957 ## configure using AC_CHECK_TOOL.
960 ## Try to make sure our library doesn't stomp the namespace.
961 maintainer-check: libgcj.la
962 $(NM) .libs/libgcj.a | grep ' T ' \
963 ## Anything with `4java' is assumed to be from .java source.
965 ## Anything with Jv is ok.
967 ## `terminate' and `unexpected' are part of the runtime.
968 | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
970 ## This rule can be used to see if the headers are more or less
972 header-check: libgcj-$(gcc_version).jar $(nat_headers)
974 for h in $(nat_headers); do \
975 echo "#include \"$$h\"" >> htest.cc; \
977 $(CXXCOMPILE) -fsyntax-only htest.cc
979 ## This rule can be used to see if all the .class files verify
981 class-check: libgcj-$(gcc_version).jar
982 @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
984 echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
985 if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
989 ## This rule checks whether write_entries_to_file works properly.
990 write-entries-to-file-check:
991 @echo Creating list of files to link...
992 @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
994 ## ################################################################
997 ## The `jv-convert' program and code to rebuild the converter header
1001 ## it only makes sense to try to rebuild the JIS .h files on native
1005 noinst_PROGRAMS += gen-from-JIS
1007 gen_from_JIS_SOURCES = \
1008 gnu/gcj/convert/gen-from-JIS.c \
1009 gnu/gcj/convert/make-trie.c \
1010 gnu/gcj/convert/make-trie.h
1012 gen_from_JIS_DEPENDENCIES = \
1013 gnu/gcj/convert/JIS0201.h \
1014 gnu/gcj/convert/JIS0208.h \
1015 gnu/gcj/convert/JIS0212.h
1017 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
1018 ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
1020 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
1021 ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
1023 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
1024 ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
1026 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
1027 # You can get it from
1028 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
1030 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
1031 echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
1032 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
1033 | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2) /*\3 */|p' \
1035 mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
1037 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
1038 # You can get it from
1039 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
1041 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
1042 echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
1043 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
1044 | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4) /*\5 */|p' \
1046 mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
1048 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
1049 # You can get it from
1050 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
1052 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
1053 echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
1054 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
1055 | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3) /*\4 */|p' \
1057 mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
1063 jv_convert_SOURCES =
1064 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1065 ## need this because we are explicitly using libtool to link using the
1067 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
1068 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1069 jv_convert_LINK = $(GCJLINK) $(jv_convert_LDFLAGS)
1070 ## We don't explicitly link in the libraries we need; libgcj.la brings
1071 ## in all dependencies. We need the -L so that gcj can find libgcj
1072 ## with `-lgcj', but it must come first, otherwise the -L flags
1073 ## brought in from libgcj.la would cause the install directories to be
1074 ## searched before the build-tree ones, and we'd get errors because of
1075 ## different libraries with the same SONAME from picky linkers such as
1076 ## Solaris'. FIXME: should be _libs on some systems.
1077 jv_convert_LDADD = -L$(here)/.libs libgcj.la
1078 ## Depend on the spec file to make sure it is up to date before
1079 ## linking this program.
1080 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
1082 jv_convert_DEPENDENCIES += libgcj-noncore.la
1085 gcj_dbtool_SOURCES = \
1086 gnu/gcj/tools/gcj_dbtool/natMain.cc
1088 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1089 ## need this because we are explicitly using libtool to link using the
1091 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
1092 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1093 gcj_dbtool_LINK = $(GCJLINK) $(gcj_dbtool_LDFLAGS)
1094 ## We don't explicitly link in the libraries we need; libgcj.la brings
1095 ## in all dependencies. We need the -L so that gcj can find libgcj
1096 ## with `-lgcj', but it must come first, otherwise the -L flags
1097 ## brought in from libgcj.la would cause the install directories to be
1098 ## searched before the build-tree ones, and we'd get errors because of
1099 ## different libraries with the same SONAME from picky linkers such as
1100 ## Solaris'. FIXME: should be _libs on some systems.
1101 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
1102 ## Depend on the spec file to make sure it is up to date before
1103 ## linking this program.
1104 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
1106 gcj_dbtool_DEPENDENCIES += libgcj-noncore.la
1109 gc_analyze_SOURCES =
1111 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1112 ## need this because we are explicitly using libtool to link using the
1114 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
1115 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1116 gc_analyze_LINK = $(GCJLINK) $(gc_analyze_LDFLAGS)
1117 ## See jv_convert_LDADD.
1118 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
1119 ## Depend on the spec file to make sure it is up to date before
1120 ## linking this program.
1121 gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
1123 gc_analyze_DEPENDENCIES += libgcj-noncore.la
1127 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
1128 ## need this because we are explicitly using libtool to link using the
1130 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
1131 -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1132 gij_LINK = $(GCJLINK) $(gij_LDFLAGS)
1133 ## See jv_convert_LDADD.
1134 gij_LDADD = -L$(here)/.libs libgij.la
1135 ## Depend on the spec file to make sure it is up to date before
1136 ## linking this program.
1137 gij_DEPENDENCIES = libgij.la
1139 ## Build an ecjx from a .jar.
1140 ecjx_SOURCES = ecjx.cc
1141 ## We use the BC ABI here so that we don't need to compile ecj.jar.
1142 ## Hopefully the user has compiled it into his system .db.
1143 ## However, even if not it will run reasonably quickly.
1145 ECJX_BASE_FLAGS = -findirect-dispatch \
1146 --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
1150 ecjx_LINK = $(GCJLINK) $(ecjx_LDFLAGS)
1153 ## Use ecj.jar at runtime.
1154 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
1156 ## Use ecj.jar at compile time.
1157 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
1158 endif !ENABLE_SHARED
1160 ecjx_LDADD = -L$(here)/.libs $(extra_ldflags)
1161 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
1163 ecjx_DEPENDENCIES += libgcj-noncore.la
1166 ecjx_DEPENDENCIES += libgcj_bc.la
1168 ecjx_LDADD += libgcj.la
1173 ecjx_LINK = $(GCJ_FOR_ECJX_LINK) $(ecjx_LDFLAGS)
1174 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
1177 ecjx.$(OBJEXT): ecjx.cc
1178 $(GCC_FOR_ECJX) -c $<
1182 ## This is a dummy definition.
1183 gappletviewer_SOURCES =
1184 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
1185 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1186 gappletviewer_LINK = $(GCJLINK) $(gappletviewer_LDFLAGS)
1187 ## See jv_convert_LDADD.
1188 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
1189 gappletviewer_DEPENDENCIES = libgcj-tools.la
1191 ## This is a dummy definition.
1192 gjarsigner_SOURCES =
1193 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
1194 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1195 gjarsigner_LINK = $(GCJLINK) $(gjarsigner_LDFLAGS)
1196 ## See jv_convert_LDADD.
1197 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
1198 gjarsigner_DEPENDENCIES = libgcj-tools.la
1200 ## This is a dummy definition.
1202 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
1203 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1204 gkeytool_LINK = $(GCJLINK) $(gkeytool_LDFLAGS)
1205 ## See jv_convert_LDADD.
1206 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
1207 gkeytool_DEPENDENCIES = libgcj-tools.la
1209 ## This is a dummy definition.
1211 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
1212 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1213 gjar_LINK = $(GCJLINK) $(gjar_LDFLAGS)
1214 ## See jv_convert_LDADD.
1215 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
1216 gjar_DEPENDENCIES = libgcj-tools.la
1218 ## This is a dummy definition.
1220 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
1221 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1222 gjavah_LINK = $(GCJLINK) $(gjavah_LDFLAGS)
1223 ## See jv_convert_LDADD.
1224 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
1225 gjavah_DEPENDENCIES = libgcj-tools.la
1227 ## This is a dummy definition.
1229 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
1230 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1231 gcjh_LINK = $(GCJLINK) $(gcjh_LDFLAGS)
1232 ## See jv_convert_LDADD.
1233 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
1234 gcjh_DEPENDENCIES = libgcj-tools.la
1236 ## This is a dummy definition.
1237 gnative2ascii_SOURCES =
1238 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
1239 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1240 gnative2ascii_LINK = $(GCJLINK) $(gnative2ascii_LDFLAGS)
1241 ## See jv_convert_LDADD.
1242 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
1243 gnative2ascii_DEPENDENCIES = libgcj-tools.la
1245 ## This is a dummy definition.
1247 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
1248 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1249 gorbd_LINK = $(GCJLINK) $(gorbd_LDFLAGS)
1250 ## See jv_convert_LDADD.
1251 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
1252 gorbd_DEPENDENCIES = libgcj-tools.la
1254 ## This is a dummy definition.
1256 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
1257 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1258 grmid_LINK = $(GCJLINK) $(grmid_LDFLAGS)
1259 ## See jv_convert_LDADD.
1260 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
1261 grmid_DEPENDENCIES = libgcj-tools.la
1263 ## This is a dummy definition.
1264 gserialver_SOURCES =
1265 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
1266 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1267 gserialver_LINK = $(GCJLINK) $(gserialver_LDFLAGS)
1268 ## See jv_convert_LDADD.
1269 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
1270 gserialver_DEPENDENCIES = libgcj-tools.la
1272 ## This is a dummy definition.
1273 gtnameserv_SOURCES =
1274 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
1275 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1276 gtnameserv_LINK = $(GCJLINK) $(gtnameserv_LDFLAGS)
1277 ## See jv_convert_LDADD.
1278 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
1279 gtnameserv_DEPENDENCIES = libgcj-tools.la
1281 ## This is a dummy definition.
1283 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
1284 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1285 grmic_LINK = $(GCJLINK) $(grmic_LDFLAGS)
1286 ## See jv_convert_LDADD.
1287 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
1288 grmic_DEPENDENCIES = libgcj-tools.la
1290 ## This is a dummy definition.
1291 grmiregistry_SOURCES =
1292 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
1293 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1294 grmiregistry_LINK = $(GCJLINK) $(grmiregistry_LDFLAGS)
1295 ## See jv_convert_LDADD.
1296 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
1297 grmiregistry_DEPENDENCIES = libgcj-tools.la
1299 ## This is a dummy definition.
1301 gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \
1302 -Djava.class.path=$(ANTLR_JAR) \
1303 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
1304 gjdoc_LINK = $(GCJLINK) $(gjdoc_LDFLAGS)
1305 ## See jv_convert_LDADD.
1306 gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la
1307 gjdoc_DEPENDENCIES = libgcj-tools.la
1309 ## ################################################################
1311 nat_jdwp_source_files = \
1312 gnu/classpath/jdwp/natVMFrame.cc \
1313 gnu/classpath/jdwp/natVMMethod.cc \
1314 gnu/classpath/jdwp/natVMVirtualMachine.cc
1316 nat_jvmti_source_files = \
1317 gnu/gcj/jvmti/natBreakpoint.cc \
1318 gnu/gcj/jvmti/natNormalBreakpoint.cc
1320 nat_jdwp_source_files =
1321 nat_jvmti_source_files =
1323 ## This lists all the C++ source files in subdirectories.
1324 nat_source_files = \
1325 $(nat_jdwp_source_files) \
1326 gnu/classpath/natConfiguration.cc \
1327 gnu/classpath/natSystemProperties.cc \
1328 gnu/classpath/natVMStackWalker.cc \
1329 gnu/gcj/natCore.cc \
1330 gnu/gcj/convert/JIS0208_to_Unicode.cc \
1331 gnu/gcj/convert/JIS0212_to_Unicode.cc \
1332 gnu/gcj/convert/Unicode_to_JIS.cc \
1333 gnu/gcj/convert/natIconv.cc \
1334 gnu/gcj/convert/natInput_EUCJIS.cc \
1335 gnu/gcj/convert/natInput_SJIS.cc \
1336 gnu/gcj/convert/natOutput_EUCJIS.cc \
1337 gnu/gcj/convert/natOutput_SJIS.cc \
1338 gnu/gcj/io/natSimpleSHSStream.cc \
1340 $(nat_jvmti_source_files) \
1341 gnu/gcj/runtime/natFinalizerThread.cc \
1342 gnu/gcj/runtime/natSharedLibLoader.cc \
1343 gnu/gcj/runtime/natSystemClassLoader.cc \
1344 gnu/gcj/runtime/natStringBuffer.cc \
1345 gnu/gcj/util/natDebug.cc \
1346 gnu/gcj/util/natGCInfo.cc \
1347 gnu/java/lang/natMainThread.cc \
1348 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
1349 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
1350 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
1351 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
1352 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
1353 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
1354 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
1355 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
1356 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
1357 gnu/java/net/natPlainDatagramSocketImpl.cc \
1358 gnu/java/net/natPlainSocketImpl.cc \
1359 gnu/java/net/protocol/core/natCoreInputStream.cc \
1360 gnu/java/nio/natVMPipe.cc \
1361 gnu/java/nio/natVMSelector.cc \
1362 gnu/java/nio/natNIOServerSocket.cc \
1363 gnu/java/nio/natVMChannel.cc \
1364 gnu/java/nio/channels/natFileChannelImpl.cc \
1365 gnu/java/security/jce/prng/natVMSecureRandom.cc \
1366 java/io/natFile.cc \
1367 java/io/natVMConsole.cc \
1368 java/io/natVMObjectInputStream.cc \
1369 java/io/natVMObjectStreamClass.cc \
1370 java/lang/natCharacter.cc \
1371 java/lang/natClass.cc \
1372 java/lang/natClassLoader.cc \
1373 java/lang/natConcreteProcess.cc \
1374 java/lang/natVMDouble.cc \
1375 java/lang/natVMFloat.cc \
1376 java/lang/natMath.cc \
1377 java/lang/natObject.cc \
1378 java/lang/natRuntime.cc \
1379 java/lang/natString.cc \
1380 java/lang/natAbstractStringBuffer.cc \
1381 java/lang/natSystem.cc \
1382 java/lang/natThread.cc \
1383 java/lang/natThreadLocal.cc \
1384 java/lang/natVMClassLoader.cc \
1385 java/lang/natVMProcess.cc \
1386 java/lang/natVMThrowable.cc \
1387 java/lang/ref/natReference.cc \
1388 java/lang/reflect/natArray.cc \
1389 java/lang/reflect/natConstructor.cc \
1390 java/lang/reflect/natField.cc \
1391 java/lang/reflect/natMethod.cc \
1392 java/lang/reflect/natVMProxy.cc \
1393 java/net/natVMInetAddress.cc \
1394 java/net/natVMNetworkInterface.cc \
1395 java/net/natVMURLConnection.cc \
1396 java/nio/channels/natVMChannels.cc \
1397 java/nio/natVMDirectByteBufferImpl.cc \
1398 java/security/natVMAccessController.cc \
1399 java/security/natVMAccessControlState.cc \
1400 java/text/natCollator.cc \
1401 java/util/natVMTimeZone.cc \
1402 java/util/concurrent/atomic/natAtomicLong.cc \
1403 java/util/logging/natLogger.cc \
1404 java/util/zip/natDeflater.cc \
1405 java/util/zip/natInflater.cc \
1406 sun/misc/natUnsafe.cc
1408 xlib_nat_source_files = \
1409 gnu/gcj/xlib/natClip.cc \
1410 gnu/gcj/xlib/natColormap.cc \
1411 gnu/gcj/xlib/natDisplay.cc \
1412 gnu/gcj/xlib/natDrawable.cc \
1413 gnu/gcj/xlib/natFont.cc \
1414 gnu/gcj/xlib/natGC.cc \
1415 gnu/gcj/xlib/natPixmap.cc \
1416 gnu/gcj/xlib/natScreen.cc \
1417 gnu/gcj/xlib/natVisual.cc \
1418 gnu/gcj/xlib/natWMSizeHints.cc \
1419 gnu/gcj/xlib/natWindow.cc \
1420 gnu/gcj/xlib/natWindowAttributes.cc \
1421 gnu/gcj/xlib/natXAnyEvent.cc \
1422 gnu/gcj/xlib/natXButtonEvent.cc \
1423 gnu/gcj/xlib/natXColor.cc \
1424 gnu/gcj/xlib/natXConfigureEvent.cc \
1425 gnu/gcj/xlib/natXException.cc \
1426 gnu/gcj/xlib/natXExposeEvent.cc \
1427 gnu/gcj/xlib/natXImage.cc \
1428 gnu/gcj/xlib/natXUnmapEvent.cc
1430 ## ################################################################
1433 ## Creating and installing sources.zip
1436 ## Create a zip holding all the sources. This can be meaningfully
1442 ( cd $(srcdir)/classpath; \
1443 find java gnu javax org sun -name '*.java' -print | \
1444 while read file; do \
1445 ## Ugly code to avoid "echo -C". Must separate each entry by a newline
1447 echo "x-C" | sed -e 's/^.//'; \
1448 echo $(srcdir)/classpath; \
1451 ( cd $(srcdir)/classpath/external/sax; \
1452 find org -name '*.java' -print | \
1453 while read file; do \
1454 echo "x-C" | sed -e 's/^.//'; \
1455 echo $(srcdir)/classpath/external/sax; \
1458 ( cd $(srcdir)/classpath/external/relaxngDatatype; \
1459 find org -name '*.java' -print | \
1460 while read file; do \
1461 echo "x-C" | sed -e 's/^.//'; \
1462 echo $(srcdir)/classpath/external/relaxngDatatype; \
1465 ( cd $(srcdir)/classpath/external/w3c_dom; \
1466 find org -name '*.java' -print | \
1467 while read file; do \
1468 echo "x-C" | sed -e 's/^.//'; \
1469 echo $(srcdir)/classpath/external/w3c_dom; \
1472 ## Now the build tree.
1474 find gnu java -name '*.java' -print | \
1475 while read file; do \
1476 echo "x-C" | sed -e 's/^.//'; \
1481 ## Many of the above circumlocutions were because ZIP used to be a
1482 ## relative path to fastjar. It didn't seem worthwhile to change the
1483 ## code when we moved to an external jar.
1484 $(JAR) -cfM@ $$here/src.zip
1485 ## Override GNU Classpath sources with libgcj replacements.
1489 find gnu java -name '*.java' -print | \
1490 while read file; do \
1491 echo "x-C" | sed -e 's/^.//'; \
1496 $(JAR) -ufM@ $$here/src.zip
1498 ## We use a variable for this in case the user wants to override it.
1499 sourcesdir = $(jardir)
1501 install-src.zip: src.zip
1502 $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
1505 ## ################################################################
1508 ## Dependency tracking madness.
1511 ## This is an evil hack to work around an automake limitation. We
1512 ## need to ensure that all CNI headers are built, not just the ones
1513 ## used internally by libgcj. We can't make the .o files depend on
1514 ## nat_headers, because in that case we'll force a complete rebuild of
1515 ## the C++ code whenever any .java file is touched. So instead we
1516 ## have a dummy rule which is only used once, namely the first time a
1517 ## build is done. On subsequent builds, the dependency tracking for
1518 ## the .cc compilations will have picked up the .h files, and these
1519 ## will be built directly as needed.
1522 ## Note that we don't use a real dependency here, since we don't want
1523 ## to rebuild all the headers here when the header list changes. If
1524 ## we did rebuild here, then any addition of a .java file would cause
1525 ## a large number of recompilations.
1526 $(MAKE) create-headers
1527 @echo > headers.stamp
1529 headers_to_make = $(nat_headers)
1531 headers_to_make += $(xlib_nat_headers)
1534 create-headers: $(headers_to_make)
1536 .PHONY: create-headers
1538 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1539 $(libgij_la_OBJECTS): headers.stamp
1540 $(libjvm_la_OBJECTS): headers.stamp
1542 ## ################################################################
1545 ## This section is for make and multilib madness.
1548 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1549 # values defined in terms of make variables, as is the case for CC and
1550 # friends when we are called from the top level Makefile.
1552 "AR_FLAGS=$(AR_FLAGS)" \
1553 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1554 "CFLAGS=$(CFLAGS)" \
1555 "CXXFLAGS=$(CXXFLAGS)" \
1556 "CPPFLAGS=$(CPPFLAGS)" \
1557 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1558 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1559 "INSTALL=$(INSTALL)" \
1560 "INSTALL_DATA=$(INSTALL_DATA)" \
1561 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1562 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1563 "GCJFLAGS=$(GCJFLAGS)" \
1564 "LDFLAGS=$(LDFLAGS)" \
1565 "LIBCFLAGS=$(LIBCFLAGS)" \
1566 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1568 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1569 "PICFLAG=$(PICFLAG)" \
1570 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1572 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1573 "exec_prefix=$(exec_prefix)" \
1574 "datadir=$(datadir)" \
1575 "infodir=$(infodir)" \
1576 "libdir=$(libdir)" \
1577 "mandir=$(mandir)" \
1578 "prefix=$(prefix)" \
1579 "gxx_include_dir=$(gxx_include_dir)" \
1582 "DLLTOOL=$(DLLTOOL)" \
1584 "LIBCFLAGS=$(LIBCFLAGS)" \
1586 "PICFLAG=$(PICFLAG)" \
1587 "RANLIB=$(RANLIB)" \
1588 "DESTDIR=$(DESTDIR)" \
1591 # Subdir rules rely on $(FLAGS_TO_PASS)
1592 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1594 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1598 # Multilib support variables.
1607 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1608 maintainer-clean-multi
1610 all-recursive: all-multi
1611 install-recursive: install-multi
1612 mostlyclean-recursive: mostlyclean-multi
1613 clean-recursive: clean-multi
1614 distclean-recursive: distclean-multi
1615 maintainer-clean-recursive: maintainer-clean-multi
1618 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1620 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1622 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1624 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1626 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1627 maintainer-clean-multi:
1628 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
1631 if ANONVERSCRIPT_SUN
1632 # This must be at the end of the Makefile, otherwise .SECONDEXPANSION
1633 # causes expansion of filenames with $ in their names, which breaks the build.
1634 # .SECONDEXPANSION is necessary to allow the use of automatic variables ($@
1635 # in this case) in the requisites of pattern rules.
1638 %.ver-sun : $(srcdir)/libgcj.ver \
1639 $(top_srcdir)/../contrib/make_sunver.pl \
1640 $$($$(basename $$@)_la_OBJECTS) $$($$(basename $$@)_la_LIBADD)
1641 perl $(top_srcdir)/../contrib/make_sunver.pl \
1642 $(srcdir)/libgcj.ver \
1643 `echo $($(basename $@)_la_OBJECTS) $($(basename $@)_la_LIBADD) | \
1644 sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
1645 > $@ || (rm -f $@ ; exit 1)