1 ## Input file for automake to generate the Makefile.in used by configure
2 GLIBJ_CLASSPATH='$(top_builddir)/lib':'$(top_builddir)/lib/glibj.zip':'$(top_builddir)/tools/tools.zip'
4 # Setup the compiler to use the GNU Classpath library we just build
6 #JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
9 #JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
12 JCOMPILER = $(GCJX) -encoding UTF-8 -bootclasspath '' -sourcepath '' -classpath $(GLIBJ_CLASSPATH):.
15 JCOMPILER = $(ECJ) -1.5 -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 & header files
27 EXAMPLE_C_FILES = $(srcdir)/gnu/classpath/examples/*/*.c
28 EXAMPLE_CH_FILES = $(srcdir)/gnu/classpath/examples/*/*.h
30 # The zip files with classes we want to produce.
31 EXAMPLE_ZIP = examples.zip
33 # Extra objects that will not exist until configure-time
34 BUILT_SOURCES = $(EXAMPLE_ZIP)
36 # the png icons we use in some of the examples.
37 EXAMPLE_ICONS = $(srcdir)/gnu/classpath/examples/icons/*.png
39 # the html pages we use in the swing demo example.
40 EXAMPLE_HTML = $(srcdir)/gnu/classpath/examples/swing/*.html
42 # The example specific README files.
43 READMES = $(srcdir)/gnu/classpath/examples/CORBA/swing/README.html
45 # All the files we find "interesting"
46 ALL_EXAMPLE_FILES = $(EXAMPLE_JAVA_FILES) $(EXAMPLE_C_FILES) $(EXAMPLE_CH_FILES) $(EXAMPLE_ICONS) $(EXAMPLE_HTML) $(READMES)
48 # Some architecture independent data to be installed.
49 example_DATA = $(EXAMPLE_ZIP) README
51 # Where we want these data files installed.
52 exampledir = $(pkgdatadir)/examples
54 # Make sure all sources and icons are also installed so users can use them.
55 # (Be careful to strip off the srcdir part of the path when installing.)
57 srcdir_cnt=`echo $(srcdir) | wc -c`; \
58 for file in $(ALL_EXAMPLE_FILES); do \
59 f=`echo $$file | cut -c$$srcdir_cnt-`; \
61 if test ! -d $(DESTDIR)$(pkgdatadir)/examples/$$fdir; then \
62 echo "$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir"; \
63 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir; \
65 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
66 $(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/examples/$$f; \
68 echo "$(INSTALL_DATA) Makefile.jawt $(DESTDIR)$(pkgdatadir)/examples/"
69 echo "$(INSTALL_DATA) Makefile.java2d $(DESTDIR)$(pkgdatadir)/examples/"
70 $(INSTALL_DATA) Makefile.jawt $(DESTDIR)$(pkgdatadir)/examples/
71 $(INSTALL_DATA) Makefile.java2d $(DESTDIR)$(pkgdatadir)/examples/
74 srcdir_cnt=`echo $(srcdir) | wc -c`; \
75 for file in $(ALL_EXAMPLE_FILES); do \
76 f=`echo $$file | cut -c$$srcdir_cnt-`; \
77 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
78 rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f; \
80 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.jawt"
81 echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.java2d"
82 rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.jawt
83 rm -f $(DESTDIR)$(pkgdatadir)/examples/Makefile.java2d
85 # Make sure everything is included in the distribution.
86 EXTRA_DIST = README Makefile.jawt.in Makefile.java2d.in
88 srcdir_cnt=`echo $(srcdir) | wc -c`; \
89 for file in $(ALL_EXAMPLE_FILES); do \
90 f=`echo $$file | cut -c$$srcdir_cnt-`; \
92 if test ! -d $(distdir)/$$fdir; then \
93 echo "$(makeinstalldirs) $(distdir)/$$fdir"; \
94 $(mkinstalldirs) $(distdir)/$$fdir; \
96 echo "cp -p $$file $(distdir)/$$f"; \
97 cp -p $$file $(distdir)/$$f; \
100 # To generate the example zip just depend on the sources and ignore the
101 # class files. Always regenerate all .class files and remove them immediatly.
102 # And copy the png icons we use to the classes dir so they get also included.
103 $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES)
104 mkdir -p classes/gnu/classpath/examples/icons
105 cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons
106 mkdir -p classes/gnu/classpath/examples/swing
107 cp $(EXAMPLE_HTML) classes/gnu/classpath/examples/swing
108 $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES)
110 if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \
111 if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(EXAMPLE_ZIP) .; fi; \
115 # Zip file be gone! (and make sure the classes are gone too)
117 rm -rf $(EXAMPLE_ZIP) classes