kvm: qemu: don't check per-vector mask bit before enable MSI-X
[kvm-userspace.git] / user / config-x86-common.mak
blobe789fd45ed45d20e98662699262d0036483e81f7
1 #This is a make file with common rules for both x86 & x86-64
3 all: kvmctl kvmtrace test_cases
5 kvmctl_objs= main.o iotable.o ../libkvm/libkvm.a
6 balloon_ctl: balloon_ctl.o
8 cflatobjs += \
9 test/lib/x86/io.o \
10 test/lib/x86/smp.o
12 $(libcflat): LDFLAGS += -nostdlib
13 $(libcflat): CFLAGS += -ffreestanding -I test/lib
15 CFLAGS += -m$(bits)
17 FLATLIBS = test/lib/libcflat.a $(libgcc)
18 %.flat: %.o $(FLATLIBS)
19 $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS)
21 tests-common = $(TEST_DIR)/bootstrap \
22 $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
23 $(TEST_DIR)/smptest.flat $(TEST_DIR)/port80.flat \
24 $(TEST_DIR)/realmode.flat $(TEST_DIR)/msr.flat
26 test_cases: $(tests-common) $(tests)
28 $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I test/lib -I test/lib/x86
30 $(TEST_DIR)/bootstrap: $(TEST_DIR)/bootstrap.o
31 $(CC) -nostdlib -o $@ -Wl,-T,bootstrap.lds $^
33 $(TEST_DIR)/irq.flat: $(TEST_DIR)/print.o
35 $(TEST_DIR)/access.flat: $(cstart.o) $(TEST_DIR)/access.o $(TEST_DIR)/print.o
37 $(TEST_DIR)/hypercall.flat: $(cstart.o) $(TEST_DIR)/hypercall.o $(TEST_DIR)/print.o
39 $(TEST_DIR)/sieve.flat: $(cstart.o) $(TEST_DIR)/sieve.o \
40 $(TEST_DIR)/print.o $(TEST_DIR)/vm.o
42 $(TEST_DIR)/vmexit.flat: $(cstart.o) $(TEST_DIR)/vmexit.o
44 $(TEST_DIR)/test32.flat: $(TEST_DIR)/test32.o
46 $(TEST_DIR)/smptest.flat: $(cstart.o) $(TEST_DIR)/smptest.o
48 $(TEST_DIR)/emulator.flat: $(cstart.o) $(TEST_DIR)/vm.o $(TEST_DIR)/print.o
50 $(TEST_DIR)/port80.flat: $(cstart.o) $(TEST_DIR)/port80.o
52 $(TEST_DIR)/tsc.flat: $(cstart.o) $(TEST_DIR)/tsc.o
54 $(TEST_DIR)/apic.flat: $(cstart.o) $(TEST_DIR)/apic.o $(TEST_DIR)/vm.o \
55 $(TEST_DIR)/print.o
57 $(TEST_DIR)/realmode.flat: $(TEST_DIR)/realmode.o
58 $(CC) -m32 -nostdlib -o $@ -Wl,-T,$(TEST_DIR)/realmode.lds $^
60 $(TEST_DIR)/realmode.o: bits = 32
62 $(TEST_DIR)/msr.flat: $(cstart.o) $(TEST_DIR)/msr.o
64 arch_clean:
65 $(RM) $(TEST_DIR)/bootstrap $(TEST_DIR)/*.o $(TEST_DIR)/*.flat \
66 $(TEST_DIR)/.*.d $(TEST_DIR)/lib/.*.d $(TEST_DIR)/lib/*.o