Add VM preemption latency measuring tool vm-trace
[kvmfornfv.git] / tests / vm-trace / Makefile
diff --git a/tests/vm-trace/Makefile b/tests/vm-trace/Makefile
new file mode 100644 (file)
index 0000000..e367739
--- /dev/null
@@ -0,0 +1,23 @@
+DEBUG ?= n
+
+ifeq ($(DEBUG),y)
+  DBGFLAGS = -g -DDEBUG
+else
+  DBGFLAGS = -O2
+endif
+
+XTRA_CFLAGS = $(DBGFLAGS) -Wall
+XTRALIBS = -lrt -lpthread
+
+all: vm-trace cscope
+
+vm-trace: vm-trace.c
+       $(CC) $(XTRA_CFLAGS) $< -o $@ $(XTRALIBS)
+
+cscope.out: vm-trace.c
+       cscope -b
+
+cscope: cscope.out
+
+clean:
+       rm -f *.o core* vm-trace cscope.*