OSDN Git Service

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