> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.1.71 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan 5 14:18:41 UTC 2024 x86_64 GNU/Linux 17:17:22 up 2 days 6:12, 2 users, load average: 0.13, 0.40, 0.60
This commit is contained in:
parent
1cd32d4968
commit
dfada8101b
1 changed files with 6 additions and 5 deletions
|
@ -63,10 +63,11 @@ endif
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
include $(NEMU_HOME)/tests/Makefile
|
include $(NEMU_HOME)/tests/Makefile
|
||||||
all-tests: TEST_OBJS = $(filter-out $(OBJ_DIR)/src/nemu-main.o, $(OBJS))
|
TEST_NAMES = $(notdir $(basename $(TEST_SRCS)))
|
||||||
all-tests: CFLAGS += $(shell pkg-config --cflags check)
|
$(TEST_NAMES):: TEST_OBJS = $(filter-out $(OBJ_DIR)/src/nemu-main.o, $(OBJS))
|
||||||
all-tests: LDFLAGS += $(shell pkg-config --libs check)
|
$(TEST_NAMES):: CFLAGS += $(shell pkg-config --cflags check)
|
||||||
all-tests: $(TEST_SRCS:%.c=$(OBJ_DIR)/%)
|
$(TEST_NAMES):: LDFLAGS += $(shell pkg-config --libs check)
|
||||||
|
$(TEST_NAMES):: $(OBJ_DIR)/tests/%
|
||||||
|
|
||||||
test: all-tests
|
test: $(addprefix $(OBJ_DIR)/tests/, $(TEST_NAMES))
|
||||||
@$(OBJ_DIR)/tests/expr_test
|
@$(OBJ_DIR)/tests/expr_test
|
||||||
|
|
Loading…
Reference in a new issue