Skip to content

Instantly share code, notes, and snippets.

@7shi
Created June 26, 2011 22:01
Show Gist options
  • Save 7shi/1048037 to your computer and use it in GitHub Desktop.
Save 7shi/1048037 to your computer and use it in GitHub Desktop.
クロスコンパイラを一気に作る
TARGET1 = alpha-elf arc-elf arm-elf avr-elf h8300-elf i386-elf m32r-elf \
m68k-elf pdp11-aout powerpc-elf sh-elf sparc-elf v850-elf xtensa-elf
TARGET2 = mips-elf mips64-elf
TARGET3 = hppa-linux ia64-elf x86_64-linux
TARGET4 = m6811-elf
TARGET5 = strongarm-elf xscale-elf
TARGETS = $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5)
BLDROOT = /build
GMAKE = make
GTAR = tar
BINUVER = 2.21.1
GCCVER = 4.6.1
GCCVER4 = 4.0.4
GCCVER5 = 4.2.4
all: $(TARGETS)
$(TARGET1):
if [ ! -f /usr/local/bin/$@-as ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/configure --target=$@; fi) && \
$(GMAKE) && $(GMAKE) install; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER)[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ../../gcc-$(GCCVER)/configure --target=$@; fi) && \
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib $(GMAKE) all-target-libgcc && \
rm -rf $(BLDROOT)/$@/dest && \
cd $(BLDROOT)/$@/binutils && $(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@/gcc && $(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc install-target-libgcc && \
(find $(BLDROOT)/$@/dest -name "*.exe" | xargs strip) && \
cd $(BLDROOT)/$@/dest && $(GTAR) cvJf $(BLDROOT)/gcc-$(GCCVER)[email protected] *; \
fi
$(TARGET2):
if [ ! -f /usr/local/bin/$@-as ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/configure --target=$@; fi) && \
$(GMAKE) && $(GMAKE) install; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER)[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ../../gcc-$(GCCVER)/configure --target=$@; fi) && \
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib $(GMAKE) all-gcc && \
rm -rf $(BLDROOT)/$@/dest && \
cd $(BLDROOT)/$@/binutils && $(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@/gcc && $(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc && \
tar xvJfm $(BLDROOT)/gcc-$(GCCVER)[email protected] -C $(BLDROOT)/$@/dest && \
(find $(BLDROOT)/$@/dest -name "*.exe" | xargs strip) && \
cd $(BLDROOT)/$@/dest && $(GTAR) cvJf $(BLDROOT)/gcc-$(GCCVER)[email protected] *; \
fi
$(TARGET3):
if [ ! -f /usr/local/bin/$@-as ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/configure --target=$@; fi) && \
$(GMAKE) && $(GMAKE) install; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER)[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ../../gcc-$(GCCVER)/configure --target=$@; fi) && \
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib $(GMAKE) all-gcc && \
rm -rf $(BLDROOT)/$@/dest && \
cd $(BLDROOT)/$@/binutils && $(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@/gcc && $(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc && \
(find $(BLDROOT)/$@/dest -name "*.exe" | xargs strip) && \
cd $(BLDROOT)/$@/dest && $(GTAR) cvJf $(BLDROOT)/gcc-$(GCCVER)[email protected] *; \
fi
$(TARGET4):
if [ ! -f /usr/local/bin/$@-as ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/configure --target=$@; fi) && \
$(GMAKE) && $(GMAKE) install; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER4)[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER4)/configure --target=$@; fi) && \
$(GMAKE) && \
rm -rf $(BLDROOT)/$@/dest && \
cd $(BLDROOT)/$@/binutils && $(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@/gcc && $(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
(find $(BLDROOT)/$@/dest -name "*.exe" | xargs strip) && \
cd $(BLDROOT)/$@/dest && $(GTAR) cvJf $(BLDROOT)/gcc-$(GCCVER4)[email protected] *; \
fi
$(TARGET5):
if [ ! -f /usr/local/bin/$@-as ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/configure --target=$@; fi) && \
$(GMAKE) && $(GMAKE) install; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER5)[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER5)/configure --target=$@; fi) && \
$(GMAKE) gcc && \
rm -rf $(BLDROOT)/$@/dest && \
cd $(BLDROOT)/$@/binutils && $(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@/gcc && $(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc && \
(find $(BLDROOT)/$@/dest -name "*.exe" | xargs strip) && \
cd $(BLDROOT)/$@/dest && $(GTAR) cvJf $(BLDROOT)/gcc-$(GCCVER5)[email protected] *; \
fi
clean:
for target in $(TARGETS); do \
rm -rf $(BLDROOT)/$$target $(BLDROOT)/gcc-$(GCCVER)-msys-cross-$$target.tar.xz /usr/local/bin/$$target-* /usr/local/$$target; \
done
TARGET46 = alpha-elf arc-elf arm-elf avr-elf bfin-elf cris-elf fr30-elf \
frv-elf h8300-elf i386-elf ia64-elf iq2000-elf m32c-elf \
m32r-elf m68k-elf mcore-elf microblaze-elf \
mips-elf mips64-elf mn10300-elf moxie-elf pdp11-aout \
powerpc-elf rx-elf score-elf sh-elf \
sparc-elf spu-elf v850-elf xstormy16-elf xtensa-elf \
crisv32-elf x86_64-elf mipstx39-elf sparc64-elf \
mmix-knuth-mmixware
TARGET46A = hppa-linux hppa64-linux s390-linux vax-netbsdelf x86_64-linux
TARGET46B = picochip
TARGET45 = crx-elf lm32-elf mep-elf
TARGET44 = i386-coff
TARGET42 = strongarm-elf xscale-elf
TARGET40 = m6811-elf
TARGETS = $(TARGET46) $(TARGET46A) $(TARGET46B) $(TARGET45) $(TARGET44) $(TARGET42) $(TARGET40)
BLDROOT = /build
GMAKE = gmake
GMFLAGS = -j2
GTAR = gtar
BINUVER = 2.21.1
GCCVER40 = 4.0.4
GCCVER42 = 4.2.4
GCCVER44 = 4.4.6
GCCVER45 = 4.5.3
GCCVER46 = 4.6.1
XHOST = i686-mingw32
PREFIX = /usr/local
CONFIGURE = configure --prefix=$(PREFIX) --target=$@ --disable-nls
MKFLAGS = CPPFLAGS=-I$(PREFIX)/include LDFLAGS=-L$(PREFIX)/lib
MKBINUTL1 = \
if [ ! -f $(PREFIX)/bin/$@-as ]; then \
mkdir -p $(BLDROOT)/$@/_binutils && \
cd $(BLDROOT)/$@/_binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/$(CONFIGURE); fi) && \
$(GMAKE) $(GMFLAGS) SHELL=/bin/sh && $(GMAKE) install && \
(strip $(PREFIX)/bin/$@-* $(PREFIX)/$@/bin/* || true) && \
cd $(BLDROOT)/$@ && rm -rf _binutils; \
fi
MKBINUTL2 = \
if [ ! -f $(BLDROOT)/$@/dest/bin/[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/$(CONFIGURE) --host=$(XHOST); fi) && \
$(GMAKE) $(GMFLAGS) SHELL=/bin/sh && \
rm -rf $(BLDROOT)/$@/dest && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@ && rm -rf binutils; \
fi
MKXZPKG = \
cd $(BLDROOT)/$@/dest && \
find . -name "*.exe" | xargs $(XHOST)-strip && \
rm -rf info lib/libiberty.a man share && \
$(GTAR) cvJf $(BLDROOT)/[email protected] * && \
cd $(BLDROOT) && rm -rf $@
all: $(TARGETS)
$(TARGET46):
$(MKBINUTL1)
if [ ! -f $(PREFIX)/bin/$@-gcc ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$(GCCVER46)/$(CONFIGURE) --enable-obsolete; fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-target-libgcc && \
$(GMAKE) install-strip-gcc install-lto-plugin install-target-libgcc && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER46)[email protected] ]; then \
$(MKBINUTL2) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER46)/$(CONFIGURE) --host=$(XHOST) --enable-obsolete; fi) && \
$(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin && \
cd $(PREFIX) && ($(GTAR) cvf - lib/gcc/$@/$(GCCVER46) | $(GTAR) xf - -C $(BLDROOT)/$@/dest) && \
gccver=$(GCCVER46) && $(MKXZPKG); \
fi
$(TARGET46A):
$(MKBINUTL1)
if [ ! -f $(PREFIX)/bin/$@-gcc ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$(GCCVER46)/$(CONFIGURE); fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc && \
$(GMAKE) install-strip-gcc install-lto-plugin && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER46)[email protected] ]; then \
$(MKBINUTL2) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER46)/$(CONFIGURE) --host=$(XHOST); fi) && \
$(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin && \
gccver=$(GCCVER46) && $(MKXZPKG); \
fi
$(TARGET46B):
if [ ! -f $(PREFIX)/bin/$@-gcc ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$(GCCVER46)/$(CONFIGURE); fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) install-strip-gcc install-lto-plugin && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER46)[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER46)/$(CONFIGURE) --host=$(XHOST); fi) && \
$(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin && \
gccver=$(GCCVER46) && $(MKXZPKG); \
fi
$(TARGET45):
$(MKBINUTL1)
if [ ! -f $(PREFIX)/lib/gcc/$@/$(GCCVER45)/libgcc.a ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$(GCCVER45)/$(CONFIGURE); fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-target-libgcc && \
$(GMAKE) install-gcc install-lto-plugin install-target-libgcc && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER45)[email protected] ]; then \
$(MKBINUTL2) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER45)/$(CONFIGURE) --host=$(XHOST); fi) && \
$(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc install-lto-plugin && \
cd $(PREFIX) && ($(GTAR) cvf - lib/gcc/$@/$(GCCVER45) | $(GTAR) xf - -C $(BLDROOT)/$@/dest) && \
gccver=$(GCCVER45) && $(MKXZPKG); \
fi
$(TARGET44):
$(MKBINUTL1)
if [ ! -f $(PREFIX)/lib/gcc/$@/$(GCCVER44)/libgcc.a ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$(GCCVER44)/$(CONFIGURE) --enable-obsolete; fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-target-libgcc && \
$(GMAKE) install-gcc install-target-libgcc && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER44)[email protected] ]; then \
$(MKBINUTL2) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER44)/$(CONFIGURE) --host=$(XHOST) --enable-obsolete; fi) && \
$(GMAKE) $(GMFLAGS) all-gcc && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc && \
cd $(PREFIX) && ($(GTAR) cvf - lib/gcc/$@/$(GCCVER44) | $(GTAR) xf - -C $(BLDROOT)/$@/dest) && \
gccver=$(GCCVER44) && $(MKXZPKG); \
fi
$(TARGET42):
$(MKBINUTL1)
if [ ! -f $(PREFIX)/lib/gcc/$@/$(GCCVER42)/libgcc.a ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER42)/$(CONFIGURE); fi) && \
$(GMAKE) $(GMFLAGS) all-gcc && \
$(GMAKE) install-gcc && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER42)[email protected] ]; then \
$(MKBINUTL2) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER42)/$(CONFIGURE) --host=$(XHOST) --build=i386-netbsdelf; fi) && \
$(GMAKE) $(GMFLAGS) all-gcc && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc && \
gccver=$(GCCVER42) && $(MKXZPKG); \
fi
$(TARGET40):
$(MKBINUTL1)
if [ ! -f $(PREFIX)/lib/gcc/$@/$(GCCVER40)/libgcc.a ]; then \
mkdir -p $(BLDROOT)/$@/_gcc && \
cd $(BLDROOT)/$@/_gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER40)/$(CONFIGURE); fi) && \
$(GMAKE) $(GMFLAGS) && \
$(GMAKE) install && \
cd $(BLDROOT)/$@ && rm -rf _gcc; \
fi
if [ ! -f $(BLDROOT)/gcc-$(GCCVER40)[email protected] ]; then \
$(MKBINUTL2) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$(GCCVER40)/$(CONFIGURE) --host=$(XHOST) --build=i386-netbsdelf; fi) && \
$(GMAKE) $(GMFLAGS) && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
gccver=$(GCCVER40) && $(MKXZPKG); \
fi
clean:
for target in $(TARGETS); do \
rm -rf $(BLDROOT)/$$target $(BLDROOT)/gcc-*-msys-cross-$$target.tar.xz $(PREFIX)/bin/$$target-* $(PREFIX)/$$target; \
done
TARGET46 = alpha-elf arc-elf arm-elf avr-elf bfin-elf cris-elf fr30-elf \
frv-elf h8300-elf i386-elf ia64-elf iq2000-elf m32c-elf \
m32r-elf m68k-elf mcore-elf microblaze-elf \
mips-elf mips64-elf mn10300-elf moxie-elf pdp11-aout \
powerpc-elf rx-elf score-elf sh-elf \
sparc-elf spu-elf v850-elf xstormy16-elf xtensa-elf \
crisv32-elf x86_64-elf mipstx39-elf sparc64-elf \
mmix-knuth-mmixware
TARGET46A = hppa-linux hppa64-linux s390-linux vax-netbsdelf x86_64-linux
TARGET46B = picochip
TARGET45 = crx-elf lm32-elf mep-elf
TARGET44 = i386-coff
TARGET42 = strongarm-elf xscale-elf
TARGET40 = m6811-elf
TARGETS = $(TARGET46) $(TARGET46A) $(TARGET46B) $(TARGET45) $(TARGET44) $(TARGET42) $(TARGET40)
BLDROOT = /build
GMAKE = make
GMFLAGS = -j2
GTAR = tar
BINUVER = 2.21.1
GCCVER40 = 4.0.4
GCCVER42 = 4.2.4
GCCVER44 = 4.4.6
GCCVER45 = 4.5.3
GCCVER46 = 4.6.1
PREFIX = /usr/local
STRIP = strip
CONFIGURE = configure --prefix=$(PREFIX) --target=$@ --disable-nls
MKFLAGS = CPPFLAGS=-I$(PREFIX)/include LDFLAGS=-L$(PREFIX)/lib
MKBINUTLS = \
if [ ! -f $(PREFIX)/bin/[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/binutils && \
cd $(BLDROOT)/$@/binutils && \
(if [ ! -f Makefile ]; then ../../binutils-$(BINUVER)/$(CONFIGURE); fi) && \
$(GMAKE) $(GMFLAGS) SHELL=/bin/sh && \
rm -rf $(BLDROOT)/$@/dest && \
$(GMAKE) install && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
cd $(BLDROOT)/$@ && rm -rf binutils; \
fi
MKXZPKG = \
cd $(BLDROOT)/$@/dest && \
find . -name "*.exe" | xargs $(STRIP) && \
rm -rf info lib/libiberty.a man share && \
$(GTAR) cvJf $(BLDROOT)/[email protected] * && \
cd $(BLDROOT) && rm -rf $@
all: $(TARGETS)
$(TARGET46):
gccver=$(GCCVER46) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
$(MKBINUTLS) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$$gccver/$(CONFIGURE) --enable-obsolete; fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin all-target-libgcc && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin install-target-libgcc && \
$(MKXZPKG); \
fi
$(TARGET46A):
gccver=$(GCCVER46) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
$(MKBINUTLS) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$$gccver/$(CONFIGURE); fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin && \
$(MKXZPKG); \
fi
$(TARGET46B):
gccver=$(GCCVER46) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$$gccver/$(CONFIGURE); fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin && \
$(MKXZPKG); \
fi
$(TARGET45):
gccver=$(GCCVER45) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
$(MKBINUTLS) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$$gccver/$(CONFIGURE); fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc all-lto-plugin all-target-libgcc && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-strip-gcc install-lto-plugin install-target-libgcc && \
$(MKXZPKG); \
fi
$(TARGET44):
gccver=$(GCCVER44) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
$(MKBINUTLS) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then $(MKFLAGS) ../../gcc-$$gccver/$(CONFIGURE) --enable-obsolete; fi) && \
$(MKFLAGS) $(GMAKE) $(GMFLAGS) all-gcc all-target-libgcc && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc install-target-libgcc && \
$(MKXZPKG); \
fi
$(TARGET42):
gccver=$(GCCVER42) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
$(MKBINUTLS) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$$gccver/$(CONFIGURE); fi) && \
$(GMAKE) $(GMFLAGS) all-gcc && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install-gcc && \
$(MKXZPKG); \
fi
$(TARGET40):
gccver=$(GCCVER40) && \
if [ ! -f $(BLDROOT)/[email protected] ]; then \
$(MKBINUTLS) && \
mkdir -p $(BLDROOT)/$@/gcc && \
cd $(BLDROOT)/$@/gcc && \
(if [ ! -f Makefile ]; then ../../gcc-$$gccver/$(CONFIGURE); fi) && \
$(GMAKE) $(GMFLAGS) && \
$(GMAKE) prefix=$(BLDROOT)/$@/dest install && \
$(MKXZPKG); \
fi
clean:
for target in $(TARGETS); do \
rm -rf $(BLDROOT)/$$target $(BLDROOT)/gcc-*-msys-cross-$$target.tar.xz $(PREFIX)/bin/$$target-* $(PREFIX)/$$target; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment