BurritOS/test_programs/Makefile.objdumps

24 lines
377 B
Makefile
Raw Normal View History

2023-02-08 16:01:41 +01:00
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 $@