riscv-utils/Makefile
2024-08-23 23:14:11 -07:00

25 lines
357 B
Makefile

TARGET ?= riscv64-linux-gnu
AS = $(TARGET)-as
LD = $(TARGET)-ld
.SUFFIXES:
.PHONY: all
all: true false cat env hexdump echo
%: %.o
$(LD) -o $@ $(filter %.o, $^)
%.o: %.s
$(AS) -o $@ $<
prtest: prtest.o lib/printregs.o lib/hex.o
sorttest: lib/sort.o
flagtest: lib/flags.o
crc32: lib/hex.o
.PHONY: test
test:
@BIN=. test/true.sh
@BIN=. test/echo.sh