kvm: qemu: provide a reset method for virtio
[kvm-userspace.git] / user / Makefile
blob131baaddec493d94c2463a53bab982e8da16e9f9
2 include config.mak
4 DESTDIR :=
6 .PHONY: arch_clean clean
8 #make sure env CFLAGS variable is not used
9 CFLAGS =
11 libgcc := $(shell $(CC) --print-libgcc-file-name)
13 #include architecure specific make rules
14 include config-$(ARCH).mak
16 # cc-option
17 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
19 cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
20 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
22 CFLAGS += -O1
23 CFLAGS += $(autodepend-flags) -g -fomit-frame-pointer -Wall
24 CFLAGS += $(call cc-option, -fno-stack-protector, "")
25 CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
26 CFLAGS += -I ../libkvm
28 LDFLAGS += $(CFLAGS) -L ../libkvm
30 CXXFLAGS = $(autodepend-flags)
32 autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
34 LDFLAGS += -pthread -lrt
36 kvmctl: $(kvmctl_objs)
37 $(CC) $(LDFLAGS) $^ -o $@
39 kvmtrace: $(kvmtrace_objs)
40 $(CC) $(LDFLAGS) $^ -o $@
42 %.o: %.S
43 $(CC) $(CFLAGS) -c -nostdlib -o $@ $^
45 -include .*.d
47 clean: arch_clean
48 $(RM) kvmctl kvmtrace *.o *.a .*.d