kvm: testsuite: add mmu tests
[qemu-kvm/fedora.git] / kvm / user / Makefile
blob625f0b49e3a0d326ee9733e5ea8ecc712e362bd5
2 include config.mak
4 CFLAGS = -I $(KERNELDIR)/include $(autodepend-flags) -g
5 CXXFLAGS = $(autodepend-flags)
7 autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
9 DESTDIR =
11 ifeq ($(shell uname -m), x86_64)
12 LIBDIR = /lib64
13 else
14 LIBDIR = /lib
15 endif
17 all: kvmctl libkvm.a
19 kvmctl: kvmctl.o main.o
21 libkvm.a: kvmctl.o
22 $(AR) rcs $@ $^
24 flatfiles: test/simple.flat test/stringio.flat test/memtest1.flat \
25 test/irq.flat test/sieve.flat test/bootstrap \
26 test/access.flat
28 install:
29 install -D kvmctl.h $(DESTDIR)/$(PREFIX)/include/kvmctl.h
30 install -D $(KERNELDIR)/include/linux/kvm.h \
31 $(DESTDIR)/$(PREFIX)/include/linux/kvm.h
32 install -D libkvm.a $(DESTDIR)/$(PREFIX)/$(LIBDIR)/libkvm.a
34 %.flat: %.o
35 gcc -nostdlib -o $@ -Wl,-T,flat.lds $^
37 test/bootstrap: test/bootstrap.o
38 gcc -nostdlib -o $@ -Wl,-T,bootstrap.lds $^
40 %.o: %.S
41 gcc -c -nostdlib -o $@ $^
43 test/irq.flat: test/print.o
45 test/access.flat: test/cstart64.o test/access.o test/printf.o test/print.o
47 test/sieve.flat: test/cstart64.o test/sieve.o test/print.o test/vm.o
49 test/test32.flat: test/test32.o
51 test/%.o: CFLAGS += -std=gnu99 -ffreestanding
53 -include .*.d
55 clean:
56 $(RM) kvmctl *.o *.a .*.d
57 $(RM) test/bootstrap test/*.o test/*.flat test/.*.d