-# PHASE 1a: upstream code
-jpeg_c_sources := jdapimin.c jdapistd.c jcomapi.c jcparam.c jdmaster.c jdinput.c jdmainct.c jdcoefct.c jdpostct.c jdmarker.c
-jpeg_c_sources += jdhuff.c jdphuff.c jddctmgr.c jidctint.c jidctfst.c jidctflt.c jidctred.c jdsample.c jdcolor.c jdmerge.c
-jpeg_c_sources += jquant1.c jquant2.c jerror.c jutils.c jmemnobs.c jmemmgr.c
-jpeg_sources := $(jpeg_c_sources:%.c=upstream/jpeg-6b/src/%.c)
-$(jpeg_sources):
- make -sC upstream jpeg-6b/src
-
-freetype_sources := $(patsubst %,upstream/freetype-2.1.4/src/src/base/%,ftsystem.c ftmm.c ftbbox.c ftinit.c ftdebug.c ftbase.c ftglyph.c)
-freetype_sources += $(patsubst %,upstream/freetype-2.1.4/src/src/%,smooth/smooth.c autohint/autohint.c sfnt/sfnt.c truetype/truetype.c)
-$(freetype_sources):
- make -sC upstream freetype-2.1.4/.installed
-
-upstream/.jikes:
- make -sC upstream .jikes
-
-$(gcc_path)/bin/$(target)-gcj:
- make -sC upstream gcc-3.3-$(target)
-
-
-# PHASE 1b: human-written inputs
-handwritten_java_sources := $(shell find src -name \*.java)
-handwritten_java_pp_sources := $(shell find src -name \*.java.pp)
-handwritten_mips_sources := $(shell find src -name \*.mips.c)
-handwritten_cc_sources := src/org/xwt/plat/$(platform).cc
-handwritten_c_sources := $(jpeg_sources)
-handwritten_xwar_sources := $(shell ls src/org/xwt/builtin/*.png src/org/xwt/builtin/*.xwt src/org/xwt/builtin/*.xwf)
-
-
-# PHASE 2: ready-to-compile java files (either symlinked to phase 1a sources or else generated from them)
-java_sources := $(handwritten_java_sources:src/%.java=build/java/%.java)
-java_sources += $(handwritten_java_pp_sources:src/%.java.pp=build/java/%.java)
-java_sources += $(handwritten_mips_sources:src/%.mips.c=build/java/%.java)
-java_sources += build/java/org/xwt/Builtin.java
-#java_sources += build/java/org/xwt/imp/Freetype.java
-$(handwritten_java_sources:src/%.java=build/java/%.java): build/java/%.java: src/%.java
- @echo "symlinking: $@"
- @mkdir -p `dirname $@`; \
- cd `dirname $@`; \
- A=`echo $@ | sed 's_[^/]*/_../_g'`; \
- B=`dirname $$A`; \
- C=$$B/$<; \
- ln -s $$C
-
-
-# PHASE 3: class files
-class_files := $(java_sources:build/java/%.java=build/class/%.class)
-$(class_files): build/class/%.class: build/java/%.java upstream/.jikes
- @echo "compiling .java -> .class: $<"
- @mkdir -p build/class
- @upstream/.jikes $<