From 4b1163d0edfebeb3ac0fbd5af996d37d8b1079f8 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Wed, 6 Mar 2024 11:09:46 +0800 Subject: [PATCH] =?UTF-8?q?>=20compile=20NEMU=20ysyx=5F22040000=20?= =?UTF-8?q?=E6=9D=8E=E5=BF=83=E6=9D=A8=20Linux=20calcite=206.6.18=20#1-Nix?= =?UTF-8?q?OS=20SMP=20PREEMPT=5FDYNAMIC=20Fri=20Feb=2023=2008:25:28=20UTC?= =?UTF-8?q?=202024=20x86=5F64=20GNU/Linux=20=2011:09:46=20=20up=201=20day?= =?UTF-8?q?=2014:38,=20=202=20users,=20=20load=20average:=200.32,=200.28,?= =?UTF-8?q?=200.19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nemu/Makefile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/nemu/Makefile b/nemu/Makefile index 0f360fe..0d80b73 100644 --- a/nemu/Makefile +++ b/nemu/Makefile @@ -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 \ No newline at end of file