riscv-utils/Makefile

23 lines
303 B
Makefile
Raw Normal View History

2023-04-16 17:38:46 +00:00
TARGET ?= riscv64-linux-gnu
AS = $(TARGET)-as
LD = $(TARGET)-ld
.SUFFIXES:
2023-04-16 20:47:49 +00:00
.PHONY: all
2023-04-17 07:27:28 +00:00
all: true false cat env hexdump
2023-04-16 20:47:49 +00:00
#all: echo
2023-04-16 17:38:46 +00:00
%: %.o
2023-04-21 05:12:13 +00:00
$(LD) -o $@ $(filter %.o, $^)
2023-04-16 17:38:46 +00:00
%.o: %.s
$(AS) -o $@ $<
2023-04-16 18:15:00 +00:00
2023-04-21 05:12:13 +00:00
prtest: prtest.o lib/printregs.o lib/hex.o
2023-04-23 18:25:15 +00:00
sorttest: lib/sort.o
2023-04-21 05:12:13 +00:00
2023-04-16 18:15:00 +00:00
.PHONY: test
test:
@BIN=. test/true.sh