ONGOING: Test programs

This commit is contained in:
François Autin
2023-02-08 15:01:41 +00:00
parent 54a20296f9
commit fe930e4a0d
15 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1,24 @@
include $(TOPDIR)/Makefile.config
COVERAGE = $(TOPDIR)/riscv_instructions
AS = $(RISCV_AS) -c
GCC = $(RISCV_GCC)
LD = $(RISCV_LD)
INCPATH += -I$(TOPDIR) -I$(COVERAGE)
ASFLAGS = $(RISCV_ASFLAGS) $(INCPATH)
CFLAGS = $(RISCV_CFLAGS) $(INCPATH)
# Rules
%.a:
$(AR) rcv $@ $^
%.o: %.c
$(GCC) $(CFLAGS) -c $<
%.o: %.s
$(AS) $(ASFLAGS) -c $<
$(PROGRAMS):
$(LD) $+ -o $@