OSDN Git Service

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