AUTOMAKE_OPTIONS = foreign subdir-objects
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I . -I .. -I ../config -I libltdl
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
endif
# write_entries_to_file - writes each entry in a list
-# to the specified file. Each entry is written individually
-# to accomodate systems with severe command-line-length
-# limitations.
+# to the specified file. Entries are written in chunks of
+# $(write_entries_to_file_split) to accomodate systems with
+# severe command-line-length limitations.
# Parameters:
# $(1): variable containing entries to iterate over
# $(2): output file
-write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2)))
+write_entries_to_file_split = 50
+write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
+ $(foreach range, \
+ $(shell i=1; while test $$i -le $(words $(1)); do \
+ echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
+ $(shell echo $(wordlist $(range), \
+ $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \
+ | tr ' ' '\n' >> $(2)))
## ################################################################
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
extra_ldflags_libjava = @extra_ldflags_libjava@
+extra_ldflags = @extra_ldflags@
if ANONVERSCRIPT
extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
+ $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
AM_CFLAGS += $(WARNINGS)
endif
+if SUPPRESS_LIBGCJ_BC
+LIBGCJ_BC_FLAGS =
+else
+LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
+endif
+
## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
-libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc stacktrace.cc \
- link.cc defineclass.cc interpret.cc verify.cc \
+if INTERPRETER
+libgcj_interpret_source_files = jvmti.cc interpret.cc
+else
+libgcj_interpret_source_files =
+endif
+
+libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
+ link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
$(nat_source_files)
## We need to compile at least the interpreter this way.
# Include THREADLIBS here to ensure that the correct version of
# certain linuxthread functions get linked:
## The mysterious backslash in the grep pattern is consumed by make.
-libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
$(LIBLTDL) $(SYS_ZLIBS) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
$(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
$(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
@:
-install-exec-hook: install-toolexeclibLTLIBRARIES install-libexecsubPROGRAMS
+install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
+ install-libexecsubPROGRAMS
## Support for libgcj_bc: dummy shared library used only at link-time.
if USE_LIBGCJ_BC
## Install libgcj_bc dummy lib in the target directory. We also need to delete
## Install the headers. It is fairly ugly that we have to do this by
## hand.
+install_data_local_split = 50
install-data-local:
$(PRE_INSTALL)
## Install the .pc file.
## length limit of some shells.
@echo Creating list of headers to install...
@: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
- @cat tmp-ilist | while read f; do \
- d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \
- $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$d; \
- if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ while read file; do echo "$$file $$file"; done < tmp-ilist | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } \
+ { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(install_data_local_split)) { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }' | \
+ while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir"; \
+ $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
+ echo " $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir"; \
+ $(INSTALL_DATA) $$xfiles $(DESTDIR)$(gxx_include_dir)/$$dir; }; \
done
-@rm -f tmp-ilist
## Install inner class headers.
## need this because we are explicitly using libtool to link using the
## `.la' file.
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
jv_convert_LINK = $(GCJLINK)
## We don't explicitly link in the libraries we need; libgcj.la brings
## in all dependencies. We need the -L so that gcj can find libgcj
## need this because we are explicitly using libtool to link using the
## `.la' file.
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gcj_dbtool_LINK = $(GCJLINK)
## We don't explicitly link in the libraries we need; libgcj.la brings
## in all dependencies. We need the -L so that gcj can find libgcj
## need this because we are explicitly using libtool to link using the
## `.la' file.
gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gc_analyze_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
## need this because we are explicitly using libtool to link using the
## `.la' file.
gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
- -shared-libgcc $(THREADLDFLAGS)
+ -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
+ $(extra_gij_ldflags)
gij_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gij_LDADD = -L$(here)/.libs libgij.la
## This is a dummy definition.
gappletviewer_SOURCES =
gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gappletviewer_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gjarsigner_SOURCES =
gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gjarsigner_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gkeytool_SOURCES =
gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gkeytool_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gjar_SOURCES =
gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gjar_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gjar_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gjavah_SOURCES =
gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gjavah_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gcjh_SOURCES =
gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gcjh_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gnative2ascii_SOURCES =
gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gnative2ascii_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gorbd_SOURCES =
gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gorbd_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
grmid_SOURCES =
grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
grmid_LINK = $(GCJLINK)
## See jv_convert_LDADD.
grmid_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gserialver_SOURCES =
gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gserialver_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
gtnameserv_SOURCES =
gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
gtnameserv_LINK = $(GCJLINK)
## See jv_convert_LDADD.
gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
grmic_SOURCES =
grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
grmic_LINK = $(GCJLINK)
## See jv_convert_LDADD.
grmic_LDADD = -L$(here)/.libs libgcj-tools.la
## This is a dummy definition.
grmiregistry_SOURCES =
grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
grmiregistry_LINK = $(GCJLINK)
## See jv_convert_LDADD.
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
grmiregistry_DEPENDENCIES = libgcj-tools.la
## ################################################################
+if INTERPRETER
+nat_jdwp_source_files = \
+gnu/classpath/jdwp/natVMFrame.cc \
+gnu/classpath/jdwp/natVMMethod.cc \
+gnu/classpath/jdwp/natVMVirtualMachine.cc
+nat_jvmti_source_files = \
+gnu/gcj/jvmti/natBreakpoint.cc \
+gnu/gcj/jvmti/natNormalBreakpoint.cc
+else
+nat_jdwp_source_files =
+nat_jvmti_source_files =
+endif
## This lists all the C++ source files in subdirectories.
nat_source_files = \
-gnu/classpath/jdwp/natVMFrame.cc \
-gnu/classpath/jdwp/natVMMethod.cc \
-gnu/classpath/jdwp/natVMVirtualMachine.cc \
+$(nat_jdwp_source_files) \
gnu/classpath/natConfiguration.cc \
gnu/classpath/natSystemProperties.cc \
gnu/classpath/natVMStackWalker.cc \
gnu/gcj/convert/natOutput_SJIS.cc \
gnu/gcj/io/natSimpleSHSStream.cc \
gnu/gcj/io/shs.cc \
-gnu/gcj/jvmti/natBreakpoint.cc \
+$(nat_jvmti_source_files) \
gnu/gcj/runtime/natFinalizerThread.cc \
gnu/gcj/runtime/natSharedLibLoader.cc \
gnu/gcj/runtime/natSystemClassLoader.cc \