aboutsummaryrefslogtreecommitdiffstats
path: root/tools/scripts/Makefile.include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-04-13 03:50:21 -0400
committerIngo Molnar <mingo@kernel.org>2012-04-13 03:50:21 -0400
commit659c36fcda403013a01b85da07cf2d9711e6d6c7 (patch)
treeece2e7d0e2c19ea5a3d0ec172ad0b81a8a19021d /tools/scripts/Makefile.include
parent9521d830b6341d1887dcfc2aebde23fbfa5f1473 (diff)
parent5a7ed29c7572d00a75e8c4529e30c5ac2ef82271 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Fixes and improvements for perf/core: . Overhaul the tools/ makefiles, gluing them to the top level Makefile, from Borislav Petkov. . Move the UI files from tools/perf/util/ui/ to tools/perf/ui/. Also move the GTK+ browser to tools/perf/ui/gtk/, from Namhyung Kim. . Only fallback to sw cycles counter on ENOENT for the hw cycles, from Robert Richter . Trivial fixes from Robert Richter . Handle the autogenerated bison/flex files better, from Namhyung and Jiri Olsa. . Navigate jump instructions in the annotate browser, just press enter or ->, still needs support for a jump navigation history, i.e. to go back. . Search string in the annotate browser: same keys as vim: / forward n next backward/forward ? backward . Clarify number of events/samples in the report header, from Ashay Rane Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/scripts/Makefile.include')
-rw-r--r--tools/scripts/Makefile.include57
1 files changed, 57 insertions, 0 deletions
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
new file mode 100644
index 000000000000..87b55a729a5f
--- /dev/null
+++ b/tools/scripts/Makefile.include
@@ -0,0 +1,57 @@
1ifeq ("$(origin O)", "command line")
2 OUTPUT := $(O)/
3endif
4
5ifneq ($(OUTPUT),)
6# check that the output directory actually exists
7OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
8$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
9endif
10
11#
12# Include saner warnings here, which can catch bugs:
13#
14EXTRA_WARNINGS := -Wbad-function-cast
15EXTRA_WARNINGS += -Wdeclaration-after-statement
16EXTRA_WARNINGS += -Wformat-security
17EXTRA_WARNINGS += -Wformat-y2k
18EXTRA_WARNINGS += -Winit-self
19EXTRA_WARNINGS += -Wmissing-declarations
20EXTRA_WARNINGS += -Wmissing-prototypes
21EXTRA_WARNINGS += -Wnested-externs
22EXTRA_WARNINGS += -Wno-system-headers
23EXTRA_WARNINGS += -Wold-style-definition
24EXTRA_WARNINGS += -Wpacked
25EXTRA_WARNINGS += -Wredundant-decls
26EXTRA_WARNINGS += -Wshadow
27EXTRA_WARNINGS += -Wstrict-aliasing=3
28EXTRA_WARNINGS += -Wstrict-prototypes
29EXTRA_WARNINGS += -Wswitch-default
30EXTRA_WARNINGS += -Wswitch-enum
31EXTRA_WARNINGS += -Wundef
32EXTRA_WARNINGS += -Wwrite-strings
33EXTRA_WARNINGS += -Wformat
34
35ifneq ($(findstring $(MAKEFLAGS), w),w)
36PRINT_DIR = --no-print-directory
37else
38NO_SUBDIR = :
39endif
40
41QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
42QUIET_SUBDIR1 =
43
44ifneq ($(findstring $(MAKEFLAGS),s),s)
45ifndef V
46 QUIET_CC = @echo ' ' CC $@;
47 QUIET_AR = @echo ' ' AR $@;
48 QUIET_LINK = @echo ' ' LINK $@;
49 QUIET_MKDIR = @echo ' ' MKDIR $@;
50 QUIET_GEN = @echo ' ' GEN $@;
51 QUIET_SUBDIR0 = +@subdir=
52 QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
53 $(MAKE) $(PRINT_DIR) -C $$subdir
54 QUIET_FLEX = @echo ' ' FLEX $@;
55 QUIET_BISON = @echo ' ' BISON $@;
56endif
57endif