From abb030f663f986ad1055f6d68ea484e83cd85ef5 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Wed, 14 Oct 2009 22:02:57 +0000 Subject: [PATCH] added endian switch for convenient endian switching Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@511 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/CPUs/MIPS/bsp/examples/bootloader/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/CPUs/MIPS/bsp/examples/bootloader/Makefile b/lib/CPUs/MIPS/bsp/examples/bootloader/Makefile index 7b04213..4344e93 100644 --- a/lib/CPUs/MIPS/bsp/examples/bootloader/Makefile +++ b/lib/CPUs/MIPS/bsp/examples/bootloader/Makefile @@ -1,7 +1,16 @@ -ENDIAN_FLAGS=-EB +ENDIAN='big' + +ifeq ($(ENDIAN), 'big') + ENDIAN_FLAGS=-EB + LIB_DIRS=-L $(MIPS_TOOLS_PREFIX)/mipsel-elf/lib/eb -L $(MIPS_TOOLS_PREFIX)/lib/gcc/mipsel-elf/$(MIPS_GCC_VER)/eb +else + ENDIAN_FLAGS=-EL + LIB_DIRS=-L $(MIPS_TOOLS_PREFIX)/mipsel-elf/lib -L $(MIPS_TOOLS_PREFIX)/lib/gcc/mipsel-elf/$(MIPS_GCC_VER) +endif + CFLAGS=$(ENDIAN_FLAGS) -Os -I. -I../ -msoft-float -march=r3000 LFLAGS=$(ENDIAN_FLAGS) -M -T bootloader.ld -LIB_DIRS=-L $(MIPS_TOOLS_PREFIX)/mipsel-elf/lib/eb -L $(MIPS_TOOLS_PREFIX)/lib/gcc/mipsel-elf/$(MIPS_GCC_VER)/eb + LIBS=-lc -lgcc CC=mipsel-elf-gcc