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 17
17
ARCH_DIR := $(ARCH)
18
18
endif
19
19
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
+
20
31
LIBKVM += lib/assert.c
21
32
LIBKVM += lib/elf.c
22
33
LIBKVM += lib/guest_modes.c
@@ -256,13 +267,18 @@ $(TEST_GEN_OBJ): $(OUTPUT)/%.o: %.c
256
267
$(SPLIT_TESTS_TARGETS ) : % : % .o $(SPLIT_TESTS_OBJS )
257
268
$(CC ) $(CFLAGS ) $(CPPFLAGS ) $(LDFLAGS ) $(TARGET_ARCH ) $^ $(LDLIBS ) -o $@
258
269
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.*
260
276
261
277
x := $(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
263
279
$(CC ) $(CFLAGS ) $(CPPFLAGS ) $(TARGET_ARCH ) -c $< -o $@
264
280
265
- $(LIBKVM_S_OBJ ) : $(OUTPUT ) /% .o: % .S
281
+ $(LIBKVM_S_OBJ ) : $(OUTPUT ) /% .o: % .S prepare
266
282
$(CC ) $(CFLAGS ) $(CPPFLAGS ) $(TARGET_ARCH ) -c $< -o $@
267
283
268
284
# Compile the string overrides as freestanding to prevent the compiler from
@@ -274,6 +290,7 @@ $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c
274
290
x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS ) ) ) )
275
291
$(TEST_GEN_PROGS ) : $(LIBKVM_OBJS )
276
292
$(TEST_GEN_PROGS_EXTENDED ) : $(LIBKVM_OBJS )
293
+ $(TEST_GEN_OBJ ) : prepare
277
294
278
295
cscope : include_paths = $(LINUX_TOOL_INCLUDE ) $(LINUX_HDR_PATH ) include lib ..
279
296
cscope :
You can’t perform that action at this time.
0 commit comments