From: brian Date: Fri, 30 Jan 2004 07:04:48 +0000 (+0000) Subject: 2003/09/06 22:24:41 X-Git-Tag: RC3~710 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=bc9dd4abbcef277698861a1666f9a747e51d5d2f 2003/09/06 22:24:41 darcs-hash:20040130070448-aa32f-5396d83e570ed36c7bef0f5b834f1c045a1b3e96.gz --- diff --git a/Makefile b/Makefile index 46ad4fc..91a39cc 100644 --- a/Makefile +++ b/Makefile @@ -49,10 +49,10 @@ 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 +#freetype_sources := $(patsubst %,upstream/freetype-2.1.4/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/%,smooth/smooth.c autohint/autohint.c sfnt/sfnt.c truetype/truetype.c) +upstream/.freetype-mips: + make -sC upstream .freetype-mips upstream/.jikes: make -sC upstream .jikes @@ -161,24 +161,31 @@ build/java/org/xwt/imp/Freetype.java:: build/mips/freetype.mips build/class/org/ @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/freetype.mips: $(freetype_mips_objects) - @echo "compiling .c -> .mips: $@" +$(gcc_path)/bin/mips-gcc: + @make -sC upstream gcc-3.3-mips target=mips + +build/mips/%.o: src/org/xwt/imp/%.c $(gcc_path)/bin/mips-gcc upstream/.freetype @mkdir -p build/mips - @make -sC upstream newlib-1.11.0/src newlib-1.11.0/build-mips/.installed gcc-3.3-mips freetype-2.1.4/src .headers target=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 \ - -mabi=32 \ - -mips1 \ - -msoft-float \ + -march=mips1 \ + -T src/org/xwt/imp/linker.ld \ + -Lbuild/mips \ + -Lupstream/freetype-2.1.4/objs \ -o $@ \ - -I upstream/freetype-2.1.4/src/include \ - $(freetype_sources) \ - -mno-crt0 \ - -Tnullmon.ld \ - -Wl,--warn-once \ - src/org/xwt/imp/Freetype.c \ - -Wl,-s - + build/mips/Freetype.o \ + -lfreetype ############################################################################## diff --git a/upstream/Makefile b/upstream/Makefile index c6e03cf..0c76cc3 100644 --- a/upstream/Makefile +++ b/upstream/Makefile @@ -92,3 +92,13 @@ $(packages:%=%/build-$(target)/.installed): %/build-$(target)/.installed: @cd $(patsubst %/build-$(target)/.installed,%,$@)/build-$(target); $(setcc) PATH=$$PATH:`pwd`/../../install/bin make install @touch $(patsubst %/build-$(target)/.installed,%,$@)/build-$(target)/.installed + +.freetype: + @echo -e "\ndownloading freetype..." + @curl $(url_freetype-2.1.4) | tar xzf - + @touch $@ + +.freetype-mips: .freetype + @cd freetype-2.1.4; make setup ansi; PATH=$$PATH:`pwd`/../install/bin make CC=mips-gcc AR=mips-ar + @PATH=$$PATH:`pwd`/../install/bin; mips-ranlib freetype-2.1.4/objs/libfreetype.a + @touch $@