OSDN Git Service

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