2 BINUTILS_TAR=binutils-$(BINUTILS_VER).tar.bz2
3 BINUTILS_URL="http://mirrors.kernel.org/gnu/binutils/$(BINUTILS_TAR)"
6 NEWLIB_TAR=newlib-$(NEWLIB_VER).tar.gz
7 NEWLIB_URL="ftp://sourceware.org/pub/newlib/$(NEWLIB_TAR)"
10 GCC_TAR=gcc-$(GCC_VER).tar.bz2
11 GCC_URL="http://mirrors.kernel.org/gnu/gcc/gcc-$(GCC_VER)/$(GCC_TAR)"
16 @if grep -q ' $(subst .,\.,$(1))$$' SHA256SUMS; then \
17 grep ' $(subst .,\.,$(1))$$' SHA256SUMS | sha256sum -c; \
19 echo "WARNING: no checksum defined for $(1)"; \
26 wget -P src $(BINUTILS_URL)
30 wget -P src $(NEWLIB_URL)
34 wget -P src $(GCC_URL)
37 src/binutils-$(BINUTILS_VER): src/$(BINUTILS_TAR)
40 src/newlib-$(NEWLIB_VER): src/$(NEWLIB_TAR)
43 src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER)
45 ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/newlib $@
46 ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/libgloss $@
48 binutils: src/binutils-$(BINUTILS_VER)
49 mkdir -p build/binutils
51 $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst; \
55 gcc: src/gcc-$(GCC_VER) binutils
58 $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst -enable-languages=c --without-pkgversion --with-newlib; \