kvm: qemu: fix option_rom_setup_reset address
[kvm-userspace.git] / libkvm / Makefile
blob72c36a617e9c338642141d7148c4509a630855c3
1 include ../config.mak
2 include config-$(ARCH).mak
4 # cc-option
5 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
6 cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
7 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
9 CFLAGS += $(autodepend-flags) -g -fomit-frame-pointer -Wall
10 CFLAGS += $(call cc-option, -fno-stack-protector, "")
11 CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
12 CFLAGS += -I $(LIBKVM_KERNELDIR)/include
14 LDFLAGS += $(CFLAGS)
16 CXXFLAGS = $(autodepend-flags)
18 autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
21 all: libkvm.a
23 libkvm.a: libkvm.o $(libkvm-$(ARCH)-objs)
24 $(AR) rcs $@ $^
26 install:
27 @echo skipping libkvm install
29 install-libkvm:
30 install -D libkvm.h $(DESTDIR)/$(PREFIX)/include/libkvm.h
31 install -D libkvm.a $(DESTDIR)/$(PREFIX)/$(LIBDIR)/libkvm.a
33 install-kernel-headers:
34 install -D $(LIBKVM_KERNELDIR)/include/linux/kvm.h \
35 $(DESTDIR)/$(PREFIX)/include/linux/kvm.h
36 install -D $(LIBKVM_KERNELDIR)/include/linux/kvm_para.h \
37 $(DESTDIR)/$(PREFIX)/include/linux/kvm_para.h
39 -include .*.d
41 clean:
42 $(RM) *.o *.a .*.d