diff options
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 46a58a81c9ad..3dbb5c5bb8c6 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -337,6 +337,7 @@ LIB_FILE=libperf.a | |||
337 | LIB_H += ../../include/linux/perf_event.h | 337 | LIB_H += ../../include/linux/perf_event.h |
338 | LIB_H += ../../include/linux/rbtree.h | 338 | LIB_H += ../../include/linux/rbtree.h |
339 | LIB_H += ../../include/linux/list.h | 339 | LIB_H += ../../include/linux/list.h |
340 | LIB_H += ../../include/linux/stringify.h | ||
340 | LIB_H += util/include/linux/bitmap.h | 341 | LIB_H += util/include/linux/bitmap.h |
341 | LIB_H += util/include/linux/bitops.h | 342 | LIB_H += util/include/linux/bitops.h |
342 | LIB_H += util/include/linux/compiler.h | 343 | LIB_H += util/include/linux/compiler.h |
@@ -438,6 +439,7 @@ BUILTIN_OBJS += builtin-stat.o | |||
438 | BUILTIN_OBJS += builtin-timechart.o | 439 | BUILTIN_OBJS += builtin-timechart.o |
439 | BUILTIN_OBJS += builtin-top.o | 440 | BUILTIN_OBJS += builtin-top.o |
440 | BUILTIN_OBJS += builtin-trace.o | 441 | BUILTIN_OBJS += builtin-trace.o |
442 | BUILTIN_OBJS += builtin-probe.o | ||
441 | 443 | ||
442 | PERFLIBS = $(LIB_FILE) | 444 | PERFLIBS = $(LIB_FILE) |
443 | 445 | ||
@@ -469,6 +471,10 @@ ifeq ($(uname_S),Darwin) | |||
469 | endif | 471 | endif |
470 | 472 | ||
471 | ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) | 473 | ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) |
474 | ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) | ||
475 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]); | ||
476 | endif | ||
477 | |||
472 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) | 478 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) |
473 | BASIC_CFLAGS += -DLIBELF_NO_MMAP | 479 | BASIC_CFLAGS += -DLIBELF_NO_MMAP |
474 | endif | 480 | endif |
@@ -476,6 +482,15 @@ else | |||
476 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); | 482 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); |
477 | endif | 483 | endif |
478 | 484 | ||
485 | ifneq ($(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) | ||
486 | msg := $(warning No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231); | ||
487 | BASIC_CFLAGS += -DNO_LIBDWARF | ||
488 | else | ||
489 | EXTLIBS += -lelf -ldwarf | ||
490 | LIB_H += util/probe-finder.h | ||
491 | LIB_OBJS += util/probe-finder.o | ||
492 | endif | ||
493 | |||
479 | ifdef NO_DEMANGLE | 494 | ifdef NO_DEMANGLE |
480 | BASIC_CFLAGS += -DNO_DEMANGLE | 495 | BASIC_CFLAGS += -DNO_DEMANGLE |
481 | else | 496 | else |