1 ## Input file for automake to generate the Makefile.in used by configure
3 # Setup the compiler to use the GNU Classpath library we just build
5 JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
8 JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
11 JCOMPILER = $(GCJX) -bootclasspath '' -sourcepath '' -classpath $(top_builddir)/lib:.
14 JCOMPILER = $(ECJ) -bootclasspath '$(top_builddir)/lib' -classpath .
16 error dunno how to setup the JCOMPILER and compile
22 # All our example java source files
23 EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java
25 # The example C source files
26 EXAMPLE_C_FILES = $(srcdir)/gnu/classpath/examples/*/*.c
28 # The zip files with classes we want to produce.
29 EXAMPLE_ZIP = examples.zip
31 # Extra objects that will not exist until configure-time
32 BUILT_SOURCES = $(EXAMPLE_ZIP)
34 # the png icons we use in some of the examples.
35 EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
37 # The example specific README files.
38 READMES = $(srcdir)/gnu/classpath/examples/CORBA/swing/README.html
40 # All the files we find "interesting"
41 ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_ICONS) $(READMES)
43 # Some architecture independent data to be installed.
44 example_DATA = $(EXAMPLE_ZIP) README
46 # Where we want these data files installed.
47 exampledir = $(pkgdatadir)/examples
49 # Make sure all sources and icons are also installed so users can use them.
50 # (Be careful to strip off the srcdir part of the path when installing.)
52 srcdir_cnt=`echo $(srcdir) | wc -c`; \
53 for file in $(ALL_EXAMPLE_FILES); do \
54 f=`echo $$file | cut -c$$srcdir_cnt-`; \
56 if test ! -d $(DESTDIR)$(pkgdatadir)/examples/$$fdir; then \
57 echo "$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir"; \
58 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir; \
60 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
61 $(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/examples/$$f; \
63 echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)$(pkgdatadir)/examples/"
64 $(INSTALL_DATA) Makefile.jawt $(DESTDIR)$(pkgdatadir)/examples/
67 srcdir_cnt=`echo $(srcdir) | wc -c`; \
68 for file in $(ALL_EXAMPLE_FILES); do \
69 f=`echo $$file | cut -c$$srcdir_cnt-`; \
70 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
71 rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f; \
73 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.jawt"
74 rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.jawt
76 # Make sure everything is included in the distribution.
77 EXTRA_DIST = README Makefile.jawt.in
79 srcdir_cnt=`echo $(srcdir) | wc -c`; \
80 for file in $(ALL_EXAMPLE_FILES); do \
81 f=`echo $$file | cut -c$$srcdir_cnt-`; \
83 if test ! -d $(distdir)/$$fdir; then \
84 echo "$(makeinstalldirs) $(distdir)/$$fdir"; \
85 $(mkinstalldirs) $(distdir)/$$fdir; \
87 echo "cp -p $$file $(distdir)/$$f"; \
88 cp -p $$file $(distdir)/$$f; \
91 # To generate the example zip just depend on the sources and ignore the
92 # class files. Always regenerate all .class files and remove them immediatly.
93 # And copy the png icons we use to the classes dir so they get also included.
94 $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
95 mkdir -p classes/gnu/classpath/examples/icons
96 cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
97 $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
98 cd classes; $(ZIP) -r ../$(EXAMPLE_ZIP) .; cd ..
101 # Zip file be gone! (and make sure the classes are gone too)
103 rm -rf $(EXAMPLE_ZIP) classes