mirror of
https://github.com/rdolbeau/VexRiscvBPluginGenerator.git
synced 2025-04-18 18:44:42 -04:00
tests in Makefile
This commit is contained in:
parent
5a21dd7521
commit
f445689eea
1 changed files with 37 additions and 4 deletions
41
Makefile
41
Makefile
|
@ -2,12 +2,8 @@ SRCXX=gen_plugin.cpp unparse.cpp
|
|||
OBJXX=$(SRCXX:.cpp=.o)
|
||||
DEPXX=$(SRCXX:.cpp=.d)
|
||||
OBJ=inst_par.o inst_lex.o
|
||||
|
||||
|
||||
LEX=flex
|
||||
YACC=bison -d #--report-file=bison.log --report=all
|
||||
|
||||
|
||||
CXX=g++
|
||||
CXXFLAGS=-O2
|
||||
|
||||
|
@ -129,3 +125,40 @@ Z: CryptoZkg.scala CryptoZknd.scala CryptoZkne.scala CryptoZknh.scala CryptoZks.
|
|||
scala: B P Z
|
||||
|
||||
include $(DEPXX)
|
||||
|
||||
## B Toolchain so we get some automatic B generation
|
||||
R5B_TOOLCHAIN=/opt/riscv64b/
|
||||
R5B_GCC=$(R5B_TOOLCHAIN)/bin/riscv64-unknown-elf-gcc
|
||||
R5B_OPT=-Os -march=rv32imab -mabi=ilp32 -I.
|
||||
## Buildroot toolchain for linking and hacing up-to-date libraries and systems calls
|
||||
R5IMA_TOOLCHAIN=/home/dolbeau2/LITEX/buildroot-rv32/output/host
|
||||
R5IMA_GCC=$(R5IMA_TOOLCHAIN)/bin/riscv32-buildroot-linux-gnu-gcc
|
||||
R5IMA_OPT=-Os -march=rv32ima -mabi=ilp32 -I.
|
||||
|
||||
tests: test_b test_p
|
||||
|
||||
signal.o: signal.c
|
||||
$(R5IMA_GCC) $(R5IMA_OPT) -c $< -o $@
|
||||
|
||||
test_b.S: test_b.c
|
||||
$(R5B_GCC) $(R5B_OPT) -DCHECK_SIGILL -S $< -o $@
|
||||
|
||||
test_p.S: test_p.c
|
||||
$(R5B_GCC) $(R5B_OPT) -DCHECK_SIGILL -S $< -o $@
|
||||
|
||||
test_b.o: test_b.S
|
||||
$(R5B_GCC) $(R5B_OPT) -DCHECK_SIGILL -c $< -o $@
|
||||
|
||||
test_p.o: test_p.S
|
||||
$(R5B_GCC) $(R5B_OPT) -DCHECK_SIGILL -c $< -o $@
|
||||
|
||||
test_b: test_b.o signal.o
|
||||
$(R5IMA_GCC) $(R5IMA_OPT) $^ -o $@
|
||||
|
||||
test_p: test_p.o signal.o
|
||||
$(R5IMA_GCC) $(R5IMA_OPT) $^ -o $@
|
||||
|
||||
## avoid builtin rule for .o
|
||||
.SUFFIXES:
|
||||
SUFFIXES :=
|
||||
%.o:
|
||||
|
|
Loading…
Add table
Reference in a new issue