File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
tools/testing/selftests/kvm Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1717 ARCH_DIR := $(ARCH)
1818endif
1919
20+ ifeq ($(ARCH ) ,arm64)
21+ arm64_tools_dir := $(top_srcdir ) /tools/arch/arm64/tools/
22+ GEN_HDRS := $(top_srcdir ) /tools/arch/arm64/include/generated/
23+ CFLAGS += -I$(GEN_HDRS )
24+
25+ prepare :
26+ $(MAKE ) -C $(arm64_tools_dir )
27+ else
28+ prepare :
29+ endif
30+
2031LIBKVM += lib/assert.c
2132LIBKVM += lib/elf.c
2233LIBKVM += lib/guest_modes.c
@@ -256,13 +267,18 @@ $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c
256267$(SPLIT_TESTS_TARGETS ) : % : % .o $(SPLIT_TESTS_OBJS )
257268 $(CC ) $(CFLAGS ) $(CPPFLAGS ) $(LDFLAGS ) $(TARGET_ARCH ) $^ $(LDLIBS ) -o $@
258269
259- EXTRA_CLEAN += $(LIBKVM_OBJS ) $(TEST_DEP_FILES ) $(TEST_GEN_OBJ ) $(SPLIT_TESTS_OBJS ) cscope.*
270+ EXTRA_CLEAN += $(GEN_HDRS ) \
271+ $(LIBKVM_OBJS ) \
272+ $(SPLIT_TESTS_OBJS ) \
273+ $(TEST_DEP_FILES ) \
274+ $(TEST_GEN_OBJ ) \
275+ cscope.*
260276
261277x := $(shell mkdir -p $(sort $(dir $(LIBKVM_C_OBJ ) $(LIBKVM_S_OBJ ) ) ) )
262- $(LIBKVM_C_OBJ ) : $(OUTPUT ) /% .o: % .c
278+ $(LIBKVM_C_OBJ ) : $(OUTPUT ) /% .o: % .c prepare
263279 $(CC ) $(CFLAGS ) $(CPPFLAGS ) $(TARGET_ARCH ) -c $< -o $@
264280
265- $(LIBKVM_S_OBJ ) : $(OUTPUT ) /% .o: % .S
281+ $(LIBKVM_S_OBJ ) : $(OUTPUT ) /% .o: % .S prepare
266282 $(CC ) $(CFLAGS ) $(CPPFLAGS ) $(TARGET_ARCH ) -c $< -o $@
267283
268284# Compile the string overrides as freestanding to prevent the compiler from
@@ -274,6 +290,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c
274290x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS ) ) ) )
275291$(TEST_GEN_PROGS ) : $(LIBKVM_OBJS )
276292$(TEST_GEN_PROGS_EXTENDED ) : $(LIBKVM_OBJS )
293+ $(TEST_GEN_OBJ ) : prepare
277294
278295cscope : include_paths = $(LINUX_TOOL_INCLUDE ) $(LINUX_HDR_PATH ) include lib ..
279296cscope :
You can’t perform that action at this time.
0 commit comments