> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.18 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 23 08:25:28 UTC 2024 x86_64 GNU/Linux 11:09:46 up 1 day 14:38, 2 users, load average: 0.32, 0.28, 0.19
This commit is contained in:
parent
125eb7c09b
commit
4b1163d0ed
1 changed files with 13 additions and 5 deletions
|
@ -64,12 +64,20 @@ include $(NEMU_HOME)/scripts/native.mk
|
|||
endif
|
||||
|
||||
include $(NEMU_HOME)/tests/Makefile
|
||||
all-tests: TEST_OBJS = $(filter-out $(OBJ_DIR)/src/nemu-main.o, $(OBJS))
|
||||
all-tests: CFLAGS += $(shell pkg-config --cflags check)
|
||||
all-tests: LDFLAGS += $(shell pkg-config --libs check)
|
||||
all-tests: $(TEST_SRCS:%.c=$(OBJ_DIR)/%)
|
||||
unit-tests: TEST_OBJS = $(filter-out $(OBJ_DIR)/src/nemu-main.o, $(OBJS))
|
||||
unit-tests: CFLAGS += $(shell pkg-config --cflags check)
|
||||
unit-tests: LDFLAGS += $(shell pkg-config --libs check)
|
||||
unit-tests: $(TEST_SRCS:%.c=$(OBJ_DIR)/%)
|
||||
|
||||
test: all-tests
|
||||
IMAGES = $(shell find $(IMAGES_PATH) -type f -name '*.bin')
|
||||
|
||||
$(IMAGES): %: % $(BINARY)
|
||||
$(BINARY) -b $<
|
||||
|
||||
integration-tests: $(IMAGES)
|
||||
|
||||
|
||||
test: unit-tests integration-tests
|
||||
@$(OBJ_DIR)/tests/expr_test
|
||||
|
||||
.PHONY: test
|
Loading…
Add table
Reference in a new issue