Fix a firmware building problem
[yari.git] / shared / shared.mk
blobb3567476b1a6579a9214857d81f15c3aa41aa813
1 # -----------------------------------------------------------------------
3 # Copyright 2010 Tommy Thorn - All Rights Reserved
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 # Bostom MA 02111-1307, USA; either version 2 of the License, or
9 # (at your option) any later version; incorporated herein by reference.
11 # -----------------------------------------------------------------------
13 MAKECONFIG=$(TOPDIR)/shared/tools/makeconfig.sh
14 FIRMWARE ?= tinymon.mips
16 all: rtl/config.h rtl/icache_ram0.mif
18 rtl/config.h: $(MAKECONFIG) default.conf
19 cd rtl; ../$(MAKECONFIG) ../default.conf
21 rtl/icache_ram0.mif: tinymon.mips yarisim
22 cd rtl; ../$(TOPDIR)/shared/yarisim/sim \
23 --mif \
24 --icache-way=$(IC_LINE_INDEX_BITS) \
25 --icache-words=$(IC_WORD_INDEX_BITS) \
26 --dcache-way=$(DC_LINE_INDEX_BITS) \
27 --dcache-words=$(DC_WORD_INDEX_BITS) \
28 ../$(FIRMWARE)
30 tinymon.mips-o: $(TOPDIR)/shared/firmware/tinymon.c
31 mips-elf-gcc -D_mips_ -msoft-float -c -Os $< -o $@
33 tinymon.mips: tinymon.mips-o
34 mips-elf-ld -T$(TOPDIR)/shared/firmware/prom.ld $< -o $@
36 yarisim:
37 make -C $(TOPDIR)/shared/yarisim