OpenCores
URL https://opencores.org/ocsvn/myblaze/myblaze/trunk

Subversion Repositories myblaze

[/] [myblaze/] [trunk/] [rtl/] [Makefile] - Rev 5

Go to most recent revision | Compare with Previous | Blame | View Log

# Makefile by rockee

SRCS=testbench.c
ELFFILE=rom
CC=mb-gcc

XILFLAGS=-mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul
CXXFLAGS=-g -ansi -pedantic -Wall
LNKFLAGS=-Wl,-defsym -Wl,_STACK_SIZE=0x400 -Wl,-defsym -Wl,_HEAP_SIZE=0x400
LIBFLAGS=
INCFLAGS=
SIZE=8192

cc:
        $(CC) $(XILFLAGS) $(CXXFLAGS) $(LNKFLAGS) $(LIBFLAGS) $(INCFLAGS) $(CCFLAGS) $(SRCS) -o $(ELFFILE).elf

ccx:
        mb-as test.asm -o $(ELFFILE).elf

listing: cc
        mb-objdump -DSCz $(ELFFILE).elf > $(ELFFILE).dump

bin: cc
        mb-objcopy -O binary $(ELFFILE).elf $(ELFFILE).bin

vhd: bin
        ../tools/bin2rom $(ELFFILE).bin $(ELFFILE).vhd 12

srec: cc
        mb-objcopy -O srec $(ELFFILE).elf $(ELFFILE).srec

mem: srec bin
        ../tools/bin2mem < $(ELFFILE).bin > $(ELFFILE).mem
        ../tools/bin2mem4 < $(ELFFILE).bin
        ../tools/srec2vram $(ELFFILE).srec 0 $(SIZE) > rom.vmem
        python top.py $(SIZE)

all: cc listing bin srec mem vhd

clean:
        rm -f *~ *.bak *.pyc $(ELFFILE).elf *.mem $(ELFFILE).dump $(ELFFILE).srec $(ELFFILE).vmem $(ELFFILE).mem $(ELFFILE).vhd $(ELFFILE).bin rom.vmem  $(ELFFILE).srec

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.