1 # This Makefile is used when building with gcj. It is separate from
2 # the ordinary Makefile as it does special GNU-make-specific things,
3 # and this avoids making other builds unnecessarily ugly.
5 # A .list file is made by split-for-gcj.sh.
6 # It lists all the files in a given package.
7 all_list_files := $(shell echo lists/*.list)
8 # The corresponding stamp files.
9 # Each .class file depends on its package's stamp file.
10 # Each stamp file depends on the corresponding list file.
11 # Each list file depends on the java files in its package.
12 # This way touching a single java source will cause the minimum
14 all_stamp_files := $(all_list_files:.list=.stamp)
15 # The dependency file generated by gcj.
16 all_deps_files := $(all_list_files:.list=.deps)
18 all: $(all_stamp_files)
20 # Ensure this is rebuilt whenever the list of classes changes.
21 # The list will always exist when this Makefile is used.
22 Makefile.deps: classes
23 $(SHELL) $(top_srcdir)/lib/split-for-gcj.sh
25 -include Makefile.deps $(all_deps_files)
27 ## Like GCJ but include some common flags.
28 GCJF = $(GCJ) -fsource=1.5 -ftarget=1.5 -g -Wno-deprecated --encoding=UTF-8 \
29 --bootclasspath '' --classpath $(compile_classpath) \
32 # Rule to rebuild a stamp file and update the deps file. Note that we
33 # make the target be the stamp file. This ensures that if a needed
34 # source is changed, this rule is re-run for the appropriate package.
36 $(GCJF) -MD -MF ${@:.stamp=.deps} -MT $@ -MP @$<