> 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 22:22:48 up 2 days 11:17, 2 users, load average: 0.21, 0.33, 0.31
This commit is contained in:
parent
a2ba5e8afd
commit
9d9c6f46fd
2 changed files with 9 additions and 10 deletions
|
@ -49,6 +49,15 @@ CFLAGS_TRACE += -DITRACE_COND=$(if $(CONFIG_ITRACE_COND),$(call remove_quote,$(C
|
||||||
CFLAGS += $(CFLAGS_BUILD) $(CFLAGS_TRACE) -D__GUEST_ISA__=$(GUEST_ISA)
|
CFLAGS += $(CFLAGS_BUILD) $(CFLAGS_TRACE) -D__GUEST_ISA__=$(GUEST_ISA)
|
||||||
LDFLAGS += $(CFLAGS_BUILD)
|
LDFLAGS += $(CFLAGS_BUILD)
|
||||||
|
|
||||||
|
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)/%)
|
||||||
|
|
||||||
|
test: all-tests
|
||||||
|
@$(OBJ_DIR)/tests/expr_test
|
||||||
|
|
||||||
# Include rules for menuconfig
|
# Include rules for menuconfig
|
||||||
include $(NEMU_HOME)/scripts/config.mk
|
include $(NEMU_HOME)/scripts/config.mk
|
||||||
|
|
||||||
|
@ -61,12 +70,3 @@ include $(NEMU_HOME)/scripts/native.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
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)/%)
|
|
||||||
|
|
||||||
test: all-tests
|
|
||||||
@$(OBJ_DIR)/tests/expr_test
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
TEST_SRCS += tests/expr_test.c
|
TEST_SRCS += tests/expr_test.c
|
||||||
YACC = bison
|
YACC = bison
|
||||||
INC_PATH += $(NEMU_HOME)/src/isa/$(GUEST_ISA)/local-include
|
|
||||||
|
|
||||||
$(OBJ_DIR)/%: %.c $(TEST_OBJS) app
|
$(OBJ_DIR)/%: %.c $(TEST_OBJS) app
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
|
|
Loading…
Reference in a new issue