24 lines
377 B
Makefile
24 lines
377 B
Makefile
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 $@
|