mirror of
https://github.com/PiMaker/rvc.git
synced 2024-11-21 19:40:08 +00:00
64e2d0b45c
passes all RV32IM tests (run './test.sh all') instructions.txt is extracted from takahirox/riscv-rust
22 lines
506 B
Makefile
22 lines
506 B
Makefile
TARGET ?= rvc
|
|
SRC_DIRS ?= ./src
|
|
|
|
CC=clang
|
|
|
|
SRCS := $(shell find $(SRC_DIRS) -name '*.cpp' -or -name '*.c' -or -name '*.s')
|
|
OBJS := $(addsuffix .o,$(basename $(SRCS)))
|
|
DEPS := $(OBJS:.o=.d)
|
|
|
|
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
|
|
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CC) $(LDFLAGS) -I./elfy/elfy.h $(OBJS) -o $@ $(LOADLIBES) $(LDLIBS) -L./elfy/target/debug/ -Wl,--no-as-needed -ldl -lpthread -lelfy
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) $(TARGET) $(OBJS) $(DEPS)
|
|
|
|
-include $(DEPS)
|
|
|