From 8b054a02b058ea26b0e018e631ca093bd14d3ff2 Mon Sep 17 00:00:00 2001 From: Tommy Thorn Date: Sun, 28 Nov 2010 20:44:55 -0800 Subject: [PATCH] TOOLS: Rename sim to yarisim --- shared/Makefile | 25 ++++++++++++------------- shared/shared.mk | 5 +++-- shared/yarisim/Makefile | 23 +++++++++++++---------- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/shared/Makefile b/shared/Makefile index 2f0127c..b53a4a5 100644 --- a/shared/Makefile +++ b/shared/Makefile @@ -1,16 +1,15 @@ -# Please change to match your preferences - +# XXX Needs a proper multi-level build system -export YARI_XTOOLS_TARGET=mips-elf -export YARI_XTOOLS_INSTALL_PREFIX=/home/$(USER)/tools -export YARI_XTOOLS_SUDO= #sudo -export YARI_XTOOLS_BUILDDIR=/tmp/build-tools/build +include config.mk -export PATH:=$(YARI_XTOOL_INSTALL_PREFIX)/bin:$(PATH) -export MAKE_OPTION=-j4 -# enable this if you install into a directory that you don't own +# export these variables for the BUILD-xxx scripts +export YARI_XTOOLS_TARGET +export PREFIX +export YARI_XTOOLS_SUDO +export YARI_XTOOLS_BUILDDIR +export PATH +export MAKE_OPTION -# XXX Needs a proper multi-level build system # No suffix or path!! TESTPROG=testall @@ -34,13 +33,13 @@ install-gdb: install-sdl: $(MAKE) -C SDL-1.2 install -install-binutils: $(YARI_XTOOLS_INSTALL_PREFIX)/bin/$(YARI_XTOOLS_TARGET)-as +install-binutils: $(PREFIX)/bin/$(YARI_XTOOLS_TARGET)-as cd tools; ./BUILD-binutils.sh -install-gcc: $(YARI_XTOOLS_INSTALL_PREFIX)/bin/$(YARI_XTOOLS_TARGET)-gcc +install-gcc: $(PREFIX)/bin/$(YARI_XTOOLS_TARGET)-gcc cd tools; ./BUILD-gcc.sh -install-newlib: $(YARI_XTOOLS_INSTALL_PREFIX)/$(YARI_XTOOLS_TARGET)/lib/yari.ld +install-newlib: $(PREFIX)/$(YARI_XTOOLS_TARGET)/lib/yari.ld cd tools; ./BUILD-newlib.sh install-yarisim: diff --git a/shared/shared.mk b/shared/shared.mk index b356747..ad1d6e0 100644 --- a/shared/shared.mk +++ b/shared/shared.mk @@ -11,6 +11,7 @@ # ----------------------------------------------------------------------- MAKECONFIG=$(TOPDIR)/shared/tools/makeconfig.sh +YARISIM ?= $(TOPDIR)/shared/yarisim/yarisim FIRMWARE ?= tinymon.mips all: rtl/config.h rtl/icache_ram0.mif @@ -18,8 +19,8 @@ all: rtl/config.h rtl/icache_ram0.mif rtl/config.h: $(MAKECONFIG) default.conf cd rtl; ../$(MAKECONFIG) ../default.conf -rtl/icache_ram0.mif: tinymon.mips yarisim - cd rtl; ../$(TOPDIR)/shared/yarisim/sim \ +rtl/icache_ram0.mif: tinymon.mips $(YARISIM) + cd rtl; ../$(YARISIM) \ --mif \ --icache-way=$(IC_LINE_INDEX_BITS) \ --icache-words=$(IC_WORD_INDEX_BITS) \ diff --git a/shared/yarisim/Makefile b/shared/yarisim/Makefile index 11e367d..712e014 100644 --- a/shared/yarisim/Makefile +++ b/shared/yarisim/Makefile @@ -1,15 +1,17 @@ -CFLAGS=-g -Wall -MD -O2 $(shell sdl-config --cflags) +include ../config.mk + +CFLAGS=-g -Wall -Werror -MD -O2 $(shell sdl-config --cflags) LDFLAGS=$(shell sdl-config --libs) TESTPROG=please-set-TESTPROG FLAGS= -all: sim +all: yarisim -install: sim - cp sim $(YARI_XTOOLS_INSTALL_PREFIX)/bin/yarisim +install: yarisim + cp yarisim $(PREFIX)/bin -run: sim - ./sim $(FLAGS) $(TESTPROG) $(FIRMWARE) +run: yarisim + yarisim $(FLAGS) $(TESTPROG) $(FIRMWARE) tests: tests.c mips-elf-gcc -O -msoft-float -Tmymips.ld $< -o $@ @@ -17,16 +19,17 @@ tests: tests.c tests.c: ../testcases/testgen > tests.c -all_: sim output - ./sim --simple output +all_: yarisim output + ./yarisim --simple output output: output.c Makefile mymips.ld mips-elf-gcc -msoft-float -Tmymips.ld output.c -o output -sim: sim.o support.o run_simple.o +yarisim: sim.o support.o run_simple.o + $(CC) $(LDFLAGS) $^ -o $@ clean: - -rm *.o *.d sim + -rm *.o *.d yarisim realclean: clean -rm *~ -- 2.11.4.GIT