aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 742a32eee8fc..1811a7015f9c 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -328,6 +328,7 @@ LIB_FILE=libperf.a
328LIB_H += ../../include/linux/perf_event.h 328LIB_H += ../../include/linux/perf_event.h
329LIB_H += ../../include/linux/rbtree.h 329LIB_H += ../../include/linux/rbtree.h
330LIB_H += ../../include/linux/list.h 330LIB_H += ../../include/linux/list.h
331LIB_H += ../../include/linux/stringify.h
331LIB_H += util/include/linux/list.h 332LIB_H += util/include/linux/list.h
332LIB_H += perf.h 333LIB_H += perf.h
333LIB_H += util/types.h 334LIB_H += util/types.h
@@ -392,6 +393,7 @@ BUILTIN_OBJS += builtin-stat.o
392BUILTIN_OBJS += builtin-timechart.o 393BUILTIN_OBJS += builtin-timechart.o
393BUILTIN_OBJS += builtin-top.o 394BUILTIN_OBJS += builtin-top.o
394BUILTIN_OBJS += builtin-trace.o 395BUILTIN_OBJS += builtin-trace.o
396BUILTIN_OBJS += builtin-probe.o
395 397
396PERFLIBS = $(LIB_FILE) 398PERFLIBS = $(LIB_FILE)
397 399
@@ -426,6 +428,15 @@ ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf *
426 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); 428 msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
427endif 429endif
428 430
431ifneq ($(shell sh -c "(echo '\#include <libdwarf/dwarf.h>'; echo '\#include <libdwarf/libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
432 msg := $(warning No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231);
433 BASIC_CFLAGS += -DNO_LIBDWARF
434else
435 EXTLIBS += -lelf -ldwarf
436 LIB_H += util/probe-finder.h
437 LIB_OBJS += util/probe-finder.o
438endif
439
429ifdef NO_DEMANGLE 440ifdef NO_DEMANGLE
430 BASIC_CFLAGS += -DNO_DEMANGLE 441 BASIC_CFLAGS += -DNO_DEMANGLE
431else 442else