-##############################################################################
-# Special treatment:
-#
-
-build/java/org/xwt/Builtin.java:: $(shell ls src/org/xwt/builtin/*.png src/org/xwt/builtin/*.xwt src/org/xwt/builtin/*.xwf)
- @mkdir -p `dirname $@` build build/java build/class build/h build
- @echo "zipping/uuencoding .xwt -> .java: build/java/org/xwt/Builtin.java"
- @echo "package org.xwt;" > build/java/org/xwt/Builtin.java
- @echo "class Builtin {" >> build/java/org/xwt/Builtin.java
- @echo "public static String encoded = " >> build/java/org/xwt/Builtin.java
- @cd src; $(jar) cf - $(<:src/%=%) | \
- uuencode foo | tail -n +2 | grep -v '^end$$' | grep -v '^`$$' | \
- sed 's_\(.+\)_"\1" +_' >> ../build/java/org/xwt/Builtin.java
- @echo "\"\"; }" >> build/java/org/xwt/Builtin.java
-
-build/java/org/xwt/imp/Freetype.java:: build/mips/freetype.mips build/class/org/xwt/imp/MIPS.class
- @echo "translating .mips -> .java: $@"
- @mkdir -p build/java/org/xwt/imp/
- @rm -f $@
- @java -cp build/class org.xwt.imp.MIPS org.xwt.imp.Freetype build/mips/freetype.mips > build/java/org/xwt/imp/Freetype.java
-
-build/mips/%.o: src/org/xwt/imp/%.c $(gcc_path)/bin/mips-gcc upstream/.freetype
- @mkdir -p build/mips
- @echo "compiling $< -> $@ (mips)"
- @$(gcc_path)/bin/mips-gcc \
- -march=mips1 \
- -I upstream/freetype-2.1.4/include \
- -c -o $@ $<
-
-build/mips/freetype.mips: $(gcc_path)/bin/mips-gcc build/mips/crt0.o build/mips/syscalls.o build/mips/Freetype.o upstream/.freetype-mips
- @echo "compiling .c -> .mips: $@"
- @mkdir -p build/mips
- @make -sC upstream newlib-1.11.0/src newlib-1.11.0/build-mips/.installed freetype-2.1.4/src target=mips
- $(gcc_path)/bin/mips-gcc \
- -nostdlib \
- --static \
- -march=mips1 \
- -T src/org/xwt/imp/linker.ld \
- -Lbuild/mips \
- -Lupstream/freetype-2.1.4/objs \
- -o $@ \
- build/mips/Freetype.o \
- -lfreetype
+$(target_bin): build/$(platform)/org/xwt/plat/$(platform).cc.o upstream/jpeg-6b/build-$(target)/libjpeg.a build/$(platform)/builtin.o build/$(platform)/$(platform).ar
+ @echo -e "\n\033[1mlinking .o -> $(target_bin)\033[0m"
+ mkdir -p build/$(platform)
+ PATH=upstream/install/bin:$$PATH $(gcj) -v --main=org.xwt.Main -o build/$(platform)/$(target_bin) -Lupstream/install/$(target)/lib build/$(platform)/org/xwt/plat/$(platform).java.o $^ $(link_flags)