1 ## Input file for automake to generate the Makefile.in used by configure
2 GLIBJ_CLASSPATH='$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip'
4 # Setup the compiler to use the GNU Classpath library we just build
6 JCOMPILER = $(GCJ) -encoding UTF-8 --bootclasspath $(GLIBJ_CLASSPATH) --classpath . -C
9 JCOMPILER = $(JIKES) $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(GLIBJ_CLASSPATH):.
12 JCOMPILER = $(GCJX) -encoding UTF-8 -bootclasspath '' -sourcepath '' -classpath $(GLIBJ_CLASSPATH):.
15 JCOMPILER = $(ECJ) -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath .
17 error dunno how to setup the JCOMPILER and compile
23 # All our example java source files
24 EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java
26 # The example C source files
27 EXAMPLE_C_FILES = $(srcdir)/gnu/classpath/examples/*/*.c
29 # The zip files with classes we want to produce.
30 EXAMPLE_ZIP = examples.zip
32 # Extra objects that will not exist until configure-time
33 BUILT_SOURCES = $(EXAMPLE_ZIP)
35 # the png icons we use in some of the examples.
36 EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
38 # The example specific README files.
39 READMES = $(srcdir)/gnu/classpath/examples/CORBA/swing/README.html
41 # All the files we find "interesting"
42 ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_ICONS) $(READMES)
44 # Some architecture independent data to be installed.
45 example_DATA = $(EXAMPLE_ZIP) README
47 # Where we want these data files installed.
48 exampledir = $(pkgdatadir)/examples
50 # Make sure all sources and icons are also installed so users can use them.
51 # (Be careful to strip off the srcdir part of the path when installing.)
53 srcdir_cnt=`echo $(srcdir) | wc -c`; \
54 for file in $(ALL_EXAMPLE_FILES); do \
55 f=`echo $$file | cut -c$$srcdir_cnt-`; \
57 if test ! -d $(DESTDIR)$(pkgdatadir)/examples/$$fdir; then \
58 echo "$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir"; \
59 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir; \
61 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
62 $(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/examples/$$f; \
64 echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)$(pkgdatadir)/examples/"
65 $(INSTALL_DATA) Makefile.jawt $(DESTDIR)$(pkgdatadir)/examples/
68 srcdir_cnt=`echo $(srcdir) | wc -c`; \
69 for file in $(ALL_EXAMPLE_FILES); do \
70 f=`echo $$file | cut -c$$srcdir_cnt-`; \
71 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
72 rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f; \
74 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.jawt"
75 rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.jawt
77 # Make sure everything is included in the distribution.
78 EXTRA_DIST = README Makefile.jawt.in
80 srcdir_cnt=`echo $(srcdir) | wc -c`; \
81 for file in $(ALL_EXAMPLE_FILES); do \
82 f=`echo $$file | cut -c$$srcdir_cnt-`; \
84 if test ! -d $(distdir)/$$fdir; then \
85 echo "$(makeinstalldirs) $(distdir)/$$fdir"; \
86 $(mkinstalldirs) $(distdir)/$$fdir; \
88 echo "cp -p $$file $(distdir)/$$f"; \
89 cp -p $$file $(distdir)/$$f; \
92 # To generate the example zip just depend on the sources and ignore the
93 # class files. Always regenerate all .class files and remove them immediatly.
94 # And copy the png icons we use to the classes dir so they get also included.
95 $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
96 mkdir -p classes/gnu/classpath/examples/icons
97 cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
98 $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
100 if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \
101 if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(EXAMPLE_ZIP) .; fi; \
105 # Zip file be gone! (and make sure the classes are gone too)
107 rm -rf $(EXAMPLE_ZIP) classes