Merged gcj-eclipse branch to trunk.
[official-gcc.git] / libjava / Makefile.am
blob9f11234e04e5d4b37c2d3bec6efc809fa0f7cd45
1 ## Process this file with automake to produce Makefile.in.
3 AUTOMAKE_OPTIONS = foreign subdir-objects
5 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
7 # May be used by various substitution variables.
8 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
10 SUBDIRS = $(DIRLTDL) gcj include classpath
11 if TESTSUBDIR
12 SUBDIRS += testsuite
13 endif
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
18 # limitations.
19 # Parameters:
20 # $(1): variable containing entries to iterate over
21 # $(2): output file
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
41 if USE_LIBGCJ_BC
42 toolexeclib_LTLIBRARIES += libgcj_bc.la
43 endif
45 if XLIB_AWT
46 toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la
47 endif
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
55 if INSTALL_ECJ_JAR
56 jar_DATA += $(ECJ_BUILD_JAR)
57 endif
59 if JAVA_HOME_SET
60 JAVA_HOME_DIR = $(JAVA_HOME)
61 BOOT_CLASS_PATH_DIR = $(JAVA_HOME)/lib/rt.jar
62 else
63 JAVA_HOME_DIR = $(prefix)
64 BOOT_CLASS_PATH_DIR = $(jardir)/libgcj-$(gcc_version).jar
65 endif
67 ## Name of the default .db.
68 db_name = classmap.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.
73 if NATIVE
74 bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \
75         gappletviewer gjarsigner gkeytool gjar gjavah gnative2ascii \
76         gorbd grmid gserialver gtnameserv
78 ## It is convenient to actually build and install the default database
79 ## when gcj-dbtool is available.
80 dbexec_DATA = $(db_name)
81 endif
83 bin_SCRIPTS = addr2name.awk
85 if BUILD_ECJ1
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
90 endif
92 ## ################################################################
95 ## Compilers and compilation flags.
98 if BASH_JAR
99 bin_SCRIPTS += scripts/jar
100 endif
102 ## The compiler with whatever flags we want for both -c and -C
103 ## compiles.
104 GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
106 extra_ldflags_libjava = @extra_ldflags_libjava@
108 GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
109           $(LDFLAGS) -o $@
110 GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
111 GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
112 LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
113           $(LDFLAGS) $(extra_ldflags_libjava) -o $@
115 GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
117 WARNINGS = -Wextra -Wall
118 ## Some systems don't allow `$' in identifiers by default, so we force
119 ## it with -fdollars-in-identifiers.  -Wswitch-enum detects bugs in
120 ## the verifier implementation, and maybe other places.  We need
121 ## _GNU_SOURCE defined for some Linux builds.  It doesn't hurt to
122 ## always define it.  Some systems, including Linux, need
123 ## -D_FILE_OFFSET_BITS=64 to enable > 2GB file support.
124 AM_CXXFLAGS = \
125         -fno-rtti \
126         -fnon-call-exceptions \
127         $(THREADCXXFLAGS) \
128         -fdollars-in-identifiers \
129         -Wswitch-enum \
130         -D_FILE_OFFSET_BITS=64 \
131         @LIBGCJ_CXXFLAGS@ \
132         $(WARNINGS) \
133         -D_GNU_SOURCE \
134         -DPREFIX="\"$(prefix)\"" \
135         -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\"" \
136         -DJAVA_HOME="\"$(JAVA_HOME_DIR)\"" \
137         -DBOOT_CLASS_PATH="\"$(BOOT_CLASS_PATH_DIR)\"" \
138         -DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
139         -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
140         -DGCJ_VERSIONED_LIBDIR="\"$(dbexecdir)\"" \
141         -DPATH_SEPARATOR="\"$(CLASSPATH_SEPARATOR)\"" \
142         -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
143         -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\""
145 AM_GCJFLAGS = \
146         @LIBGCJ_JAVAFLAGS@ \
147         -fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
148         --encoding=UTF-8 \
149         -Wno-deprecated -fbootstrap-classes
151 AM_CFLAGS = @LIBGCJ_CFLAGS@
152 if USING_GCC
153 AM_CFLAGS += $(WARNINGS)
154 endif
156 ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
157 PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
159 JCFLAGS = -g
160 JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
162 LIBFFIINCS = @LIBFFIINCS@
164 AM_CPPFLAGS = -I$(top_srcdir) \
165         -Iinclude -I$(top_srcdir)/include \
166         -I$(top_srcdir)/classpath/include \
167         -Iclasspath/include \
168         -I$(top_srcdir)/classpath/native/fdlibm \
169         $(GCINCS) $(THREADINCS) $(INCLTDL) \
170         $(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
172 BOOTCLASSPATH = $(srcdir)/classpath/lib
174 ## ################################################################
177 ## How to build libgcj.a and libgcj.jar
180 libgij_la_SOURCES = gij.cc
181 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
182 ## See jv_convert_LDADD.
183 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
184 ## The mysterious backslash in the grep pattern is consumed by make.
185 libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
186         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
188 libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc stacktrace.cc \
189         link.cc defineclass.cc interpret.cc verify.cc \
190         $(nat_source_files)
192 if USING_BOEHMGC
193 libgcj_la_SOURCES += boehm.cc
194 endif
196 if USING_NOGC
197 libgcj_la_SOURCES += nogc.cc
198 endif
200 if USING_POSIX_PLATFORM
201 libgcj_la_SOURCES += posix.cc
202 endif
204 if USING_WIN32_PLATFORM
205 libgcj_la_SOURCES += win32.cc
206 endif
208 if USING_DARWIN_CRT
209 libgcj_la_SOURCES += darwin.cc
210 endif
212 if USING_POSIX_THREADS
213 libgcj_la_SOURCES += posix-threads.cc
214 endif
216 if USING_WIN32_THREADS
217 libgcj_la_SOURCES += win32-threads.cc
218 endif
220 if USING_NO_THREADS
221 libgcj_la_SOURCES += no-threads.cc
222 endif
224 ## Objects from C++ sources in subdirs.
225 nat_files = $(nat_source_files:.cc=.lo)
226 xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
228 # Include THREADLIBS here to ensure that the correct version of
229 # certain linuxthread functions get linked:
230 ## The mysterious backslash in the grep pattern is consumed by make.
231 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
232         $(LIBLTDL) $(SYS_ZLIBS) \
233         -version-info `grep -v '^\#' $(srcdir)/libtool-version`
234 libgcj_la_LIBADD = \
235         classpath/native/fdlibm/libfdlibm.la \
236         java/lang/Object.lo \
237         java/lang/Class.lo \
238         java/process-$(PLATFORM).lo \
239         $(all_packages_source_files:.list=.lo) \
240         $(bc_objects) \
241         $(propertyo_files) \
242         $(LIBMAGIC) $(LIBFFI) $(ZLIBS) $(GCLIBS)
243 libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
244         java/lang/Object.lo \
245         java/lang/Class.lo \
246         java/process-$(PLATFORM).lo \
247         $(all_packages_source_files:.list=.lo) \
248         $(LIBLTDL) $(libgcj_la_LIBADD)
249 libgcj_la_LINK = $(LIBLINK)
251 ## A hack to make sure the various gcj-related macros, like
252 ## LTGCJCOMPILE, are defined by automake.  This is never actually
253 ## compiled.
254 EXTRA_libgcj_la_SOURCES = java/lang/Object.java
256 libgcj_tools_la_SOURCES = classpath/tools/tools.zip
257 libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes  -fsource-filename=$(here)/classpath/tools/all-classes.lst
258 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
259  -version-info `grep -v '^\#' $(srcdir)/libtool-version`
260 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
261 libgcj_tools_la_LINK = $(LIBLINK)
263 ## libjvm.so
264 libjvm_la_SOURCES = jni-libjvm.cc
265 libjvm_la_DEPENDENCIES = libgcj.la libgcj.spec
266 ## See jv_convert_LDADD.
267 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
268 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC)
270 ## The .db file.  This rule is only used for native builds, so it is
271 ## safe to invoke gcj-dbtool.
272 $(db_name): gcj-dbtool$(EXEEXT)
273 ## In case it exists already.
274         @rm -f $(db_name)
275 ## We don't actually care if it fails -- if it does, just make an
276 ## empty file.  This is simpler than trying to discover when mmap is
277 ## not available.
278         ./gcj-dbtool -n $(db_name) || touch $(db_name)
280 lib_gnu_awt_xlib_la_SOURCES = $(xlib_nat_source_files)
281 lib_gnu_awt_xlib_la_LIBADD = gnu/awt/xlib.lo gnu/gcj/xlib.lo
282 lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
283         libgcj.la libgcj.spec \
284         $(lib_gnu_awt_xlib_la_LIBADD)
285 ## We require libstdc++-v3 to be in the same build tree.
286 lib_gnu_awt_xlib_la_CPPFLAGS = \
287         $(AM_CPPFLAGS) \
288         -I../libstdc++-v3/include \
289         -I../libstdc++-v3/include/$(target_noncanonical) \
290         -I$(srcdir)/../libstdc++-v3/libsupc++
291 ## The mysterious backslash in the grep pattern is consumed by make.
292 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
293         @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
294         -rpath $(toolexeclibdir) \
295         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
296 lib_gnu_awt_xlib_la_LINK = $(LIBLINK)
298 ## Support for libgcj_bc: dummy shared library.
300 ## This lets us have one soname in BC objects and another in C++ ABI objects.
301 libgcj_bc_la_SOURCES = libgcj_bc.c
302 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0
303 libgcj_bc_la_LIBADD = libgcj.la
304 libgcj_bc_la_DEPENDENCIES = libgcj.la
305 libgcj_bc_la_LINK = $(LIBLINK)
306 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.
307 ## USE_LIBGCJ_BC shouldn't be set on other targets.
308 libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \
309         -fPIC -nostdlib
311 ## This rule creates the libgcj_bc dummy library in the .libs directory, for use
312 ## when testing.
313 libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES)
314         $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \
315         $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \
316         rm .libs/libgcj_bc.so; \
317         mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \
318         $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
319         -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \
320         rm .libs/libgcj_bc.so.1; \
321         $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1
323 ## Note that property_files is defined in sources.am.
324 propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files)))
326 $(propertyo_files): %.lo: classpath/resource/%
327         $(mkinstalldirs) `dirname $@`; \
328         $(LTGCJCOMPILE) -o $@ -c $< -Wc,--resource,$(@:.lo=)
330 libgcj-$(gcc_version).jar: classpath/lib/compile-classes
331 ## Note that this now omits the property files.
332 ## It doesn't matter since we don't use the jar at runtime.
333         here=`pwd`; cd $(srcdir)/classpath/lib; $(JAR) -cfM \
334             $$here/libgcj-$(gcc_version).jar gnu java javax org sun
336 libgcj-tools-$(gcc_version).jar: classpath/tools/tools.zip
337         cp $< $@
339 CLEANFILES = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar
340 DISTCLEANFILES = native.dirs
342 mostlyclean-local:
343 ## Use libtool rm to remove each libtool object
344         find . -name '*.lo' -print | xargs $(LIBTOOL) rm -f
346 distclean-local:
347 ## Remove every .d file that was created.
348         find . -name '*.d' -print | xargs rm -f
350 # Just remove the objects from C++ sources, for testing the C++ compiler.
351 clean-nat:
352         rm -f $(nat_files) $(xlib_nat_files)
354 SUFFIXES = .class .java .h .properties .list
356 ## Pass the list of object files to libtool in a temporary file to
357 ## avoid tripping platform command line length limits.
358 lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
359         @echo Creating list of files to link...
360         @: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
361         $(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
362         -rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
364 ## ################################################################
366 ## Compiling a list of java sources to a single .o.
368 %.lo: %.list
369         $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(here)/classpath/lib/classes -MT $@ -MD -MP -MF $(basename $@).deps @$<
371 java/lang/Object.lo: classpath/lib/java/lang/Object.class
372         $(LTGCJCOMPILE) -c -o $@ -fsource-filename=$(srcdir)/$(basename $@).java $<
374 java/lang/Class.lo: classpath/lib/java/lang/Class.class
375         $(LTGCJCOMPILE) -c -o $@  -fsource-filename=$(srcdir)/$(basename $@).java $<
377 ## ################################################################
379 ## This pulls in a number of variable and target definitions.
380 include sources.am
382 ## ################################################################
385 ## How to build header files.
388 ## We have special rules for certain headers.
389 omitted_headers = java/lang/ClassLoader.h java/lang/Thread.h \
390         java/lang/String.h java/lang/reflect/Constructor.h \
391         java/lang/reflect/Field.h java/lang/reflect/Method.h \
392         java/lang/reflect/Proxy.h gnu/gcj/runtime/ExtensionClassLoader.h
394 generic_header_files = $(ordinary_header_files) $(xlib_nat_headers)
396 MYGCJH = gjavah
398 $(generic_header_files): gcjh.stamp
400 gcjh.stamp: classpath/lib/compile-classes
401 if JAVA_MAINTAINER_MODE
402         $(MYGCJH) --cni --all $(srcdir)/classpath/lib \
403             --cmdfile=$(srcdir)/headers.txt -d $(srcdir) --force
404 endif
405         echo > gcjh.stamp
407 inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
408         java/io/ObjectInputStream$$GetField.h \
409         java/nio/DirectByteBufferImpl$$ReadWrite.h \
410         java/nio/channels/Pipe$$SinkChannel.h \
411         java/nio/channels/Pipe$$SourceChannel.h \
412         java/lang/reflect/Proxy$$ProxyData.h \
413         java/lang/reflect/Proxy$$ProxyType.h \
414         gnu/java/net/PlainSocketImpl$$SocketInputStream.h \
415         gnu/java/net/PlainSocketImpl$$SocketOutputStream.h \
416         gnu/java/nio/PipeImpl$$SinkChannelImpl.h \
417         gnu/java/nio/PipeImpl$$SourceChannelImpl.h
419 nat_headers = $(ordinary_header_files) $(inner_nat_headers)
420 nat_headers_install = $(ordinary_header_files)
422 xlib_nat_headers = $(gnu_awt_xlib_header_files) $(gnu_gcj_xlib_header_files)
424 ## Headers we maintain by hand and which we want to install.
425 extra_headers = java/lang/Object.h java/lang/Class.h
427 $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h:
428         @:
430 install-exec-hook: install-toolexeclibLTLIBRARIES install-libexecsubPROGRAMS
431 ## Support for libgcj_bc: dummy shared library used only at link-time.
432 if USE_LIBGCJ_BC
433 ## Install libgcj_bc dummy lib in the target directory. We also need to delete
434 ## libtool's .la file, this prevents libtool resetting the lib again 
435 ## later.
436         @echo Installing dummy lib libgcj_bc.so.1.0.0; \
437         rm $(toolexeclibdir)/libgcj_bc.so; \
438         mv $(toolexeclibdir)/libgcj_bc.so.1.0.0 $(toolexeclibdir)/libgcj_bc.so; \
439         $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
440         -o $(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
441         rm $(toolexeclibdir)/libgcj_bc.so.1; \
442         $(LN_S) libgcj_bc.so.1.0.0 $(toolexeclibdir)/libgcj_bc.so.1; \
443         rm $(toolexeclibdir)/libgcj_bc.la;
444 endif
445 if BUILD_ECJ1
446 if NATIVE
447         mv $(DESTDIR)$(libexecsubdir)/ecjx$(EXEEXT) $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
448 else !NATIVE
449 ## Undo the prepending of the target prefix
450         mv $(DESTDIR)$(libexecsubdir)/$(target_noncanonical)-ecjx$(EXEEXT) $(DESTDIR)$(libexecsubdir)/ecj1$(host_exeext)
451 endif !NATIVE
452 endif BUILD_ECJ1
454 ## Install the headers.  It is fairly ugly that we have to do this by
455 ## hand.
456 install-data-local:
457         $(PRE_INSTALL)
458 ## Install the .pc file.
459         @pc_version=`echo $(GCJVERSION) | sed -e 's/[.][^.]*$$//'`; \
460         file="libgcj-$${pc_version}.pc"; \
461         $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir); \
462         echo "  $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file"; \
463         $(INSTALL_DATA) libgcj.pc $(DESTDIR)$(pkgconfigdir)/$$file
464 ## We use a GNU make trick here so that we don't go over the command
465 ## length limit of some shells.
466         @echo Creating list of headers to install...
467         @: $(call write_entries_to_file,$(nat_headers_install) $(extra_headers),tmp-ilist)
468         @cat tmp-ilist | while read f; do \
469           d="`echo $$f | sed -e 's,/[^/]*$$,,'`"; \
470           $(mkinstalldirs) $(DESTDIR)$(gxx_include_dir)/$$d; \
471           if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \
472           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f"; \
473           $(INSTALL_DATA) $$p $(DESTDIR)$(gxx_include_dir)/$$f; \
474         done
475         -@rm -f tmp-ilist
476 ## Install inner class headers.
477         $(INSTALL_DATA) $(srcdir)/'java/io/ObjectOutputStream$$PutField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
478         $(INSTALL_DATA) $(srcdir)/'java/io/ObjectInputStream$$GetField.h' $(DESTDIR)$(gxx_include_dir)/java/io/
479         $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SinkChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
480         $(INSTALL_DATA) $(srcdir)/'java/nio/channels/Pipe$$SourceChannel.h' $(DESTDIR)$(gxx_include_dir)/java/nio/channels/
481         $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyData.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
482         $(INSTALL_DATA) $(srcdir)/'java/lang/reflect/Proxy$$ProxyType.h' $(DESTDIR)$(gxx_include_dir)/java/lang/reflect/
483         $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketInputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
484         $(INSTALL_DATA) $(srcdir)/'gnu/java/net/PlainSocketImpl$$SocketOutputStream.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/net/
485         $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SinkChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
486         $(INSTALL_DATA) $(srcdir)/'gnu/java/nio/PipeImpl$$SourceChannelImpl.h' $(DESTDIR)$(gxx_include_dir)/gnu/java/nio/
487 ## Don't install java/nio/DirectByteBufferImpl$$ReadWrite.h here. It's for internal use only.
490 ## ################################################################
493 ## Additional `check' targets for maintainer convenience.
496 ## This is used for maintainer-check.  FIXME: should set from
497 ## configure using AC_CHECK_TOOL.
498 NM = nm
500 ## Try to make sure our library doesn't stomp the namespace.
501 maintainer-check: libgcj.la
502         $(NM) .libs/libgcj.a | grep ' T ' \
503 ## Anything with `4java' is assumed to be from .java source.
504           | grep -v '4java' \
505 ## Anything with Jv is ok.
506           | grep -v 'Jv' \
507 ## `terminate' and `unexpected' are part of the runtime.
508           | grep -v 'terminate__Fv' | grep -v 'unexpected__Fv'
510 ## This rule can be used to see if the headers are more or less
511 ## correct.
512 header-check: libgcj-$(gcc_version).jar $(nat_headers)
513         rm -f htest.cc; \
514         for h in $(nat_headers); do \
515           echo "#include \"$$h\"" >> htest.cc; \
516         done; \
517         $(CXXCOMPILE) -fsyntax-only htest.cc
519 ## This rule can be used to see if all the .class files verify
520 ## correctly.
521 class-check: libgcj-$(gcc_version).jar
522         @ok=0; find . -name '*.class' -print | fgrep -v testsuite | \
523         while read f; do \
524           echo "$(GCJ_WITH_FLAGS) --syntax-only $$f"; \
525           if $(GCJ_WITH_FLAGS) --syntax-only $$f; then \
526           :; else ok=1; fi; \
527         done; exit $$ok
529 ## This rule checks whether write_entries_to_file works properly.
530 write-entries-to-file-check:
531         @echo Creating list of files to link...
532         @: $(call write_entries_to_file,$(libgcj_la_OBJECTS) $(libgcj_la_LIBADD),libgcj.objectlist)
534 ## ################################################################
537 ## The `jv-convert' program and code to rebuild the converter header
538 ## files.
541 ## it only makes sense to try to rebuild the JIS .h files on native
542 ## systems.
543 if NATIVE
544 if MAINTAINER_MODE
545 noinst_PROGRAMS = gen-from-JIS
547 gen_from_JIS_SOURCES = \
548         gnu/gcj/convert/gen-from-JIS.c \
549         gnu/gcj/convert/make-trie.c
551 gen_from_JIS_DEPENDENCIES = \
552         gnu/gcj/convert/JIS0201.h \
553         gnu/gcj/convert/JIS0208.h \
554         gnu/gcj/convert/JIS0212.h
556 $(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
557          ./gen-from-JIS JIS0208 >$(srcdir)/gnu/gcj/convert/JIS0208_to_Unicode.cc
559 $(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc: ./gen-from-JIS$(EXEEXT)
560          ./gen-from-JIS JIS0212 >$(srcdir)/gnu/gcj/convert/JIS0212_to_Unicode.cc
562 $(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc: ./gen-from-JIS$(EXEEXT)
563          ./gen-from-JIS toJIS >$(srcdir)/gnu/gcj/convert/Unicode_to_JIS.cc
565 # The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
566 # You can get it from
567 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
569 $(srcdir)/gnu/gcj/convert/JIS0201.h: # gnu/gcj/convert/JIS0201.TXT
570         echo '/* This file is automatically generated from Unicode tables */' > tmp-0201; \
571         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0201.TXT \
572         | sed -n -e 's|\(0x..\).*\(0x....\).*#\(.*\)$$|MAP(0x00, \1, \2)  /*\3 */|p' \
573         >> tmp-0201; \
574         mv tmp-0201 $(srcdir)/gnu/gcj/convert/JIS0201.h
576 # The Unicode consortium does not permit re-distributing the file JIS0208.TXT.
577 # You can get it from
578 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
580 $(srcdir)/gnu/gcj/convert/JIS0208.h: # gnu/gcj/convert/JIS0208.TXT
581         echo '/* This file is automatically generated from Unicode tables */' > tmp-0208; \
582         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0208.TXT \
583         | sed -n -e 's|\(0x....\).*0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\2, 0x\3, \4)  /*\5 */|p' \
584         >> tmp-0208; \
585         mv tmp-0208 $(srcdir)/gnu/gcj/convert/JIS0208.h
587 # The Unicode consortium does not permit re-distributing the file JIS0212.TXT.
588 # You can get it from
589 # ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/
591 $(srcdir)/gnu/gcj/convert/JIS0212.h: # gnu/gcj/convert/JIS0212.TXT
592         echo '/* This file is automatically generated from Unicode tables */' > tmp-0212; \
593         tr  -d '\r' <$(srcdir)/gnu/gcj/convert/JIS0212.TXT \
594         | sed -n -e 's|0x\(..\)\(..\).*\(0x....\).*#\(.*\)$$|MAP(0x\1, 0x\2, \3)  /*\4 */|p' \
595         >> tmp-0212; \
596         mv tmp-0212 $(srcdir)/gnu/gcj/convert/JIS0212.h
598 endif
599 endif 
602 jv_convert_SOURCES =
603 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
604 ## need this because we are explicitly using libtool to link using the
605 ## `.la' file.
606 jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
607         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
608 jv_convert_LINK = $(GCJLINK)
609 ## We don't explicitly link in the libraries we need; libgcj.la brings
610 ## in all dependencies.  We need the -L so that gcj can find libgcj
611 ## with `-lgcj', but it must come first, otherwise the -L flags
612 ## brought in from libgcj.la would cause the install directories to be
613 ## searched before the build-tree ones, and we'd get errors because of
614 ## different libraries with the same SONAME from picky linkers such as
615 ## Solaris'.  FIXME: should be _libs on some systems.
616 jv_convert_LDADD = -L$(here)/.libs libgcj.la
617 ## Depend on the spec file to make sure it is up to date before
618 ## linking this program.
619 jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
621 gcj_dbtool_SOURCES = \
622 gnu/gcj/tools/gcj_dbtool/natMain.cc
624 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
625 ## need this because we are explicitly using libtool to link using the
626 ## `.la' file.
627 gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
628         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
629 gcj_dbtool_LINK = $(GCJLINK)
630 ## We don't explicitly link in the libraries we need; libgcj.la brings
631 ## in all dependencies.  We need the -L so that gcj can find libgcj
632 ## with `-lgcj', but it must come first, otherwise the -L flags
633 ## brought in from libgcj.la would cause the install directories to be
634 ## searched before the build-tree ones, and we'd get errors because of
635 ## different libraries with the same SONAME from picky linkers such as
636 ## Solaris'.  FIXME: should be _libs on some systems.
637 gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbtool.lo -L$(here)/.libs libgcj.la
638 ## Depend on the spec file to make sure it is up to date before
639 ## linking this program.
640 gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
642 gij_SOURCES = 
643 ## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'.  We
644 ## need this because we are explicitly using libtool to link using the
645 ## `.la' file.
646 gij_LDFLAGS = -rpath $(libdir)/gcj-$(gcc_version) -rpath $(toolexeclibdir) \
647         -shared-libgcc $(THREADLDFLAGS)
648 gij_LINK = $(GCJLINK)
649 ## See jv_convert_LDADD.
650 gij_LDADD = -L$(here)/.libs libgij.la
651 ## Depend on the spec file to make sure it is up to date before
652 ## linking this program.
653 gij_DEPENDENCIES = libgij.la
655 ## Build an ecjx from a .jar.
656 ecjx_SOURCES =
657 ## We use the BC ABI here so that we don't need to compile ecj.jar.
658 ## Hopefully the user has compiled it into his system .db.
659 ## However, even if not it will run reasonably quickly.
661 ECJX_BASE_FLAGS = -findirect-dispatch \
662         --main=org.eclipse.jdt.internal.compiler.batch.GCCMain
664 if NATIVE
666 ecjx_LINK = $(GCJLINK)
668 if ENABLE_SHARED
669 ## Use ecj.jar at runtime.
670 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
671 else !ENABLE_SHARED
672 ## Use ecj.jar at compile time.
673 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
674 endif !ENABLE_SHARED
676 ecjx_LDADD = -L$(here)/.libs libgcj.la
677 ecjx_DEPENDENCIES = libgcj.la libgcj.spec
679 else !NATIVE
681 ecjx_LINK = $(GCJ_FOR_ECJX_LINK)
682 ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
683 ecjx_LDADD = 
684 ecjx_DEPENDENCIES = 
686 endif !NATIVE
688 ## This is a dummy definition.
689 gappletviewer_SOURCES =
690 gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
691         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
692 gappletviewer_LINK = $(GCJLINK)
693 ## See jv_convert_LDADD.
694 gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
695 gappletviewer_DEPENDENCIES = libgcj-tools.la
697 ## This is a dummy definition.
698 gjarsigner_SOURCES =
699 gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
700         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
701 gjarsigner_LINK = $(GCJLINK)
702 ## See jv_convert_LDADD.
703 gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
704 gjarsigner_DEPENDENCIES = libgcj-tools.la
706 ## This is a dummy definition.
707 gkeytool_SOURCES =
708 gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
709         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
710 gkeytool_LINK = $(GCJLINK)
711 ## See jv_convert_LDADD.
712 gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
713 gkeytool_DEPENDENCIES = libgcj-tools.la
715 ## This is a dummy definition.
716 gjar_SOURCES =
717 gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
718         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
719 gjar_LINK = $(GCJLINK)
720 ## See jv_convert_LDADD.
721 gjar_LDADD = -L$(here)/.libs libgcj-tools.la
722 gjar_DEPENDENCIES = libgcj-tools.la
724 ## This is a dummy definition.
725 gjavah_SOURCES =
726 gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
727         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
728 gjavah_LINK = $(GCJLINK)
729 ## See jv_convert_LDADD.
730 gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
731 gjavah_DEPENDENCIES = libgcj-tools.la
733 ## This is a dummy definition.
734 gnative2ascii_SOURCES =
735 gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
736         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
737 gnative2ascii_LINK = $(GCJLINK)
738 ## See jv_convert_LDADD.
739 gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
740 gnative2ascii_DEPENDENCIES = libgcj-tools.la
742 ## This is a dummy definition.
743 gorbd_SOURCES =
744 gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
745         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
746 gorbd_LINK = $(GCJLINK)
747 ## See jv_convert_LDADD.
748 gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
749 gorbd_DEPENDENCIES = libgcj-tools.la
751 ## This is a dummy definition.
752 grmid_SOURCES =
753 grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
754         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
755 grmid_LINK = $(GCJLINK)
756 ## See jv_convert_LDADD.
757 grmid_LDADD = -L$(here)/.libs libgcj-tools.la
758 grmid_DEPENDENCIES = libgcj-tools.la
760 ## This is a dummy definition.
761 gserialver_SOURCES =
762 gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
763         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
764 gserialver_LINK = $(GCJLINK)
765 ## See jv_convert_LDADD.
766 gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
767 gserialver_DEPENDENCIES = libgcj-tools.la
769 ## This is a dummy definition.
770 gtnameserv_SOURCES =
771 gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
772         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
773 gtnameserv_LINK = $(GCJLINK)
774 ## See jv_convert_LDADD.
775 gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
776 gtnameserv_DEPENDENCIES = libgcj-tools.la
778 ## This is a dummy definition.
779 grmic_SOURCES =
780 grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
781         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
782 grmic_LINK = $(GCJLINK)
783 ## See jv_convert_LDADD.
784 grmic_LDADD = -L$(here)/.libs libgcj-tools.la
785 grmic_DEPENDENCIES = libgcj-tools.la
787 ## This is a dummy definition.
788 grmiregistry_SOURCES =
789 grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
790         -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
791 grmiregistry_LINK = $(GCJLINK)
792 ## See jv_convert_LDADD.
793 grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
794 grmiregistry_DEPENDENCIES = libgcj-tools.la
796 ## ################################################################
798 ## This lists all the C++ source files in subdirectories.
799 nat_source_files = \
800 gnu/classpath/jdwp/natVMFrame.cc \
801 gnu/classpath/jdwp/natVMMethod.cc \
802 gnu/classpath/jdwp/natVMVirtualMachine.cc \
803 gnu/classpath/natConfiguration.cc \
804 gnu/classpath/natSystemProperties.cc \
805 gnu/classpath/natVMStackWalker.cc \
806 gnu/gcj/natCore.cc \
807 gnu/gcj/convert/JIS0208_to_Unicode.cc \
808 gnu/gcj/convert/JIS0212_to_Unicode.cc \
809 gnu/gcj/convert/Unicode_to_JIS.cc \
810 gnu/gcj/convert/natIconv.cc \
811 gnu/gcj/convert/natInput_EUCJIS.cc \
812 gnu/gcj/convert/natInput_SJIS.cc \
813 gnu/gcj/convert/natOutput_EUCJIS.cc \
814 gnu/gcj/convert/natOutput_SJIS.cc \
815 gnu/gcj/io/natSimpleSHSStream.cc \
816 gnu/gcj/io/shs.cc \
817 gnu/gcj/jvmti/natBreakpoint.cc \
818 gnu/gcj/runtime/natFinalizerThread.cc \
819 gnu/gcj/runtime/natSharedLibLoader.cc \
820 gnu/gcj/runtime/natSystemClassLoader.cc \
821 gnu/gcj/runtime/natStringBuffer.cc \
822 gnu/gcj/util/natDebug.cc \
823 gnu/java/lang/natMainThread.cc \
824 gnu/java/lang/management/natVMClassLoadingMXBeanImpl.cc \
825 gnu/java/lang/management/natVMCompilationMXBeanImpl.cc \
826 gnu/java/lang/management/natVMGarbageCollectorMXBeanImpl.cc \
827 gnu/java/lang/management/natVMMemoryMXBeanImpl.cc \
828 gnu/java/lang/management/natVMMemoryManagerMXBeanImpl.cc \
829 gnu/java/lang/management/natVMMemoryPoolMXBeanImpl.cc \
830 gnu/java/lang/management/natVMRuntimeMXBeanImpl.cc \
831 gnu/java/lang/management/natVMThreadMXBeanImpl.cc \
832 gnu/java/net/natPlainDatagramSocketImpl.cc \
833 gnu/java/net/natPlainSocketImpl.cc \
834 gnu/java/net/protocol/core/natCoreInputStream.cc \
835 gnu/java/nio/natPipeImpl.cc \
836 gnu/java/nio/natSelectorImpl.cc \
837 gnu/java/nio/natNIOServerSocket.cc \
838 gnu/java/nio/natVMChannel.cc \
839 gnu/java/nio/channels/natFileChannelImpl.cc \
840 java/io/natFile.cc \
841 java/io/natObjectInputStream.cc \
842 java/io/natVMObjectStreamClass.cc \
843 java/lang/management/natVMManagementFactory.cc \
844 java/lang/natCharacter.cc \
845 java/lang/natClass.cc \
846 java/lang/natClassLoader.cc \
847 java/lang/natConcreteProcess.cc \
848 java/lang/natDouble.cc \
849 java/lang/natFloat.cc \
850 java/lang/natMath.cc \
851 java/lang/natObject.cc \
852 java/lang/natRuntime.cc \
853 java/lang/natString.cc \
854 java/lang/natStringBuffer.cc \
855 java/lang/natStringBuilder.cc \
856 java/lang/natSystem.cc \
857 java/lang/natThread.cc \
858 java/lang/natThreadLocal.cc \
859 java/lang/natVMClassLoader.cc \
860 java/lang/natVMThrowable.cc \
861 java/lang/ref/natReference.cc \
862 java/lang/reflect/natArray.cc \
863 java/lang/reflect/natConstructor.cc \
864 java/lang/reflect/natField.cc \
865 java/lang/reflect/natMethod.cc \
866 java/lang/reflect/natVMProxy.cc \
867 java/net/natVMInetAddress.cc \
868 java/net/natVMNetworkInterface.cc \
869 java/net/natVMURLConnection.cc \
870 java/nio/channels/natVMChannels.cc \
871 java/nio/natDirectByteBufferImpl.cc \
872 java/security/natVMAccessController.cc \
873 java/security/natVMAccessControlState.cc \
874 java/text/natCollator.cc \
875 java/util/natVMTimeZone.cc \
876 java/util/concurrent/atomic/natAtomicLong.cc \
877 java/util/logging/natLogger.cc \
878 java/util/zip/natDeflater.cc \
879 java/util/zip/natInflater.cc \
880 sun/misc/natUnsafe.cc
882 xlib_nat_source_files = \
883 gnu/gcj/xlib/natClip.cc \
884 gnu/gcj/xlib/natColormap.cc \
885 gnu/gcj/xlib/natDisplay.cc \
886 gnu/gcj/xlib/natDrawable.cc \
887 gnu/gcj/xlib/natFont.cc \
888 gnu/gcj/xlib/natGC.cc \
889 gnu/gcj/xlib/natPixmap.cc \
890 gnu/gcj/xlib/natScreen.cc \
891 gnu/gcj/xlib/natVisual.cc \
892 gnu/gcj/xlib/natWMSizeHints.cc \
893 gnu/gcj/xlib/natWindow.cc \
894 gnu/gcj/xlib/natWindowAttributes.cc \
895 gnu/gcj/xlib/natXAnyEvent.cc \
896 gnu/gcj/xlib/natXButtonEvent.cc \
897 gnu/gcj/xlib/natXColor.cc \
898 gnu/gcj/xlib/natXConfigureEvent.cc \
899 gnu/gcj/xlib/natXException.cc \
900 gnu/gcj/xlib/natXExposeEvent.cc \
901 gnu/gcj/xlib/natXImage.cc \
902 gnu/gcj/xlib/natXUnmapEvent.cc
904 ## ################################################################
907 ## Creating and installing sources.zip
910 ## Create a zip holding all the sources.  This can be meaningfully
911 ## used in Eclipse.
912 src.zip:
913         -rm -f src.zip
914         here=`pwd`; \
915         ( \
916           ( cd $(srcdir)/classpath; \
917           find java gnu javax org sun -name '*.java' -print | \
918           while read file; do \
919 ## Ugly code to avoid "echo -C".  Must separate each entry by a newline
920 ## Gross but easy.
921             echo "x-C" | sed -e 's/^.//'; \
922             echo $(srcdir)/classpath; \
923             echo $$file; \
924           done ); \
925           ( cd $(srcdir)/classpath/external/sax; \
926           find org -name '*.java' -print | \
927           while read file; do \
928             echo "x-C" | sed -e 's/^.//'; \
929             echo $(srcdir)/classpath/external/sax; \
930             echo $$file; \
931           done ); \
932           ( cd $(srcdir)/classpath/external/relaxngDatatype; \
933           find org -name '*.java' -print | \
934           while read file; do \
935             echo "x-C" | sed -e 's/^.//'; \
936             echo $(srcdir)/classpath/external/relaxngDatatype; \
937             echo $$file; \
938           done ); \
939           ( cd $(srcdir)/classpath/external/w3c_dom; \
940           find org -name '*.java' -print | \
941           while read file; do \
942             echo "x-C" | sed -e 's/^.//'; \
943             echo $(srcdir)/classpath/external/w3c_dom; \
944             echo $$file; \
945           done ); \
946 ## Now the build tree.
947           ( cd classpath; \
948             find gnu java -name '*.java' -print | \
949             while read file; do \
950             echo "x-C" | sed -e 's/^.//'; \
951             echo `pwd`; \
952             echo $$file; \
953           done ); \
954         ) | \
955 ## Many of the above circumlocutions were because ZIP used to be a
956 ## relative path to fastjar.  It didn't seem worthwhile to change the
957 ## code when we moved to an external jar.
958         $(JAR) -cfM@ $$here/src.zip
959 ## Override GNU Classpath sources with libgcj replacements.
960         here=`pwd`; \
961         ( \
962           ( cd $(srcdir); \
963           find gnu java -name '*.java' -print | \
964           while read file; do \
965             echo "x-C" | sed -e 's/^.//'; \
966             echo $(srcdir); \
967             echo $$file; \
968           done ); \
969         ) | \
970         $(JAR) -ufM@ $$here/src.zip
972 ## We use a variable for this in case the user wants to override it.
973 sourcesdir = $(jardir)
975 install-src.zip: src.zip
976         $(INSTALL_DATA) src.zip $(DESTDIR)$(sourcesdir)/src-$(gcc_version).zip
979 ## ################################################################
982 ## Dependency tracking madness.
985 ## This is an evil hack to work around an automake limitation.  We
986 ## need to ensure that all CNI headers are built, not just the ones
987 ## used internally by libgcj. We can't make the .o files depend on
988 ## nat_headers, because in that case we'll force a complete rebuild of
989 ## the C++ code whenever any .java file is touched.  So instead we
990 ## have a dummy rule which is only used once, namely the first time a
991 ## build is done.  On subsequent builds, the dependency tracking for
992 ## the .cc compilations will have picked up the .h files, and these
993 ## will be built directly as needed.
995 headers.stamp:
996 ## Note that we don't use a real dependency here, since we don't want
997 ## to rebuild all the headers here when the header list changes.  If
998 ## we did rebuild here, then any addition of a .java file would cause
999 ## a large number of recompilations.
1000         $(MAKE) create-headers
1001         @echo > headers.stamp
1003 headers_to_make = $(nat_headers)
1004 if XLIB_AWT
1005 headers_to_make += $(xlib_nat_headers)
1006 endif
1008 create-headers: $(headers_to_make)
1010 .PHONY: create-headers
1012 $(libgcj_la_OBJECTS) $(gcj_dbtool_OBJECTS) $(xlib_nat_files): headers.stamp
1013 $(libgij_la_OBJECTS): headers.stamp
1014 $(libjvm_la_OBJECTS): headers.stamp
1016 ## ################################################################
1019 ## This section is for make and multilib madness.
1022 # Work around what appears to be a GNU make bug handling MAKEFLAGS
1023 # values defined in terms of make variables, as is the case for CC and
1024 # friends when we are called from the top level Makefile.
1025 AM_MAKEFLAGS = \
1026         "AR_FLAGS=$(AR_FLAGS)" \
1027         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
1028         "CFLAGS=$(CFLAGS)" \
1029         "CXXFLAGS=$(CXXFLAGS)" \
1030         "CPPFLAGS=$(CPPFLAGS)" \
1031         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
1032         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
1033         "INSTALL=$(INSTALL)" \
1034         "INSTALL_DATA=$(INSTALL_DATA)" \
1035         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
1036         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
1037         "GCJFLAGS=$(GCJFLAGS)" \
1038         "LDFLAGS=$(LDFLAGS)" \
1039         "LIBCFLAGS=$(LIBCFLAGS)" \
1040         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
1041         "MAKE=$(MAKE)" \
1042         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
1043         "PICFLAG=$(PICFLAG)" \
1044         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
1045         "SHELL=$(SHELL)" \
1046         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
1047         "exec_prefix=$(exec_prefix)" \
1048         "infodir=$(infodir)" \
1049         "libdir=$(libdir)" \
1050         "prefix=$(prefix)" \
1051         "gxx_include_dir=$(gxx_include_dir)" \
1052         "AR=$(AR)" \
1053         "AS=$(AS)" \
1054         "LD=$(LD)" \
1055         "LIBCFLAGS=$(LIBCFLAGS)" \
1056         "NM=$(NM)" \
1057         "PICFLAG=$(PICFLAG)" \
1058         "RANLIB=$(RANLIB)" \
1059         "DESTDIR=$(DESTDIR)" \
1060         "JAR=$(JAR)"
1062 # Subdir rules rely on $(FLAGS_TO_PASS)
1063 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
1065 CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
1067 MAKEOVERRIDES=
1069 # No install-html support yet.
1070 .PHONY: install-html
1071 install-html:
1073 # Multilib support variables.
1074 MULTISRCTOP =
1075 MULTIBUILDTOP =
1076 MULTIDIRS =
1077 MULTISUBDIR =
1078 MULTIDO = true
1079 MULTICLEAN = true
1081 # Multilib support.
1082 .PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
1083         maintainer-clean-multi
1085 all-recursive: all-multi
1086 install-recursive: install-multi
1087 mostlyclean-recursive: mostlyclean-multi
1088 clean-recursive: clean-multi
1089 distclean-recursive: distclean-multi
1090 maintainer-clean-recursive: maintainer-clean-multi
1092 all-multi:
1093         : $(MAKE) ; exec $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
1094 install-multi:
1095         $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
1096 mostlyclean-multi:
1097         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
1098 clean-multi:
1099         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
1100 distclean-multi:
1101         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
1102 maintainer-clean-multi:
1103         $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean