1XEN_ROOT = $(CURDIR)/../../.. 2include $(XEN_ROOT)/tools/Rules.mk 3 4TARGET-y := test-cpu-policy 5 6# For brevity, these tests make extensive use of designated initialisers in 7# anonymous unions, but GCCs older than 4.6 can't cope. Ignore the test in 8# this case. 9ifneq ($(clang),y) 10TARGET-$(call cc-ver,$(CC),lt,0x040600) := 11endif 12 13ifeq ($(TARGET-y),) 14$(warning Test harness not built, use newer compiler than "$(CC)" (version $(shell $(CC) -dumpversion))) 15endif 16 17.PHONY: all 18all: $(TARGET-y) 19 20.PHONY: run 21run: $(TARGET-y) 22 ./$(TARGET-y) 23 24.PHONY: clean 25clean: 26 $(RM) -f -- *.o .*.d .*.d2 test-cpu-policy 27 28.PHONY: distclean 29distclean: clean 30 $(RM) -f -- *~ 31 32.PHONY: install 33install: all 34 35.PHONY: uninstall 36 37CFLAGS += -Werror $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -O3 38CFLAGS += $(APPEND_CFLAGS) 39 40vpath %.c ../../../xen/lib/x86 41 42test-cpu-policy: test-cpu-policy.o msr.o cpuid.o policy.o 43 $(CC) $(CFLAGS) $^ -o $@ 44 45-include $(DEPS_INCLUDE) 46