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. Each entry is written individually
17 # to accomodate systems with severe command-line-length
20 # $(1): variable containing entries to iterate over
22 write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) $(foreach object,$(1),$(shell echo $(object) >> $(2)))
24 ## ################################################################
26 # autoconf2.13's target_alias
27 target_noncanonical = @target_noncanonical@
29 # This is required by TL_AC_GXX_INCLUDE_DIR.
30 libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
32 libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
35 ## What gets installed, and where.
38 toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la
39 toolexecmainlib_DATA = libgcj.spec
42 toolexeclib_LTLIBRARIES += libgcj_bc.la
46 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
49 dbexec_LTLIBRARIES = libjvm.la
51 pkgconfigdir = $(libdir)/pkgconfig
53 jardir = $(datadir)/java
54 jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
56 jar_DATA += $(ECJ_BUILD_JAR)
60 JAVA_HOME_DIR = $(JAVA_HOME)
61 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
63 JAVA_HOME_DIR = $(prefix)
64 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
67 ## Name of the default .db.
69 ## Compiler specific component of the .db file
70 db_pathtail = gcj-$(gcc_version)/$(db_name)
72 ## For now, only on native systems. FIXME.
74 bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \
75 gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \
76 gorbd grmid gserialver gtnameserv gc-analyze
78 ## It is convenient to actually build and install the default database
79 ## when gcj-dbtool is available.
80 dbexec_DATA = $(db_name)
83 bin_SCRIPTS = addr2name.awk
86 ## We build ecjx and not ecj1 because in one mode, ecjx will not work
87 ## until after 'make install', and we don't want it to be picked up in
88 ## the build tree by gcj via a -B option.
89 libexecsub_PROGRAMS = ecjx
92 ## ################################################################
95 ## Compilers and compilation flags.
98 ## The compiler with whatever flags we want for both -c and -C
100 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
102 extra_ldflags_libjava = @extra_ldflags_libjava@
103 extra_ldflags = @extra_ldflags@
106 extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
109 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
111 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
112 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
113 LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
114 $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
116 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
118 WARNINGS = -Wextra -Wall
119 ## Some systems don't allow `$' in identifiers by default, so we force
120 ## it with -fdollars-in-identifiers. -Wswitch-enum detects bugs in
121 ## the verifier implementation, and maybe other places. We need
122 ## _GNU_SOURCE defined for some Linux builds. It doesn't hurt to
123 ## always define it. Some systems, including Linux, need
124 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
127 -fnon-call-exceptions \
129 -fdollars-in-identifiers \
131 -D_FILE_OFFSET_BITS=64 \
135 -DPREFIX="\"$(prefix)\"" \
136 -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
137 -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
138 -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
139 -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
140 -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
141 -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
142 -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
143 -DECJ_JAR_FILE="\"$(ECJ_JAR)\"" \
144 -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
145 -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
149 -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
151 -Wno-deprecated -fbootstrap-classes
153 AM_CFLAGS = @LIBGCJ_CFLAGS@
155 AM_CFLAGS += $(WARNINGS)
158 if SUPPRESS_LIBGCJ_BC
161 LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes
164 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
165 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
168 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
170 LIBFFIINCS = @LIBFFIINCS@
172 AM_CPPFLAGS = -I$(top_srcdir) \
173 -Iinclude -I$(top_srcdir)/include \
174 -I$(top_srcdir)/classpath/include \
175 -Iclasspath/include \
176 -I$(top_srcdir)/classpath/native/fdlibm \
177 $(GCINCS) $(THREADINCS) $(INCLTDL) \
178 $(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
180 BOOTCLASSPATH = $(srcdir)/classpath/lib
182 ## ################################################################
185 ## How to build libgcj.a and libgcj.jar
188 libgij_la_SOURCES = gij.cc
189 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
190 ## See jv_convert_LDADD.
191 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
192 ## The mysterious backslash in the grep pattern is consumed by make.
193 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
194 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
197 libgcj_interpret_source_files = jvmti.cc interpret.cc
199 libgcj_interpret_source_files =
202 libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
203 link.cc defineclass.cc verify.cc $(libgcj_interpret_source_files) \
206 ## We need to compile at least the interpreter this way.
207 interpret.lo: AM_CXXFLAGS += -fwrapv
210 libgcj_la_SOURCES += boehm.cc
214 libgcj_la_SOURCES += nogc.cc
217 if USING_POSIX_PLATFORM
218 libgcj_la_SOURCES += posix.cc
221 if USING_WIN32_PLATFORM
222 libgcj_la_SOURCES += win32.cc
226 libgcj_la_SOURCES += darwin.cc
229 if USING_POSIX_THREADS
230 libgcj_la_SOURCES += posix-threads.cc
233 if USING_WIN32_THREADS
234 libgcj_la_SOURCES += win32-threads.cc
238 libgcj_la_SOURCES += no-threads.cc
241 ## Objects from C++ sources in subdirs.
242 nat_files = $(nat_source_files:.cc=.lo)
243 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
245 # Include THREADLIBS here to ensure that the correct version of
246 # certain linuxthread functions get linked:
247 ## The mysterious backslash in the grep pattern is consumed by make.
248 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
249 $(LIBLTDL) $(SYS_ZLIBS) \
250 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
251 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
253 classpath/native/fdlibm/libfdlibm.la \
254 java/lang/Object.lo \
256 java/process-$(PLATFORM).lo \
257 $(all_packages_source_files:.list=.lo) \
260 $(LIBFFI) $(ZLIBS) $(GCLIBS)
261 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
262 java/lang/Object.lo \
264 java/process-$(PLATFORM).lo \
265 $(all_packages_source_files:.list=.lo) \
266 $(LIBLTDL) $(libgcj_la_LIBADD)
268 libgcj_la_DEPENDENCIES += $(srcdir)/libgcj.ver
270 libgcj_la_LINK = $(LIBLINK)
272 ## A hack to make sure the various gcj-related macros, like
273 ## LTGCJCOMPILE, are defined by automake. This is never actually
275 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
277 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
278 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst
279 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
280 -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
281 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
282 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
283 libgcj_tools_la_LINK = $(LIBLINK)
286 libjvm_la_SOURCES = jni-libjvm.cc
287 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
288 ## See jv_convert_LDADD.
289 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
290 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC)
292 ## The .db file. This rule is only used for native builds, so it is
293 ## safe to invoke gcj-dbtool.
294 $(db_name): gcj-dbtool$(EXEEXT)
295 ## In case it exists already.
297 ## We don't actually care if it fails -- if it does, just make an
298 ## empty file. This is simpler than trying to discover when mmap is
300 ./gcj-dbtool -n $(db_name) || touch $(db_name)
302 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
303 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
304 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
305 libgcj.la libgcj.spec \
306 $(lib_gnu_awt_xlib_la_LIBADD)
307 ## We require libstdc++-v3 to be in the same build tree.
308 lib_gnu_awt_xlib_la_CPPFLAGS = \
310 -I../libstdc++-v3/include \
311 -I../libstdc++-v3/include/$(target_noncanonical) \
312 -I$(srcdir)/../libstdc++-v3/libsupc++
313 ## The mysterious backslash in the grep pattern is consumed by make.
314 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
315 @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
316 -rpath $(toolexeclibdir) \
317 -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
318 lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
320 ## Support for libgcj_bc: dummy shared library.
322 ## This lets us have one soname in BC objects and another in C++ ABI objects.
323 libgcj_bc_la_SOURCES = libgcj_bc.c
324 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
325 $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
326 libgcj_bc_la_LIBADD = libgcj.la
327 libgcj_bc_la_DEPENDENCIES = libgcj.la
328 libgcj_bc_la_LINK = $(LIBLINK)
329 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
330 ## USE_LIBGCJ_BC shouldn't be set on other targets.
331 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
334 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
336 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
337 $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
338 $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
339 rm .libs/libgcj_bc.so; \
340 mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
341 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
342 -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
343 rm .libs/libgcj_bc.so.1; \
344 $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
346 ## Note that property_files is defined in sources.am.
347 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
349 $(propertyo_files): %.lo: classpath/resource/%
350 $(mkinstalldirs) `dirname $@`; \
351 $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
353 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
354 ## Note that this now omits the property files.
355 ## It doesn't matter since we don't use the jar at runtime.
356 here=`pwd`; cd $(srcdir)/classpath/lib; \
357 find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
358 $(JAR) -cfM@ $$here/libgcj-$(gcc_version).jar
360 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
363 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
364 DISTCLEANFILES = native.dirs
367 ## Use libtool rm to remove each libtool object
368 find . -name '*.lo' -print | xargs $(LIBTOOL) rm -f
371 ## Remove every .d file that was created.
372 find . -name '*.d' -print | xargs rm -f
374 # Just remove the objects from C++ sources, for testing the C++ compiler.
376 rm -f $(nat_files) $(xlib_nat_files)
378 SUFFIXES = .class .java .h .properties .list
380 ## Pass the list of object files to libtool in a temporary file to
381 ## avoid tripping platform command line length limits.
382 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
383 @echo Creating list of files to link...
384 @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
385 $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
386 -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
388 ## ################################################################
390 ## Compiling a list of java sources to a single .o.
393 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
395 java/lang/Object.lo: classpath/lib/java/lang/Object.class
396 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
398 java/lang/Class.lo: classpath/lib/java/lang/Class.class
399 $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
401 ## ################################################################
403 ## This pulls in a number of variable and target definitions.
406 ## ################################################################
409 ## How to build header files.
412 ## We have special rules for certain headers.
413 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
414 java/lang/String.h java/lang/reflect/Constructor.h \
415 java/lang/reflect/Field.h java/lang/reflect/Method.h \
416 java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
418 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
419 java/io/ObjectInputStream$$GetField.h \
420 java/nio/DirectByteBufferImpl$$ReadWrite.h \
421 java/nio/channels/Pipe$$SinkChannel.h \
422 java/nio/channels/Pipe$$SourceChannel.h \
423 java/lang/VMProcess$ImmediateEOFInputStream.h \
424 java/lang/reflect/Proxy$$ProxyData.h \
425 java/lang/reflect/Proxy$$ProxyType.h \
426 gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
427 gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
428 gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
429 gnu/java/nio/PipeImpl$$SourceChannelImpl.h
431 generic_header_files = $(ordinary_header_files) $(inner_nat_headers) \
436 $(generic_header_files): gcjh.stamp
438 gcjh.stamp: classpath/lib/compile-classes
439 if JAVA_MAINTAINER_MODE
440 $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
441 --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
445 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
446 nat_headers_install = $(ordinary_header_files)
448 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
450 ## Headers we maintain by hand and which we want to install.
451 extra_headers = java/lang/Object.h java/lang/Class.h
453 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
456 install-exec-hook: install-binPROGRAMS install-toolexeclibLTLIBRARIES \
457 install-libexecsubPROGRAMS
458 ## Support for libgcj_bc: dummy shared library used only at link-time.
460 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
461 ## libtool's .la file, this prevents libtool resetting the lib again
463 @echo Installing dummy lib libgcj_bc.so.1.0.0; \
464 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
465 mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
466 $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
467 -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
468 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
469 $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
470 rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la;
473 ## Undo any prepending of the target prefix and transform
474 ## to the actual host's executable suffix.
475 mv $(DESTDIR)$(libexecsubdir)/`echo ecjx | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
478 ## Install the headers. It is fairly ugly that we have to do this by
482 ## Install the .pc file.
483 @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
484 file="libgcj-$${pc_version}.pc"; \
485 $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
486 echo " $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
487 $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
488 ## We use a GNU make trick here so that we don't go over the command
489 ## length limit of some shells.
490 @echo Creating list of headers to install...
491 @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
492 @cat tmp-ilist | while read f; do \
493 d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \
494 $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$d; \
495 if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \
496 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f"; \
497 $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f; \
500 ## Install inner class headers.
501 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
502 $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
503 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
504 $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
505 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
506 $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
507 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
508 $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
509 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
510 $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
511 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
514 ## ################################################################
517 ## Additional `check' targets for maintainer convenience.
520 ## This is used for maintainer-check. FIXME: should set from
521 ## configure using AC_CHECK_TOOL.
524 ## Try to make sure our library doesn't stomp the namespace.
525 maintainer-check: libgcj.la
526 $(NM) .libs/libgcj.a | grep ' T ' \
527 ## Anything with `4java' is assumed to be from .java source.
529 ## Anything with Jv is ok.
531 ## `terminate' and `unexpected' are part of the runtime.
532 | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
534 ## This rule can be used to see if the headers are more or less
536 header-check: libgcj-$(gcc_version).jar $(nat_headers)
538 for h in $(nat_headers); do \
539 echo "#include \"$$h\"" >> htest.cc; \
541 $(CXXCOMPILE) -fsyntax-only htest.cc
543 ## This rule can be used to see if all the .class files verify
545 class-check: libgcj-$(gcc_version).jar
546 @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
548 echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
549 if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
553 ## This rule checks whether write_entries_to_file works properly.
554 write-entries-to-file-check:
555 @echo Creating list of files to link...
556 @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
558 ## ################################################################
561 ## The `jv-convert' program and code to rebuild the converter header
565 ## it only makes sense to try to rebuild the JIS .h files on native
569 noinst_PROGRAMS = gen-from-JIS
571 gen_from_JIS_SOURCES = \
572 gnu/gcj/convert/gen-from-JIS.c \
573 gnu/gcj/convert/make-trie.c
575 gen_from_JIS_DEPENDENCIES = \
576 gnu/gcj/convert/JIS0201.h \
577 gnu/gcj/convert/JIS0208.h \
578 gnu/gcj/convert/JIS0212.h
580 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
581 ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
583 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
584 ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
586 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
587 ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
589 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
590 # You can get it from
591 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
593 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
594 echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
595 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
596 | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2) /*\3 */|p' \
598 mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
600 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
601 # You can get it from
602 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
604 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
605 echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
606 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
607 | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4) /*\5 */|p' \
609 mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
611 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
612 # You can get it from
613 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
615 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
616 echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
617 tr -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
618 | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3) /*\4 */|p' \
620 mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
627 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
628 ## need this because we are explicitly using libtool to link using the
630 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
631 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
632 jv_convert_LINK = $(GCJLINK)
633 ## We don't explicitly link in the libraries we need; libgcj.la brings
634 ## in all dependencies. We need the -L so that gcj can find libgcj
635 ## with `-lgcj', but it must come first, otherwise the -L flags
636 ## brought in from libgcj.la would cause the install directories to be
637 ## searched before the build-tree ones, and we'd get errors because of
638 ## different libraries with the same SONAME from picky linkers such as
639 ## Solaris'. FIXME: should be _libs on some systems.
640 jv_convert_LDADD = -L$(here)/.libs libgcj.la
641 ## Depend on the spec file to make sure it is up to date before
642 ## linking this program.
643 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
645 gcj_dbtool_SOURCES = \
646 gnu/gcj/tools/gcj_dbtool/natMain.cc
648 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
649 ## need this because we are explicitly using libtool to link using the
651 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
652 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
653 gcj_dbtool_LINK = $(GCJLINK)
654 ## We don't explicitly link in the libraries we need; libgcj.la brings
655 ## in all dependencies. We need the -L so that gcj can find libgcj
656 ## with `-lgcj', but it must come first, otherwise the -L flags
657 ## brought in from libgcj.la would cause the install directories to be
658 ## searched before the build-tree ones, and we'd get errors because of
659 ## different libraries with the same SONAME from picky linkers such as
660 ## Solaris'. FIXME: should be _libs on some systems.
661 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
662 ## Depend on the spec file to make sure it is up to date before
663 ## linking this program.
664 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
668 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
669 ## need this because we are explicitly using libtool to link using the
671 gc_analyze_LDFLAGS = --main=gnu.gcj.tools.gc_analyze.MemoryAnalyze \
672 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
673 gc_analyze_LINK = $(GCJLINK)
674 ## See jv_convert_LDADD.
675 gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la
676 ## Depend on the spec file to make sure it is up to date before
677 ## linking this program.
678 gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec
681 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
682 ## need this because we are explicitly using libtool to link using the
684 gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
685 -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \
687 gij_LINK = $(GCJLINK)
688 ## See jv_convert_LDADD.
689 gij_LDADD = -L$(here)/.libs libgij.la
690 ## Depend on the spec file to make sure it is up to date before
691 ## linking this program.
692 gij_DEPENDENCIES = libgij.la
694 ## Build an ecjx from a .jar.
696 ## We use the BC ABI here so that we don't need to compile ecj.jar.
697 ## Hopefully the user has compiled it into his system .db.
698 ## However, even if not it will run reasonably quickly.
700 ECJX_BASE_FLAGS = -findirect-dispatch \
701 --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
705 ecjx_LINK = $(GCJLINK)
708 ## Use ecj.jar at runtime.
709 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
711 ## Use ecj.jar at compile time.
712 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
715 ecjx_LDADD = -L$(here)/.libs libgcj.la
716 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
718 ecjx_DEPENDENCIES += libgcj_bc.la
723 ecjx_LINK = $(GCJ_FOR_ECJX_LINK)
724 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
730 ## This is a dummy definition.
731 gappletviewer_SOURCES =
732 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
733 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
734 gappletviewer_LINK = $(GCJLINK)
735 ## See jv_convert_LDADD.
736 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
737 gappletviewer_DEPENDENCIES = libgcj-tools.la
739 ## This is a dummy definition.
741 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
742 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
743 gjarsigner_LINK = $(GCJLINK)
744 ## See jv_convert_LDADD.
745 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
746 gjarsigner_DEPENDENCIES = libgcj-tools.la
748 ## This is a dummy definition.
750 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
751 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
752 gkeytool_LINK = $(GCJLINK)
753 ## See jv_convert_LDADD.
754 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
755 gkeytool_DEPENDENCIES = libgcj-tools.la
757 ## This is a dummy definition.
759 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
760 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
761 gjar_LINK = $(GCJLINK)
762 ## See jv_convert_LDADD.
763 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
764 gjar_DEPENDENCIES = libgcj-tools.la
766 ## This is a dummy definition.
768 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
769 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
770 gjavah_LINK = $(GCJLINK)
771 ## See jv_convert_LDADD.
772 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
773 gjavah_DEPENDENCIES = libgcj-tools.la
775 ## This is a dummy definition.
777 gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
778 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
779 gcjh_LINK = $(GCJLINK)
780 ## See jv_convert_LDADD.
781 gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
782 gcjh_DEPENDENCIES = libgcj-tools.la
784 ## This is a dummy definition.
785 gnative2ascii_SOURCES =
786 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
787 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
788 gnative2ascii_LINK = $(GCJLINK)
789 ## See jv_convert_LDADD.
790 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
791 gnative2ascii_DEPENDENCIES = libgcj-tools.la
793 ## This is a dummy definition.
795 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
796 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
797 gorbd_LINK = $(GCJLINK)
798 ## See jv_convert_LDADD.
799 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
800 gorbd_DEPENDENCIES = libgcj-tools.la
802 ## This is a dummy definition.
804 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
805 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
806 grmid_LINK = $(GCJLINK)
807 ## See jv_convert_LDADD.
808 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
809 grmid_DEPENDENCIES = libgcj-tools.la
811 ## This is a dummy definition.
813 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
814 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
815 gserialver_LINK = $(GCJLINK)
816 ## See jv_convert_LDADD.
817 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
818 gserialver_DEPENDENCIES = libgcj-tools.la
820 ## This is a dummy definition.
822 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
823 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
824 gtnameserv_LINK = $(GCJLINK)
825 ## See jv_convert_LDADD.
826 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
827 gtnameserv_DEPENDENCIES = libgcj-tools.la
829 ## This is a dummy definition.
831 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
832 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
833 grmic_LINK = $(GCJLINK)
834 ## See jv_convert_LDADD.
835 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
836 grmic_DEPENDENCIES = libgcj-tools.la
838 ## This is a dummy definition.
839 grmiregistry_SOURCES =
840 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
841 -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
842 grmiregistry_LINK = $(GCJLINK)
843 ## See jv_convert_LDADD.
844 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
845 grmiregistry_DEPENDENCIES = libgcj-tools.la
847 ## ################################################################
849 nat_jdwp_source_files = \
850 gnu/classpath/jdwp/natVMFrame.cc \
851 gnu/classpath/jdwp/natVMMethod.cc \
852 gnu/classpath/jdwp/natVMVirtualMachine.cc
854 nat_jvmti_source_files = \
855 gnu/gcj/jvmti/natBreakpoint.cc \
856 gnu/gcj/jvmti/natNormalBreakpoint.cc
858 nat_jdwp_source_files =
859 nat_jvmti_source_files =
861 ## This lists all the C++ source files in subdirectories.
863 $(nat_jdwp_source_files) \
864 gnu/classpath/natConfiguration.cc \
865 gnu/classpath/natSystemProperties.cc \
866 gnu/classpath/natVMStackWalker.cc \
868 gnu/gcj/convert/JIS0208_to_Unicode.cc \
869 gnu/gcj/convert/JIS0212_to_Unicode.cc \
870 gnu/gcj/convert/Unicode_to_JIS.cc \
871 gnu/gcj/convert/natIconv.cc \
872 gnu/gcj/convert/natInput_EUCJIS.cc \
873 gnu/gcj/convert/natInput_SJIS.cc \
874 gnu/gcj/convert/natOutput_EUCJIS.cc \
875 gnu/gcj/convert/natOutput_SJIS.cc \
876 gnu/gcj/io/natSimpleSHSStream.cc \
878 $(nat_jvmti_source_files) \
879 gnu/gcj/runtime/natFinalizerThread.cc \
880 gnu/gcj/runtime/natSharedLibLoader.cc \
881 gnu/gcj/runtime/natSystemClassLoader.cc \
882 gnu/gcj/runtime/natStringBuffer.cc \
883 gnu/gcj/util/natDebug.cc \
884 gnu/gcj/util/natGCInfo.cc \
885 gnu/java/lang/natMainThread.cc \
886 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
887 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
888 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
889 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
890 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
891 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
892 gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc \
893 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
894 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
895 gnu/java/net/natPlainDatagramSocketImpl.cc \
896 gnu/java/net/natPlainSocketImpl.cc \
897 gnu/java/net/protocol/core/natCoreInputStream.cc \
898 gnu/java/nio/natVMPipe.cc \
899 gnu/java/nio/natVMSelector.cc \
900 gnu/java/nio/natNIOServerSocket.cc \
901 gnu/java/nio/natVMChannel.cc \
902 gnu/java/nio/channels/natFileChannelImpl.cc \
904 java/io/natVMObjectInputStream.cc \
905 java/io/natVMObjectStreamClass.cc \
906 java/lang/natCharacter.cc \
907 java/lang/natClass.cc \
908 java/lang/natClassLoader.cc \
909 java/lang/natConcreteProcess.cc \
910 java/lang/natVMDouble.cc \
911 java/lang/natVMFloat.cc \
912 java/lang/natMath.cc \
913 java/lang/natObject.cc \
914 java/lang/natRuntime.cc \
915 java/lang/natString.cc \
916 java/lang/natStringBuffer.cc \
917 java/lang/natStringBuilder.cc \
918 java/lang/natSystem.cc \
919 java/lang/natThread.cc \
920 java/lang/natThreadLocal.cc \
921 java/lang/natVMClassLoader.cc \
922 java/lang/natVMProcess.cc \
923 java/lang/natVMThrowable.cc \
924 java/lang/ref/natReference.cc \
925 java/lang/reflect/natArray.cc \
926 java/lang/reflect/natConstructor.cc \
927 java/lang/reflect/natField.cc \
928 java/lang/reflect/natMethod.cc \
929 java/lang/reflect/natVMProxy.cc \
930 java/net/natVMInetAddress.cc \
931 java/net/natVMNetworkInterface.cc \
932 java/net/natVMURLConnection.cc \
933 java/nio/channels/natVMChannels.cc \
934 java/nio/natVMDirectByteBufferImpl.cc \
935 java/security/natVMAccessController.cc \
936 java/security/natVMAccessControlState.cc \
937 java/text/natCollator.cc \
938 java/util/natVMTimeZone.cc \
939 java/util/concurrent/atomic/natAtomicLong.cc \
940 java/util/logging/natLogger.cc \
941 java/util/zip/natDeflater.cc \
942 java/util/zip/natInflater.cc \
943 sun/misc/natUnsafe.cc
945 xlib_nat_source_files = \
946 gnu/gcj/xlib/natClip.cc \
947 gnu/gcj/xlib/natColormap.cc \
948 gnu/gcj/xlib/natDisplay.cc \
949 gnu/gcj/xlib/natDrawable.cc \
950 gnu/gcj/xlib/natFont.cc \
951 gnu/gcj/xlib/natGC.cc \
952 gnu/gcj/xlib/natPixmap.cc \
953 gnu/gcj/xlib/natScreen.cc \
954 gnu/gcj/xlib/natVisual.cc \
955 gnu/gcj/xlib/natWMSizeHints.cc \
956 gnu/gcj/xlib/natWindow.cc \
957 gnu/gcj/xlib/natWindowAttributes.cc \
958 gnu/gcj/xlib/natXAnyEvent.cc \
959 gnu/gcj/xlib/natXButtonEvent.cc \
960 gnu/gcj/xlib/natXColor.cc \
961 gnu/gcj/xlib/natXConfigureEvent.cc \
962 gnu/gcj/xlib/natXException.cc \
963 gnu/gcj/xlib/natXExposeEvent.cc \
964 gnu/gcj/xlib/natXImage.cc \
965 gnu/gcj/xlib/natXUnmapEvent.cc
967 ## ################################################################
970 ## Creating and installing sources.zip
973 ## Create a zip holding all the sources. This can be meaningfully
979 ( cd $(srcdir)/classpath; \
980 find java gnu javax org sun -name '*.java' -print | \
981 while read file; do \
982 ## Ugly code to avoid "echo -C". Must separate each entry by a newline
984 echo "x-C" | sed -e 's/^.//'; \
985 echo $(srcdir)/classpath; \
988 ( cd $(srcdir)/classpath/external/sax; \
989 find org -name '*.java' -print | \
990 while read file; do \
991 echo "x-C" | sed -e 's/^.//'; \
992 echo $(srcdir)/classpath/external/sax; \
995 ( cd $(srcdir)/classpath/external/relaxngDatatype; \
996 find org -name '*.java' -print | \
997 while read file; do \
998 echo "x-C" | sed -e 's/^.//'; \
999 echo $(srcdir)/classpath/external/relaxngDatatype; \
1002 ( cd $(srcdir)/classpath/external/w3c_dom; \
1003 find org -name '*.java' -print | \
1004 while read file; do \
1005 echo "x-C" | sed -e 's/^.//'; \
1006 echo $(srcdir)/classpath/external/w3c_dom; \
1009 ## Now the build tree.
1011 find gnu java -name '*.java' -print | \
1012 while read file; do \
1013 echo "x-C" | sed -e 's/^.//'; \
1018 ## Many of the above circumlocutions were because ZIP used to be a
1019 ## relative path to fastjar. It didn't seem worthwhile to change the
1020 ## code when we moved to an external jar.
1021 $(JAR) -cfM@ $$here/src.zip
1022 ## Override GNU Classpath sources with libgcj replacements.
1026 find gnu java -name '*.java' -print | \
1027 while read file; do \
1028 echo "x-C" | sed -e 's/^.//'; \
1033 $(JAR) -ufM@ $$here/src.zip
1035 ## We use a variable for this in case the user wants to override it.
1036 sourcesdir = $(jardir)
1038 install-src.zip: src.zip
1039 $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
1042 ## ################################################################
1045 ## Dependency tracking madness.
1048 ## This is an evil hack to work around an automake limitation. We
1049 ## need to ensure that all CNI headers are built, not just the ones
1050 ## used internally by libgcj. We can't make the .o files depend on
1051 ## nat_headers, because in that case we'll force a complete rebuild of
1052 ## the C++ code whenever any .java file is touched. So instead we
1053 ## have a dummy rule which is only used once, namely the first time a
1054 ## build is done. On subsequent builds, the dependency tracking for
1055 ## the .cc compilations will have picked up the .h files, and these
1056 ## will be built directly as needed.
1059 ## Note that we don't use a real dependency here, since we don't want
1060 ## to rebuild all the headers here when the header list changes. If
1061 ## we did rebuild here, then any addition of a .java file would cause
1062 ## a large number of recompilations.
1063 $(MAKE) create-headers
1064 @echo > headers.stamp
1066 headers_to_make = $(nat_headers)
1068 headers_to_make += $(xlib_nat_headers)
1071 create-headers: $(headers_to_make)
1073 .PHONY: create-headers
1075 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1076 $(libgij_la_OBJECTS): headers.stamp
1077 $(libjvm_la_OBJECTS): headers.stamp
1079 ## ################################################################
1082 ## This section is for make and multilib madness.
1085 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1086 # values defined in terms of make variables, as is the case for CC and
1087 # friends when we are called from the top level Makefile.
1089 "AR_FLAGS=$(AR_FLAGS)" \
1090 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1091 "CFLAGS=$(CFLAGS)" \
1092 "CXXFLAGS=$(CXXFLAGS)" \
1093 "CPPFLAGS=$(CPPFLAGS)" \
1094 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1095 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1096 "INSTALL=$(INSTALL)" \
1097 "INSTALL_DATA=$(INSTALL_DATA)" \
1098 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1099 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1100 "GCJFLAGS=$(GCJFLAGS)" \
1101 "LDFLAGS=$(LDFLAGS)" \
1102 "LIBCFLAGS=$(LIBCFLAGS)" \
1103 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1105 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1106 "PICFLAG=$(PICFLAG)" \
1107 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1109 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1110 "exec_prefix=$(exec_prefix)" \
1111 "infodir=$(infodir)" \
1112 "libdir=$(libdir)" \
1113 "mandir=$(mandir)" \
1114 "prefix=$(prefix)" \
1115 "gxx_include_dir=$(gxx_include_dir)" \
1119 "LIBCFLAGS=$(LIBCFLAGS)" \
1121 "PICFLAG=$(PICFLAG)" \
1122 "RANLIB=$(RANLIB)" \
1123 "DESTDIR=$(DESTDIR)" \
1126 # Subdir rules rely on $(FLAGS_TO_PASS)
1127 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1129 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1133 # No install-html or install-pdf support in automake yet
1134 .PHONY: install-html install-pdf
1138 # Multilib support variables.
1147 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1148 maintainer-clean-multi
1150 all-recursive: all-multi
1151 install-recursive: install-multi
1152 mostlyclean-recursive: mostlyclean-multi
1153 clean-recursive: clean-multi
1154 distclean-recursive: distclean-multi
1155 maintainer-clean-recursive: maintainer-clean-multi
1158 : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1160 $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1162 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1164 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1166 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1167 maintainer-clean-multi:
1168 $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean