mips/test/Makefile

26 lines
477 B
Makefile
Raw Normal View History

BIN=../bin
2024-09-30 22:50:22 +00:00
ASM = $(shell find ./masm -type f -name "*.asm")
OBJ = $(patsubst ./masm/%.asm,./mld/%.o,$(ASM))
ELF = $(patsubst ./mld/%.o,./msim/%,$(OBJ))
TEST = $(patsubst ./msim/%,%,$(ELF))
.PHONY: build clean
build: $(TEST)
2024-09-30 19:11:02 +00:00
2024-09-30 22:50:22 +00:00
clean:
rm -fr ./mld
rm -fr ./msim
2024-09-30 22:50:22 +00:00
$(OBJ): ./mld/%.o : ./masm/%.asm
@mkdir -p $(@D)
$(BIN)/masm/masm -o $@ $<
2024-09-30 22:50:22 +00:00
$(ELF): ./msim/% : ./mld/%.o ../lib/runtime.asm
@mkdir -p $(@D)
$(BIN)/mld/mld -o $@ $<
2024-09-30 22:50:22 +00:00
$(TEST): % : ./msim/%
../tools/test.sh $@