Jiri Olsa | 8bd407b | 2013-03-15 16:28:49 +0100 | [diff] [blame] | 1 | |
Jiri Olsa | a6cf5f3 | 2014-01-03 15:32:32 +0100 | [diff] [blame] | 2 | ifeq ($(src-perf),) |
| 3 | src-perf := $(srctree)/tools/perf |
Jiri Olsa | 8bd407b | 2013-03-15 16:28:49 +0100 | [diff] [blame] | 4 | endif |
| 5 | |
Jiri Olsa | a6cf5f3 | 2014-01-03 15:32:32 +0100 | [diff] [blame] | 6 | ifeq ($(obj-perf),) |
| 7 | obj-perf := $(OUTPUT) |
| 8 | endif |
| 9 | |
| 10 | ifneq ($(obj-perf),) |
| 11 | obj-perf := $(abspath $(obj-perf))/ |
| 12 | endif |
| 13 | |
Jiri Olsa | fcfd661 | 2014-12-31 17:37:00 +0100 | [diff] [blame] | 14 | $(shell echo -n > .config-detected) |
| 15 | detected = $(shell echo "$(1)=y" >> .config-detected) |
| 16 | detected_var = $(shell echo "$(1)=$($(1))" >> .config-detected) |
| 17 | |
Jiri Olsa | a6cf5f3 | 2014-01-03 15:32:32 +0100 | [diff] [blame] | 18 | LIB_INCLUDE := $(srctree)/tools/lib/ |
| 19 | CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS) |
| 20 | |
| 21 | include $(src-perf)/config/Makefile.arch |
| 22 | |
Jiri Olsa | f39e042 | 2014-12-29 15:03:09 +0100 | [diff] [blame] | 23 | $(call detected_var,ARCH) |
| 24 | |
Jiri Olsa | a6cf5f3 | 2014-01-03 15:32:32 +0100 | [diff] [blame] | 25 | NO_PERF_REGS := 1 |
| 26 | |
| 27 | # Additional ARCH settings for x86 |
| 28 | ifeq ($(ARCH),x86) |
Jiri Olsa | f39e042 | 2014-12-29 15:03:09 +0100 | [diff] [blame] | 29 | $(call detected,CONFIG_X86) |
Namhyung Kim | c6e5e9f | 2015-01-12 10:20:55 +0800 | [diff] [blame] | 30 | ifeq (${IS_64_BIT}, 1) |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 31 | CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 32 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S |
Adrian Hunter | 8a0c4c2 | 2013-11-01 15:51:32 +0200 | [diff] [blame] | 33 | LIBUNWIND_LIBS = -lunwind -lunwind-x86_64 |
Jiri Olsa | 72965b8 | 2014-12-29 13:52:36 +0100 | [diff] [blame] | 34 | $(call detected,CONFIG_X86_64) |
Adrian Hunter | 8a0c4c2 | 2013-11-01 15:51:32 +0200 | [diff] [blame] | 35 | else |
| 36 | LIBUNWIND_LIBS = -lunwind -lunwind-x86 |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 37 | endif |
| 38 | NO_PERF_REGS := 0 |
Jiri Olsa | 8bd407b | 2013-03-15 16:28:49 +0100 | [diff] [blame] | 39 | endif |
Jean Pihet | 8ab596a | 2014-04-28 14:32:33 +0200 | [diff] [blame] | 40 | |
Will Deacon | 7495f37 | 2013-09-26 12:36:36 +0100 | [diff] [blame] | 41 | ifeq ($(ARCH),arm) |
| 42 | NO_PERF_REGS := 0 |
| 43 | LIBUNWIND_LIBS = -lunwind -lunwind-arm |
| 44 | endif |
Jiri Olsa | 8bd407b | 2013-03-15 16:28:49 +0100 | [diff] [blame] | 45 | |
Jean Pihet | 8ab596a | 2014-04-28 14:32:33 +0200 | [diff] [blame] | 46 | ifeq ($(ARCH),arm64) |
| 47 | NO_PERF_REGS := 0 |
| 48 | LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 |
| 49 | endif |
| 50 | |
Jean Pihet | 90fa9de | 2014-05-16 10:41:11 +0200 | [diff] [blame] | 51 | # So far there's only x86 and arm libdw unwind support merged in perf. |
Jiri Olsa | 4dc549e | 2014-04-20 10:50:00 +0200 | [diff] [blame] | 52 | # Disable it on all other architectures in case libdw unwind |
| 53 | # support is detected in system. Add supported architectures |
| 54 | # to the check. |
Jean Pihet | 90fa9de | 2014-05-16 10:41:11 +0200 | [diff] [blame] | 55 | ifneq ($(ARCH),$(filter $(ARCH),x86 arm)) |
Jiri Olsa | 4dc549e | 2014-04-20 10:50:00 +0200 | [diff] [blame] | 56 | NO_LIBDW_DWARF_UNWIND := 1 |
| 57 | endif |
| 58 | |
Jean Pihet | 1448fef | 2013-12-10 13:24:04 +0100 | [diff] [blame] | 59 | ifeq ($(LIBUNWIND_LIBS),) |
| 60 | NO_LIBUNWIND := 1 |
| 61 | else |
| 62 | # |
| 63 | # For linking with debug library, run like: |
| 64 | # |
| 65 | # make DEBUG=1 LIBUNWIND_DIR=/opt/libunwind/ |
| 66 | # |
| 67 | ifdef LIBUNWIND_DIR |
| 68 | LIBUNWIND_CFLAGS = -I$(LIBUNWIND_DIR)/include |
| 69 | LIBUNWIND_LDFLAGS = -L$(LIBUNWIND_DIR)/lib |
| 70 | endif |
| 71 | LIBUNWIND_LDFLAGS += $(LIBUNWIND_LIBS) |
| 72 | |
| 73 | # Set per-feature check compilation flags |
| 74 | FEATURE_CHECK_CFLAGS-libunwind = $(LIBUNWIND_CFLAGS) |
| 75 | FEATURE_CHECK_LDFLAGS-libunwind = $(LIBUNWIND_LDFLAGS) |
| 76 | FEATURE_CHECK_CFLAGS-libunwind-debug-frame = $(LIBUNWIND_CFLAGS) |
| 77 | FEATURE_CHECK_LDFLAGS-libunwind-debug-frame = $(LIBUNWIND_LDFLAGS) |
Jean Pihet | 1448fef | 2013-12-10 13:24:04 +0100 | [diff] [blame] | 78 | endif |
| 79 | |
Jiri Olsa | 8bd407b | 2013-03-15 16:28:49 +0100 | [diff] [blame] | 80 | ifeq ($(NO_PERF_REGS),0) |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 81 | CFLAGS += -DHAVE_PERF_REGS_SUPPORT |
Jiri Olsa | 8bd407b | 2013-03-15 16:28:49 +0100 | [diff] [blame] | 82 | endif |
Jiri Olsa | a32f493 | 2013-03-25 00:32:01 +0100 | [diff] [blame] | 83 | |
Jiri Olsa | 4575789 | 2014-02-19 16:52:56 +0100 | [diff] [blame] | 84 | ifndef NO_LIBELF |
| 85 | # for linking with debug library, run like: |
| 86 | # make DEBUG=1 LIBDW_DIR=/opt/libdw/ |
| 87 | ifdef LIBDW_DIR |
| 88 | LIBDW_CFLAGS := -I$(LIBDW_DIR)/include |
| 89 | LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib |
Jiri Olsa | 4575789 | 2014-02-19 16:52:56 +0100 | [diff] [blame] | 90 | endif |
Ramkumar Ramachandra | 2c529e4 | 2014-03-26 18:44:05 -0400 | [diff] [blame] | 91 | FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS) |
| 92 | FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw |
Jiri Olsa | 4575789 | 2014-02-19 16:52:56 +0100 | [diff] [blame] | 93 | endif |
| 94 | |
Jiri Olsa | 7c53746 | 2013-05-24 14:35:23 +0200 | [diff] [blame] | 95 | # include ARCH specific config |
| 96 | -include $(src-perf)/arch/$(ARCH)/Makefile |
| 97 | |
Jiri Olsa | 7c53746 | 2013-05-24 14:35:23 +0200 | [diff] [blame] | 98 | include $(src-perf)/config/utilities.mak |
Jiri Olsa | a32f493 | 2013-03-25 00:32:01 +0100 | [diff] [blame] | 99 | |
| 100 | ifeq ($(call get-executable,$(FLEX)),) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 101 | dummy := $(error Error: $(FLEX) is missing on this system, please install it) |
Jiri Olsa | a32f493 | 2013-03-25 00:32:01 +0100 | [diff] [blame] | 102 | endif |
| 103 | |
| 104 | ifeq ($(call get-executable,$(BISON)),) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 105 | dummy := $(error Error: $(BISON) is missing on this system, please install it) |
Jiri Olsa | a32f493 | 2013-03-25 00:32:01 +0100 | [diff] [blame] | 106 | endif |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 107 | |
| 108 | # Treat warnings as errors unless directed not to |
| 109 | ifneq ($(WERROR),0) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 110 | CFLAGS += -Werror |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 111 | endif |
| 112 | |
Adrian Hunter | 74af377 | 2013-10-22 10:34:05 +0300 | [diff] [blame] | 113 | ifndef DEBUG |
| 114 | DEBUG := 0 |
| 115 | endif |
| 116 | |
Ingo Molnar | fcf9258 | 2013-10-10 08:05:25 +0200 | [diff] [blame] | 117 | ifeq ($(DEBUG),0) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 118 | CFLAGS += -O6 |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 119 | endif |
| 120 | |
| 121 | ifdef PARSER_DEBUG |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 122 | PARSER_DEBUG_BISON := -t |
| 123 | PARSER_DEBUG_FLEX := -d |
| 124 | CFLAGS += -DPARSER_DEBUG |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame^] | 125 | $(call detected_var,PARSER_DEBUG_BISON) |
| 126 | $(call detected_var,PARSER_DEBUG_FLEX) |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 127 | endif |
| 128 | |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 129 | ifndef NO_LIBPYTHON |
Thomas Ilsche | d6a947f | 2014-08-04 15:03:15 +0200 | [diff] [blame] | 130 | # Try different combinations to accommodate systems that only have |
| 131 | # python[2][-config] in weird combinations but always preferring |
| 132 | # python2 and python2-config as per pep-0394. If we catch a |
| 133 | # python[-config] in version 3, the version check will kill it. |
| 134 | PYTHON2 := $(if $(call get-executable,python2),python2,python) |
| 135 | override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON2)) |
| 136 | PYTHON2_CONFIG := \ |
| 137 | $(if $(call get-executable,$(PYTHON)-config),$(PYTHON)-config,python-config) |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 138 | override PYTHON_CONFIG := \ |
Thomas Ilsche | d6a947f | 2014-08-04 15:03:15 +0200 | [diff] [blame] | 139 | $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG)) |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 140 | |
| 141 | PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG)) |
| 142 | |
| 143 | PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null) |
| 144 | PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) |
| 145 | |
| 146 | FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS) |
| 147 | FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS) |
| 148 | FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS) |
| 149 | FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) |
| 150 | endif |
| 151 | |
Jiri Olsa | 2fe7374 | 2013-04-15 04:32:28 +0200 | [diff] [blame] | 152 | CFLAGS += -fno-omit-frame-pointer |
| 153 | CFLAGS += -ggdb3 |
| 154 | CFLAGS += -funwind-tables |
| 155 | CFLAGS += -Wall |
| 156 | CFLAGS += -Wextra |
| 157 | CFLAGS += -std=gnu99 |
Jiri Olsa | 9c12cf9 | 2013-03-21 11:30:54 +0100 | [diff] [blame] | 158 | |
Mathias Krause | 6392b4e | 2014-04-27 18:51:05 +0200 | [diff] [blame] | 159 | # Enforce a non-executable stack, as we may regress (again) in the future by |
| 160 | # adding assembler files missing the .GNU-stack linker note. |
| 161 | LDFLAGS += -Wl,-z,noexecstack |
| 162 | |
Namhyung Kim | 5e2d4d0 | 2014-11-07 14:20:06 +0900 | [diff] [blame] | 163 | EXTLIBS = -lpthread -lrt -lm -ldl |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 164 | |
Ingo Molnar | 1c2d1d8 | 2013-10-03 15:05:56 +0200 | [diff] [blame] | 165 | ifneq ($(OUTPUT),) |
| 166 | OUTPUT_FEATURES = $(OUTPUT)config/feature-checks/ |
| 167 | $(shell mkdir -p $(OUTPUT_FEATURES)) |
| 168 | endif |
| 169 | |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 170 | feature_check = $(eval $(feature_check_code)) |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 171 | define feature_check_code |
Chunwei Chen | 56560ec | 2013-12-21 13:48:11 +0800 | [diff] [blame] | 172 | feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0) |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 173 | endef |
| 174 | |
| 175 | feature_set = $(eval $(feature_set_code)) |
| 176 | define feature_set_code |
| 177 | feature-$(1) := 1 |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 178 | endef |
| 179 | |
| 180 | # |
| 181 | # Build the feature check binaries in parallel, ignore errors, ignore return value and suppress output: |
| 182 | # |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 183 | |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 184 | # |
| 185 | # Note that this is not a complete list of all feature tests, just |
| 186 | # those that are typically built on a fully configured system. |
| 187 | # |
| 188 | # [ Feature tests not mentioned here have to be built explicitly in |
| 189 | # the rule that uses them - an example for that is the 'bionic' |
| 190 | # feature check. ] |
| 191 | # |
| 192 | CORE_FEATURE_TESTS = \ |
| 193 | backtrace \ |
Ingo Molnar | 8295d4e | 2013-10-07 10:35:39 +0200 | [diff] [blame] | 194 | dwarf \ |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 195 | fortify-source \ |
Adrian Hunter | f6d3136 | 2014-07-14 13:02:53 +0300 | [diff] [blame] | 196 | sync-compare-and-swap \ |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 197 | glibc \ |
Ingo Molnar | 7ef9e05 | 2013-09-30 15:01:56 +0200 | [diff] [blame] | 198 | gtk2 \ |
Ingo Molnar | c7a79e9 | 2013-09-30 15:08:30 +0200 | [diff] [blame] | 199 | gtk2-infobar \ |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 200 | libaudit \ |
| 201 | libbfd \ |
| 202 | libelf \ |
| 203 | libelf-getphdrnum \ |
| 204 | libelf-mmap \ |
| 205 | libnuma \ |
Ingo Molnar | 7181a67 | 2013-09-30 15:15:36 +0200 | [diff] [blame] | 206 | libperl \ |
Ingo Molnar | 9734163 | 2013-09-30 15:18:37 +0200 | [diff] [blame] | 207 | libpython \ |
Ingo Molnar | 95d061c | 2013-09-30 15:40:04 +0200 | [diff] [blame] | 208 | libpython-version \ |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 209 | libslang \ |
| 210 | libunwind \ |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 211 | pthread-attr-setaffinity-np \ |
Ingo Molnar | bb4c550 | 2013-11-14 08:33:24 +0100 | [diff] [blame] | 212 | stackprotector-all \ |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 213 | timerfd \ |
Namhyung Kim | e92ce12 | 2014-10-31 16:51:38 +0900 | [diff] [blame] | 214 | libdw-dwarf-unwind \ |
| 215 | zlib |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 216 | |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 217 | LIB_FEATURE_TESTS = \ |
| 218 | dwarf \ |
| 219 | glibc \ |
| 220 | gtk2 \ |
| 221 | libaudit \ |
| 222 | libbfd \ |
| 223 | libelf \ |
| 224 | libnuma \ |
| 225 | libperl \ |
| 226 | libpython \ |
| 227 | libslang \ |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 228 | libunwind \ |
Namhyung Kim | e92ce12 | 2014-10-31 16:51:38 +0900 | [diff] [blame] | 229 | libdw-dwarf-unwind \ |
| 230 | zlib |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 231 | |
| 232 | VF_FEATURE_TESTS = \ |
| 233 | backtrace \ |
| 234 | fortify-source \ |
Adrian Hunter | f6d3136 | 2014-07-14 13:02:53 +0300 | [diff] [blame] | 235 | sync-compare-and-swap \ |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 236 | gtk2-infobar \ |
| 237 | libelf-getphdrnum \ |
| 238 | libelf-mmap \ |
| 239 | libpython-version \ |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 240 | pthread-attr-setaffinity-np \ |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 241 | stackprotector-all \ |
| 242 | timerfd \ |
| 243 | libunwind-debug-frame \ |
Jiri Olsa | 2cf9040 | 2014-04-23 16:53:25 +0200 | [diff] [blame] | 244 | bionic \ |
| 245 | liberty \ |
| 246 | liberty-z \ |
Adrian Hunter | e477f3f | 2014-10-23 18:16:03 -0300 | [diff] [blame] | 247 | cplus-demangle \ |
| 248 | compile-32 \ |
| 249 | compile-x32 |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 250 | |
Jiri Olsa | c4eb6c0 | 2014-01-07 13:47:18 +0100 | [diff] [blame] | 251 | # Set FEATURE_CHECK_(C|LD)FLAGS-all for all CORE_FEATURE_TESTS features. |
| 252 | # If in the future we need per-feature checks/flags for features not |
| 253 | # mentioned in this list we need to refactor this ;-). |
| 254 | set_test_all_flags = $(eval $(set_test_all_flags_code)) |
| 255 | define set_test_all_flags_code |
| 256 | FEATURE_CHECK_CFLAGS-all += $(FEATURE_CHECK_CFLAGS-$(1)) |
| 257 | FEATURE_CHECK_LDFLAGS-all += $(FEATURE_CHECK_LDFLAGS-$(1)) |
| 258 | endef |
| 259 | |
| 260 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call set_test_all_flags,$(feat))) |
| 261 | |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 262 | # |
| 263 | # Special fast-path for the 'all features are available' case: |
| 264 | # |
Ingo Molnar | b3b64a1 | 2013-10-02 10:01:42 +0200 | [diff] [blame] | 265 | $(call feature_check,all,$(MSG)) |
| 266 | |
| 267 | # |
| 268 | # Just in case the build freshly failed, make sure we print the |
| 269 | # feature matrix: |
| 270 | # |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 271 | ifeq ($(feature-all), 1) |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 272 | # |
| 273 | # test-all.c passed - just set all the core feature flags to 1: |
| 274 | # |
| 275 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_set,$(feat))) |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 276 | else |
Chunwei Chen | 56560ec | 2013-12-21 13:48:11 +0800 | [diff] [blame] | 277 | $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS=$(LDFLAGS) -i -j -C config/feature-checks $(addsuffix .bin,$(CORE_FEATURE_TESTS)) >/dev/null 2>&1) |
Ingo Molnar | f1138ec | 2013-10-02 09:54:43 +0200 | [diff] [blame] | 278 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat))) |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 279 | endif |
| 280 | |
Ingo Molnar | 90ac542 | 2013-09-30 13:48:44 +0200 | [diff] [blame] | 281 | ifeq ($(feature-stackprotector-all), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 282 | CFLAGS += -fstack-protector-all |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 283 | endif |
| 284 | |
Ingo Molnar | fcf9258 | 2013-10-10 08:05:25 +0200 | [diff] [blame] | 285 | ifeq ($(DEBUG),0) |
Ingo Molnar | 1ea6f99 | 2013-10-07 09:38:28 +0200 | [diff] [blame] | 286 | ifeq ($(feature-fortify-source), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 287 | CFLAGS += -D_FORTIFY_SOURCE=2 |
| 288 | endif |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 289 | endif |
| 290 | |
Jiri Olsa | 2fe7374 | 2013-04-15 04:32:28 +0200 | [diff] [blame] | 291 | CFLAGS += -I$(src-perf)/util/include |
| 292 | CFLAGS += -I$(src-perf)/arch/$(ARCH)/include |
Namhyung Kim | 8a625c1 | 2014-01-09 23:00:52 +0900 | [diff] [blame] | 293 | CFLAGS += -I$(srctree)/tools/include/ |
Jiri Olsa | 2fe7374 | 2013-04-15 04:32:28 +0200 | [diff] [blame] | 294 | CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi |
| 295 | CFLAGS += -I$(srctree)/arch/$(ARCH)/include |
| 296 | CFLAGS += -I$(srctree)/include/uapi |
| 297 | CFLAGS += -I$(srctree)/include |
Jiri Olsa | 7c53746 | 2013-05-24 14:35:23 +0200 | [diff] [blame] | 298 | |
| 299 | # $(obj-perf) for generated common-cmds.h |
| 300 | # $(obj-perf)/util for generated bison/flex headers |
| 301 | ifneq ($(OUTPUT),) |
Jiri Olsa | 2fe7374 | 2013-04-15 04:32:28 +0200 | [diff] [blame] | 302 | CFLAGS += -I$(obj-perf)/util |
| 303 | CFLAGS += -I$(obj-perf) |
Jiri Olsa | 7c53746 | 2013-05-24 14:35:23 +0200 | [diff] [blame] | 304 | endif |
| 305 | |
Jiri Olsa | 2fe7374 | 2013-04-15 04:32:28 +0200 | [diff] [blame] | 306 | CFLAGS += -I$(src-perf)/util |
| 307 | CFLAGS += -I$(src-perf) |
Robert Richter | 4e31902 | 2013-06-11 17:29:18 +0200 | [diff] [blame] | 308 | CFLAGS += -I$(LIB_INCLUDE) |
Jiri Olsa | 7c53746 | 2013-05-24 14:35:23 +0200 | [diff] [blame] | 309 | |
Jiri Olsa | 2fe7374 | 2013-04-15 04:32:28 +0200 | [diff] [blame] | 310 | CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 311 | |
Adrian Hunter | f6d3136 | 2014-07-14 13:02:53 +0300 | [diff] [blame] | 312 | ifeq ($(feature-sync-compare-and-swap), 1) |
| 313 | CFLAGS += -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT |
| 314 | endif |
| 315 | |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 316 | ifeq ($(feature-pthread-attr-setaffinity-np), 1) |
| 317 | CFLAGS += -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP |
| 318 | endif |
| 319 | |
Jiri Olsa | 4e22db4 | 2013-05-24 14:35:24 +0200 | [diff] [blame] | 320 | ifndef NO_BIONIC |
David Ahern | 5febff0 | 2013-10-29 10:43:15 -0600 | [diff] [blame] | 321 | $(call feature_check,bionic) |
Ingo Molnar | 78e9d65 | 2013-09-30 14:11:46 +0200 | [diff] [blame] | 322 | ifeq ($(feature-bionic), 1) |
| 323 | BIONIC := 1 |
| 324 | EXTLIBS := $(filter-out -lrt,$(EXTLIBS)) |
| 325 | EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) |
| 326 | endif |
Jiri Olsa | 362493f | 2013-03-25 00:40:48 +0100 | [diff] [blame] | 327 | endif |
Jiri Olsa | cf4cca1 | 2013-03-25 00:45:08 +0100 | [diff] [blame] | 328 | |
| 329 | ifdef NO_LIBELF |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 330 | NO_DWARF := 1 |
| 331 | NO_DEMANGLE := 1 |
| 332 | NO_LIBUNWIND := 1 |
Jiri Olsa | 5ea8415 | 2014-02-19 16:52:57 +0100 | [diff] [blame] | 333 | NO_LIBDW_DWARF_UNWIND := 1 |
Jiri Olsa | cf4cca1 | 2013-03-25 00:45:08 +0100 | [diff] [blame] | 334 | else |
Ingo Molnar | 8f7f800 | 2013-09-30 14:20:25 +0200 | [diff] [blame] | 335 | ifeq ($(feature-libelf), 0) |
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 336 | ifeq ($(feature-glibc), 1) |
Ingo Molnar | 50eed7a | 2013-09-30 14:11:16 +0200 | [diff] [blame] | 337 | LIBC_SUPPORT := 1 |
| 338 | endif |
| 339 | ifeq ($(BIONIC),1) |
| 340 | LIBC_SUPPORT := 1 |
| 341 | endif |
| 342 | ifeq ($(LIBC_SUPPORT),1) |
| 343 | msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev); |
Jiri Olsa | cf4cca1 | 2013-03-25 00:45:08 +0100 | [diff] [blame] | 344 | |
Ingo Molnar | 50eed7a | 2013-09-30 14:11:16 +0200 | [diff] [blame] | 345 | NO_LIBELF := 1 |
| 346 | NO_DWARF := 1 |
| 347 | NO_DEMANGLE := 1 |
Arnaldo Carvalho de Melo | 9458955 | 2014-03-25 09:35:11 -0300 | [diff] [blame] | 348 | NO_LIBUNWIND := 1 |
| 349 | NO_LIBDW_DWARF_UNWIND := 1 |
Ingo Molnar | 50eed7a | 2013-09-30 14:11:16 +0200 | [diff] [blame] | 350 | else |
Arnaldo Carvalho de Melo | f9ca2d8 | 2014-06-05 12:46:04 -0300 | [diff] [blame] | 351 | ifneq ($(filter s% -static%,$(LDFLAGS),),) |
| 352 | msg := $(error No static glibc found, please install glibc-static); |
| 353 | else |
| 354 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]); |
| 355 | endif |
Ingo Molnar | 50eed7a | 2013-09-30 14:11:16 +0200 | [diff] [blame] | 356 | endif |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 357 | else |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 358 | ifndef NO_LIBDW_DWARF_UNWIND |
| 359 | ifneq ($(feature-libdw-dwarf-unwind),1) |
| 360 | NO_LIBDW_DWARF_UNWIND := 1 |
| 361 | msg := $(warning No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR); |
| 362 | endif |
| 363 | endif |
Ingo Molnar | 8295d4e | 2013-10-07 10:35:39 +0200 | [diff] [blame] | 364 | ifneq ($(feature-dwarf), 1) |
Ingo Molnar | 50eed7a | 2013-09-30 14:11:16 +0200 | [diff] [blame] | 365 | msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); |
| 366 | NO_DWARF := 1 |
| 367 | endif # Dwarf support |
Ingo Molnar | 0648f83 | 2013-10-02 15:30:35 +0200 | [diff] [blame] | 368 | endif # libelf support |
Jiri Olsa | cf4cca1 | 2013-03-25 00:45:08 +0100 | [diff] [blame] | 369 | endif # NO_LIBELF |
| 370 | |
| 371 | ifndef NO_LIBELF |
Ingo Molnar | fb3d333 | 2013-10-07 10:05:51 +0200 | [diff] [blame] | 372 | CFLAGS += -DHAVE_LIBELF_SUPPORT |
Namhyung Kim | 5e2d4d0 | 2014-11-07 14:20:06 +0900 | [diff] [blame] | 373 | EXTLIBS += -lelf |
Jiri Olsa | 779724f | 2013-03-25 00:48:14 +0100 | [diff] [blame] | 374 | |
Ingo Molnar | 8869b17 | 2013-09-30 15:02:28 +0200 | [diff] [blame] | 375 | ifeq ($(feature-libelf-mmap), 1) |
Ingo Molnar | fb3d333 | 2013-10-07 10:05:51 +0200 | [diff] [blame] | 376 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT |
| 377 | endif |
Jiri Olsa | 779724f | 2013-03-25 00:48:14 +0100 | [diff] [blame] | 378 | |
Ingo Molnar | b7bcef6 | 2013-09-30 14:35:27 +0200 | [diff] [blame] | 379 | ifeq ($(feature-libelf-getphdrnum), 1) |
Ingo Molnar | fb3d333 | 2013-10-07 10:05:51 +0200 | [diff] [blame] | 380 | CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT |
| 381 | endif |
Jiri Olsa | 779724f | 2013-03-25 00:48:14 +0100 | [diff] [blame] | 382 | |
Ingo Molnar | fb3d333 | 2013-10-07 10:05:51 +0200 | [diff] [blame] | 383 | # include ARCH specific config |
| 384 | -include $(src-perf)/arch/$(ARCH)/Makefile |
| 385 | |
| 386 | ifndef NO_DWARF |
| 387 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) |
| 388 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); |
| 389 | NO_DWARF := 1 |
| 390 | else |
| 391 | CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) |
| 392 | LDFLAGS += $(LIBDW_LDFLAGS) |
Namhyung Kim | 5e2d4d0 | 2014-11-07 14:20:06 +0900 | [diff] [blame] | 393 | EXTLIBS += -ldw |
Ingo Molnar | fb3d333 | 2013-10-07 10:05:51 +0200 | [diff] [blame] | 394 | endif # PERF_HAVE_DWARF_REGS |
| 395 | endif # NO_DWARF |
Jiri Olsa | cf4cca1 | 2013-03-25 00:45:08 +0100 | [diff] [blame] | 396 | endif # NO_LIBELF |
Jiri Olsa | 0e433fe | 2013-03-25 00:53:03 +0100 | [diff] [blame] | 397 | |
Anton Blanchard | 65ccb4f | 2014-08-25 18:25:06 +1000 | [diff] [blame] | 398 | ifeq ($(ARCH),powerpc) |
| 399 | ifndef NO_DWARF |
| 400 | CFLAGS += -DHAVE_SKIP_CALLCHAIN_IDX |
| 401 | endif |
| 402 | endif |
| 403 | |
Jiri Olsa | 0e433fe | 2013-03-25 00:53:03 +0100 | [diff] [blame] | 404 | ifndef NO_LIBUNWIND |
Ingo Molnar | 058f952 | 2013-09-30 14:45:44 +0200 | [diff] [blame] | 405 | ifneq ($(feature-libunwind), 1) |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 406 | msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR); |
Ingo Molnar | 308e1e7 | 2013-10-07 10:30:47 +0200 | [diff] [blame] | 407 | NO_LIBUNWIND := 1 |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 408 | endif |
| 409 | endif |
| 410 | |
| 411 | dwarf-post-unwind := 1 |
| 412 | dwarf-post-unwind-text := BUG |
| 413 | |
| 414 | # setup DWARF post unwinder |
| 415 | ifdef NO_LIBUNWIND |
| 416 | ifdef NO_LIBDW_DWARF_UNWIND |
| 417 | msg := $(warning Disabling post unwind, no support found.); |
| 418 | dwarf-post-unwind := 0 |
Linus Torvalds | f47671e | 2013-11-14 08:51:29 +0900 | [diff] [blame] | 419 | else |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 420 | dwarf-post-unwind-text := libdw |
| 421 | endif |
| 422 | else |
| 423 | dwarf-post-unwind-text := libunwind |
| 424 | # Enable libunwind support by default. |
| 425 | ifndef NO_LIBDW_DWARF_UNWIND |
| 426 | NO_LIBDW_DWARF_UNWIND := 1 |
| 427 | endif |
| 428 | endif |
| 429 | |
| 430 | ifeq ($(dwarf-post-unwind),1) |
| 431 | CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT |
Jiri Olsa | f39e042 | 2014-12-29 15:03:09 +0100 | [diff] [blame] | 432 | $(call detected,CONFIG_DWARF_UNWIND) |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 433 | else |
| 434 | NO_DWARF_UNWIND := 1 |
| 435 | endif |
| 436 | |
| 437 | ifndef NO_LIBUNWIND |
Jean Pihet | 8ab596a | 2014-04-28 14:32:33 +0200 | [diff] [blame] | 438 | ifeq ($(ARCH),$(filter $(ARCH),arm arm64)) |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 439 | $(call feature_check,libunwind-debug-frame) |
| 440 | ifneq ($(feature-libunwind-debug-frame), 1) |
| 441 | msg := $(warning No debug_frame support found in libunwind); |
Linus Torvalds | f47671e | 2013-11-14 08:51:29 +0900 | [diff] [blame] | 442 | CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME |
| 443 | endif |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 444 | else |
| 445 | # non-ARM has no dwarf_find_debug_frame() function: |
| 446 | CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME |
| 447 | endif |
| 448 | CFLAGS += -DHAVE_LIBUNWIND_SUPPORT |
| 449 | EXTLIBS += $(LIBUNWIND_LIBS) |
| 450 | CFLAGS += $(LIBUNWIND_CFLAGS) |
| 451 | LDFLAGS += $(LIBUNWIND_LDFLAGS) |
Ingo Molnar | 058f952 | 2013-09-30 14:45:44 +0200 | [diff] [blame] | 452 | endif |
Jiri Olsa | a827952 | 2013-03-25 00:54:36 +0100 | [diff] [blame] | 453 | |
| 454 | ifndef NO_LIBAUDIT |
Ingo Molnar | d795a65 | 2013-09-30 14:55:31 +0200 | [diff] [blame] | 455 | ifneq ($(feature-libaudit), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 456 | msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); |
| 457 | NO_LIBAUDIT := 1 |
| 458 | else |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 459 | CFLAGS += -DHAVE_LIBAUDIT_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 460 | EXTLIBS += -laudit |
Jiri Olsa | 285ab8b | 2014-12-29 15:13:44 +0100 | [diff] [blame] | 461 | $(call detected,CONFIG_AUDIT) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 462 | endif |
Jiri Olsa | a827952 | 2013-03-25 00:54:36 +0100 | [diff] [blame] | 463 | endif |
Jiri Olsa | 4a8f888 | 2013-03-25 00:56:08 +0100 | [diff] [blame] | 464 | |
| 465 | ifdef NO_NEWT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 466 | NO_SLANG=1 |
Jiri Olsa | 4a8f888 | 2013-03-25 00:56:08 +0100 | [diff] [blame] | 467 | endif |
| 468 | |
| 469 | ifndef NO_SLANG |
Ingo Molnar | b9498b5 | 2013-09-30 14:57:54 +0200 | [diff] [blame] | 470 | ifneq ($(feature-libslang), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 471 | msg := $(warning slang not found, disables TUI support. Please install slang-devel or libslang-dev); |
| 472 | NO_SLANG := 1 |
| 473 | else |
| 474 | # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h |
| 475 | CFLAGS += -I/usr/include/slang |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 476 | CFLAGS += -DHAVE_SLANG_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 477 | EXTLIBS += -lslang |
| 478 | endif |
Jiri Olsa | 4a8f888 | 2013-03-25 00:56:08 +0100 | [diff] [blame] | 479 | endif |
Jiri Olsa | 58cabf6 | 2013-03-18 00:09:24 +0100 | [diff] [blame] | 480 | |
| 481 | ifndef NO_GTK2 |
Mark Rutland | a8a5cd8 | 2014-01-15 10:44:08 +0000 | [diff] [blame] | 482 | FLAGS_GTK2=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) |
Ingo Molnar | 7ef9e05 | 2013-09-30 15:01:56 +0200 | [diff] [blame] | 483 | ifneq ($(feature-gtk2), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 484 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); |
| 485 | NO_GTK2 := 1 |
| 486 | else |
Ingo Molnar | c7a79e9 | 2013-09-30 15:08:30 +0200 | [diff] [blame] | 487 | ifeq ($(feature-gtk2-infobar), 1) |
Namhyung Kim | fc67297 | 2013-09-13 15:27:43 +0900 | [diff] [blame] | 488 | GTK_CFLAGS := -DHAVE_GTK_INFO_BAR_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 489 | endif |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 490 | CFLAGS += -DHAVE_GTK2_SUPPORT |
Mark Rutland | a8a5cd8 | 2014-01-15 10:44:08 +0000 | [diff] [blame] | 491 | GTK_CFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-2.0 2>/dev/null) |
| 492 | GTK_LIBS := $(shell $(PKG_CONFIG) --libs gtk+-2.0 2>/dev/null) |
Jiri Olsa | e213708 | 2013-09-26 20:55:54 +0200 | [diff] [blame] | 493 | EXTLIBS += -ldl |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 494 | endif |
Jiri Olsa | 58cabf6 | 2013-03-18 00:09:24 +0100 | [diff] [blame] | 495 | endif |
Jiri Olsa | 3082cb3 | 2013-03-18 00:19:44 +0100 | [diff] [blame] | 496 | |
| 497 | grep-libs = $(filter -l%,$(1)) |
| 498 | strip-libs = $(filter-out -l%,$(1)) |
| 499 | |
| 500 | ifdef NO_LIBPERL |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 501 | CFLAGS += -DNO_LIBPERL |
Jiri Olsa | 3082cb3 | 2013-03-18 00:19:44 +0100 | [diff] [blame] | 502 | else |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 503 | PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) |
| 504 | PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) |
| 505 | PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) |
| 506 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` |
| 507 | FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) |
Jiri Olsa | 3082cb3 | 2013-03-18 00:19:44 +0100 | [diff] [blame] | 508 | |
Ingo Molnar | 7181a67 | 2013-09-30 15:15:36 +0200 | [diff] [blame] | 509 | ifneq ($(feature-libperl), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 510 | CFLAGS += -DNO_LIBPERL |
| 511 | NO_LIBPERL := 1 |
Arnaldo Carvalho de Melo | 6a2f254 | 2014-05-26 16:02:30 -0300 | [diff] [blame] | 512 | msg := $(warning Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed); |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 513 | else |
| 514 | LDFLAGS += $(PERL_EMBED_LDFLAGS) |
| 515 | EXTLIBS += $(PERL_EMBED_LIBADD) |
| 516 | endif |
Jiri Olsa | 3082cb3 | 2013-03-18 00:19:44 +0100 | [diff] [blame] | 517 | endif |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 518 | |
David Ahern | 87419c9 | 2013-10-29 10:43:16 -0600 | [diff] [blame] | 519 | ifeq ($(feature-timerfd), 1) |
| 520 | CFLAGS += -DHAVE_TIMERFD_SUPPORT |
| 521 | else |
| 522 | msg := $(warning No timerfd support. Disables 'perf kvm stat live'); |
| 523 | endif |
| 524 | |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 525 | disable-python = $(eval $(disable-python_code)) |
| 526 | define disable-python_code |
Jiri Olsa | 9c12cf9 | 2013-03-21 11:30:54 +0100 | [diff] [blame] | 527 | CFLAGS += -DNO_LIBPYTHON |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 528 | $(if $(1),$(warning No $(1) was found)) |
| 529 | $(warning Python support will not be built) |
| 530 | NO_LIBPYTHON := 1 |
| 531 | endef |
| 532 | |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 533 | ifdef NO_LIBPYTHON |
| 534 | $(call disable-python) |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 535 | else |
| 536 | |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 537 | ifndef PYTHON |
| 538 | $(call disable-python,python interpreter) |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 539 | else |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 540 | PYTHON_WORD := $(call shell-wordify,$(PYTHON)) |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 541 | |
| 542 | ifndef PYTHON_CONFIG |
| 543 | $(call disable-python,python-config tool) |
| 544 | else |
| 545 | |
| 546 | PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG)) |
| 547 | |
| 548 | PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null) |
| 549 | PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS)) |
| 550 | PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) |
| 551 | PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) |
| 552 | FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) |
| 553 | |
Ingo Molnar | 9734163 | 2013-09-30 15:18:37 +0200 | [diff] [blame] | 554 | ifneq ($(feature-libpython), 1) |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 555 | $(call disable-python,Python.h (for Python 2.x)) |
| 556 | else |
| 557 | |
Ingo Molnar | 95d061c | 2013-09-30 15:40:04 +0200 | [diff] [blame] | 558 | ifneq ($(feature-libpython-version), 1) |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 559 | $(warning Python 3 is not yet supported; please set) |
| 560 | $(warning PYTHON and/or PYTHON_CONFIG appropriately.) |
| 561 | $(warning If you also have Python 2 installed, then) |
| 562 | $(warning try something like:) |
| 563 | $(warning $(and ,)) |
| 564 | $(warning $(and ,) make PYTHON=python2) |
| 565 | $(warning $(and ,)) |
| 566 | $(warning Otherwise, disable Python support entirely:) |
| 567 | $(warning $(and ,)) |
| 568 | $(warning $(and ,) make NO_LIBPYTHON=1) |
| 569 | $(warning $(and ,)) |
| 570 | $(error $(and ,)) |
| 571 | else |
Jiri Olsa | 1e9f7aa | 2013-03-21 11:41:05 +0100 | [diff] [blame] | 572 | LDFLAGS += $(PYTHON_EMBED_LDFLAGS) |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 573 | EXTLIBS += $(PYTHON_EMBED_LIBADD) |
Jiri Olsa | 7c53746 | 2013-05-24 14:35:23 +0200 | [diff] [blame] | 574 | LANG_BINDINGS += $(obj-perf)python/perf.so |
Jiri Olsa | 6e533cf | 2013-03-18 00:35:32 +0100 | [diff] [blame] | 575 | endif |
| 576 | endif |
| 577 | endif |
| 578 | endif |
| 579 | endif |
Jiri Olsa | c3cf836 | 2013-03-18 00:38:16 +0100 | [diff] [blame] | 580 | |
Jiri Olsa | 3e6a147 | 2013-10-10 22:24:00 +0200 | [diff] [blame] | 581 | ifeq ($(feature-libbfd), 1) |
Jiri Olsa | 2cf9040 | 2014-04-23 16:53:25 +0200 | [diff] [blame] | 582 | EXTLIBS += -lbfd |
| 583 | |
| 584 | # call all detections now so we get correct |
| 585 | # status in VF output |
| 586 | $(call feature_check,liberty) |
| 587 | $(call feature_check,liberty-z) |
| 588 | $(call feature_check,cplus-demangle) |
| 589 | |
| 590 | ifeq ($(feature-liberty), 1) |
| 591 | EXTLIBS += -liberty |
| 592 | else |
| 593 | ifeq ($(feature-liberty-z), 1) |
| 594 | EXTLIBS += -liberty -lz |
| 595 | endif |
| 596 | endif |
Jiri Olsa | 3e6a147 | 2013-10-10 22:24:00 +0200 | [diff] [blame] | 597 | endif |
| 598 | |
Jiri Olsa | c3cf836 | 2013-03-18 00:38:16 +0100 | [diff] [blame] | 599 | ifdef NO_DEMANGLE |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 600 | CFLAGS += -DNO_DEMANGLE |
Jiri Olsa | c3cf836 | 2013-03-18 00:38:16 +0100 | [diff] [blame] | 601 | else |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 602 | ifdef HAVE_CPLUS_DEMANGLE_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 603 | EXTLIBS += -liberty |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 604 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 605 | else |
Jiri Olsa | 3e6a147 | 2013-10-10 22:24:00 +0200 | [diff] [blame] | 606 | ifneq ($(feature-libbfd), 1) |
Jiri Olsa | 2cf9040 | 2014-04-23 16:53:25 +0200 | [diff] [blame] | 607 | ifneq ($(feature-liberty), 1) |
| 608 | ifneq ($(feature-liberty-z), 1) |
| 609 | # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT |
| 610 | # or any of 'bfd iberty z' trinity |
Ingo Molnar | 1c47661 | 2013-10-02 15:15:09 +0200 | [diff] [blame] | 611 | ifeq ($(feature-cplus-demangle), 1) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 612 | EXTLIBS += -liberty |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 613 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 614 | else |
| 615 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) |
| 616 | CFLAGS += -DNO_DEMANGLE |
| 617 | endif |
| 618 | endif |
| 619 | endif |
| 620 | endif |
| 621 | endif |
Jiri Olsa | c3cf836 | 2013-03-18 00:38:16 +0100 | [diff] [blame] | 622 | endif |
Jiri Olsa | a1c7c9e | 2013-03-18 00:41:04 +0100 | [diff] [blame] | 623 | |
Jiri Olsa | 3e6a147 | 2013-10-10 22:24:00 +0200 | [diff] [blame] | 624 | ifneq ($(filter -lbfd,$(EXTLIBS)),) |
| 625 | CFLAGS += -DHAVE_LIBBFD_SUPPORT |
| 626 | endif |
| 627 | |
Namhyung Kim | e92ce12 | 2014-10-31 16:51:38 +0900 | [diff] [blame] | 628 | ifndef NO_ZLIB |
| 629 | ifeq ($(feature-zlib), 1) |
| 630 | CFLAGS += -DHAVE_ZLIB_SUPPORT |
| 631 | EXTLIBS += -lz |
| 632 | else |
| 633 | NO_ZLIB := 1 |
| 634 | endif |
| 635 | endif |
| 636 | |
Jiri Olsa | a1c7c9e | 2013-03-18 00:41:04 +0100 | [diff] [blame] | 637 | ifndef NO_BACKTRACE |
Ingo Molnar | 4cc9117 | 2013-09-30 16:49:38 +0200 | [diff] [blame] | 638 | ifeq ($(feature-backtrace), 1) |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 639 | CFLAGS += -DHAVE_BACKTRACE_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 640 | endif |
Jiri Olsa | a1c7c9e | 2013-03-18 00:41:04 +0100 | [diff] [blame] | 641 | endif |
Jiri Olsa | 58a0abd | 2013-03-18 00:45:27 +0100 | [diff] [blame] | 642 | |
| 643 | ifndef NO_LIBNUMA |
Ingo Molnar | 3ae069c | 2013-09-30 13:37:10 +0200 | [diff] [blame] | 644 | ifeq ($(feature-libnuma), 0) |
Dongsheng Yang | 6305edf | 2013-12-02 10:26:48 -0500 | [diff] [blame] | 645 | msg := $(warning No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev); |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 646 | NO_LIBNUMA := 1 |
| 647 | else |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 648 | CFLAGS += -DHAVE_LIBNUMA_SUPPORT |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 649 | EXTLIBS += -lnuma |
Jiri Olsa | 72965b8 | 2014-12-29 13:52:36 +0100 | [diff] [blame] | 650 | $(call detected,CONFIG_NUMA) |
Jiri Olsa | 8e1b3f6 | 2013-04-15 04:06:58 +0200 | [diff] [blame] | 651 | endif |
Jiri Olsa | 58a0abd | 2013-03-18 00:45:27 +0100 | [diff] [blame] | 652 | endif |
Jiri Olsa | cd1c39f | 2013-03-18 00:56:01 +0100 | [diff] [blame] | 653 | |
Alexander Yarygin | da50ad6 | 2014-07-03 17:59:49 +0400 | [diff] [blame] | 654 | ifdef HAVE_KVM_STAT_SUPPORT |
| 655 | CFLAGS += -DHAVE_KVM_STAT_SUPPORT |
| 656 | endif |
| 657 | |
Adrian Hunter | e477f3f | 2014-10-23 18:16:03 -0300 | [diff] [blame] | 658 | ifeq (${IS_64_BIT}, 1) |
| 659 | ifndef NO_PERF_READ_VDSO32 |
| 660 | $(call feature_check,compile-32) |
Adrian Hunter | 46b1fa8 | 2014-10-23 13:45:24 +0300 | [diff] [blame] | 661 | ifeq ($(feature-compile-32), 1) |
| 662 | CFLAGS += -DHAVE_PERF_READ_VDSO32 |
| 663 | else |
Adrian Hunter | e477f3f | 2014-10-23 18:16:03 -0300 | [diff] [blame] | 664 | NO_PERF_READ_VDSO32 := 1 |
| 665 | endif |
| 666 | endif |
| 667 | ifneq (${IS_X86_64}, 1) |
| 668 | NO_PERF_READ_VDSOX32 := 1 |
| 669 | endif |
| 670 | ifndef NO_PERF_READ_VDSOX32 |
| 671 | $(call feature_check,compile-x32) |
Adrian Hunter | 46b1fa8 | 2014-10-23 13:45:24 +0300 | [diff] [blame] | 672 | ifeq ($(feature-compile-x32), 1) |
| 673 | CFLAGS += -DHAVE_PERF_READ_VDSOX32 |
| 674 | else |
Adrian Hunter | e477f3f | 2014-10-23 18:16:03 -0300 | [diff] [blame] | 675 | NO_PERF_READ_VDSOX32 := 1 |
| 676 | endif |
| 677 | endif |
| 678 | else |
| 679 | NO_PERF_READ_VDSO32 := 1 |
| 680 | NO_PERF_READ_VDSOX32 := 1 |
| 681 | endif |
| 682 | |
Jiri Olsa | cd1c39f | 2013-03-18 00:56:01 +0100 | [diff] [blame] | 683 | # Among the variables below, these: |
| 684 | # perfexecdir |
| 685 | # template_dir |
| 686 | # mandir |
| 687 | # infodir |
| 688 | # htmldir |
| 689 | # ETC_PERFCONFIG (but not sysconfdir) |
| 690 | # can be specified as a relative path some/where/else; |
| 691 | # this is interpreted as relative to $(prefix) and "perf" at |
| 692 | # runtime figures out where they are based on the path to the executable. |
| 693 | # This can help installing the suite in a relocatable way. |
| 694 | |
| 695 | # Make the path relative to DESTDIR, not to prefix |
| 696 | ifndef DESTDIR |
Jianyu Zhan | fc9cabe | 2014-06-03 00:44:34 +0800 | [diff] [blame] | 697 | prefix ?= $(HOME) |
Jiri Olsa | cd1c39f | 2013-03-18 00:56:01 +0100 | [diff] [blame] | 698 | endif |
| 699 | bindir_relative = bin |
| 700 | bindir = $(prefix)/$(bindir_relative) |
| 701 | mandir = share/man |
| 702 | infodir = share/info |
| 703 | perfexecdir = libexec/perf-core |
| 704 | sharedir = $(prefix)/share |
| 705 | template_dir = share/perf-core/templates |
| 706 | htmldir = share/doc/perf-doc |
| 707 | ifeq ($(prefix),/usr) |
| 708 | sysconfdir = /etc |
| 709 | ETC_PERFCONFIG = $(sysconfdir)/perfconfig |
| 710 | else |
| 711 | sysconfdir = $(prefix)/etc |
| 712 | ETC_PERFCONFIG = etc/perfconfig |
| 713 | endif |
Jiri Olsa | 6997af72 | 2014-08-25 16:55:52 +0200 | [diff] [blame] | 714 | ifndef lib |
Namhyung Kim | fc67297 | 2013-09-13 15:27:43 +0900 | [diff] [blame] | 715 | ifeq ($(IS_X86_64),1) |
| 716 | lib = lib64 |
| 717 | else |
Jiri Olsa | cd1c39f | 2013-03-18 00:56:01 +0100 | [diff] [blame] | 718 | lib = lib |
Namhyung Kim | fc67297 | 2013-09-13 15:27:43 +0900 | [diff] [blame] | 719 | endif |
Jiri Olsa | 6997af72 | 2014-08-25 16:55:52 +0200 | [diff] [blame] | 720 | endif # lib |
Namhyung Kim | fc67297 | 2013-09-13 15:27:43 +0900 | [diff] [blame] | 721 | libdir = $(prefix)/$(lib) |
Jiri Olsa | cd1c39f | 2013-03-18 00:56:01 +0100 | [diff] [blame] | 722 | |
| 723 | # Shell quote (do not use $(call) to accommodate ancient setups); |
| 724 | ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) |
| 725 | DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) |
| 726 | bindir_SQ = $(subst ','\'',$(bindir)) |
| 727 | mandir_SQ = $(subst ','\'',$(mandir)) |
| 728 | infodir_SQ = $(subst ','\'',$(infodir)) |
| 729 | perfexecdir_SQ = $(subst ','\'',$(perfexecdir)) |
| 730 | template_dir_SQ = $(subst ','\'',$(template_dir)) |
| 731 | htmldir_SQ = $(subst ','\'',$(htmldir)) |
| 732 | prefix_SQ = $(subst ','\'',$(prefix)) |
| 733 | sysconfdir_SQ = $(subst ','\'',$(sysconfdir)) |
Namhyung Kim | fc67297 | 2013-09-13 15:27:43 +0900 | [diff] [blame] | 734 | libdir_SQ = $(subst ','\'',$(libdir)) |
Jiri Olsa | cd1c39f | 2013-03-18 00:56:01 +0100 | [diff] [blame] | 735 | |
| 736 | ifneq ($(filter /%,$(firstword $(perfexecdir))),) |
| 737 | perfexec_instdir = $(perfexecdir) |
| 738 | else |
| 739 | perfexec_instdir = $(prefix)/$(perfexecdir) |
| 740 | endif |
| 741 | perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) |
Jiri Olsa | 3d7c014 | 2013-12-03 14:09:21 +0100 | [diff] [blame] | 742 | |
| 743 | # If we install to $(HOME) we keep the traceevent default: |
| 744 | # $(HOME)/.traceevent/plugins |
| 745 | # Otherwise we install plugins into the global $(libdir). |
| 746 | ifdef DESTDIR |
| 747 | plugindir=$(libdir)/traceevent/plugins |
Josh Boyer | b935a58 | 2014-01-22 10:01:48 -0500 | [diff] [blame] | 748 | plugindir_SQ= $(subst ','\'',$(plugindir)) |
Jiri Olsa | 3d7c014 | 2013-12-03 14:09:21 +0100 | [diff] [blame] | 749 | endif |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 750 | |
| 751 | # |
| 752 | # Print the result of the feature test: |
| 753 | # |
Jiri Olsa | 8d79076 | 2014-02-19 16:52:55 +0100 | [diff] [blame] | 754 | feature_print_status = $(eval $(feature_print_status_code)) $(info $(MSG)) |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 755 | |
Jiri Olsa | 8d79076 | 2014-02-19 16:52:55 +0100 | [diff] [blame] | 756 | define feature_print_status_code |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 757 | ifeq ($(feature-$(1)), 1) |
| 758 | MSG = $(shell printf '...%30s: [ \033[32mon\033[m ]' $(1)) |
| 759 | else |
| 760 | MSG = $(shell printf '...%30s: [ \033[31mOFF\033[m ]' $(1)) |
| 761 | endif |
| 762 | endef |
| 763 | |
Jiri Olsa | 8d79076 | 2014-02-19 16:52:55 +0100 | [diff] [blame] | 764 | feature_print_var = $(eval $(feature_print_var_code)) $(info $(MSG)) |
| 765 | define feature_print_var_code |
| 766 | MSG = $(shell printf '...%30s: %s' $(1) $($(1))) |
| 767 | endef |
| 768 | |
| 769 | feature_print_text = $(eval $(feature_print_text_code)) $(info $(MSG)) |
| 770 | define feature_print_text_code |
| 771 | MSG = $(shell printf '...%30s: %s' $(1) $(2)) |
| 772 | endef |
| 773 | |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 774 | PERF_FEATURES := $(foreach feat,$(LIB_FEATURE_TESTS),feature-$(feat)($(feature-$(feat)))) |
| 775 | PERF_FEATURES_FILE := $(shell touch $(OUTPUT)PERF-FEATURES; cat $(OUTPUT)PERF-FEATURES) |
| 776 | |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 777 | ifeq ($(dwarf-post-unwind),1) |
| 778 | PERF_FEATURES += dwarf-post-unwind($(dwarf-post-unwind-text)) |
| 779 | endif |
| 780 | |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 781 | # The $(display_lib) controls the default detection message |
| 782 | # output. It's set if: |
| 783 | # - detected features differes from stored features from |
| 784 | # last build (in PERF-FEATURES file) |
| 785 | # - one of the $(LIB_FEATURE_TESTS) is not detected |
| 786 | # - VF is enabled |
| 787 | |
| 788 | ifneq ("$(PERF_FEATURES)","$(PERF_FEATURES_FILE)") |
| 789 | $(shell echo "$(PERF_FEATURES)" > $(OUTPUT)PERF-FEATURES) |
| 790 | display_lib := 1 |
| 791 | endif |
| 792 | |
| 793 | feature_check = $(eval $(feature_check_code)) |
| 794 | define feature_check_code |
| 795 | ifneq ($(feature-$(1)), 1) |
| 796 | display_lib := 1 |
| 797 | endif |
| 798 | endef |
| 799 | |
| 800 | $(foreach feat,$(LIB_FEATURE_TESTS),$(call feature_check,$(feat))) |
| 801 | |
| 802 | ifeq ($(VF),1) |
| 803 | display_lib := 1 |
| 804 | display_vf := 1 |
| 805 | endif |
| 806 | |
| 807 | ifeq ($(display_lib),1) |
| 808 | $(info ) |
| 809 | $(info Auto-detecting system features:) |
Jiri Olsa | 8d79076 | 2014-02-19 16:52:55 +0100 | [diff] [blame] | 810 | $(foreach feat,$(LIB_FEATURE_TESTS),$(call feature_print_status,$(feat),)) |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 811 | |
| 812 | ifeq ($(dwarf-post-unwind),1) |
| 813 | $(call feature_print_text,"DWARF post unwind library", $(dwarf-post-unwind-text)) |
| 814 | endif |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 815 | endif |
| 816 | |
| 817 | ifeq ($(display_vf),1) |
Jiri Olsa | 8d79076 | 2014-02-19 16:52:55 +0100 | [diff] [blame] | 818 | $(foreach feat,$(VF_FEATURE_TESTS),$(call feature_print_status,$(feat),)) |
| 819 | $(info ) |
| 820 | $(call feature_print_var,prefix) |
| 821 | $(call feature_print_var,bindir) |
| 822 | $(call feature_print_var,libdir) |
| 823 | $(call feature_print_var,sysconfdir) |
Jiri Olsa | 0a4f2b6 | 2014-02-19 16:52:58 +0100 | [diff] [blame] | 824 | $(call feature_print_var,LIBUNWIND_DIR) |
| 825 | $(call feature_print_var,LIBDW_DIR) |
Jiri Olsa | 0695e57 | 2014-02-19 16:52:54 +0100 | [diff] [blame] | 826 | endif |
| 827 | |
| 828 | ifeq ($(display_lib),1) |
| 829 | $(info ) |
| 830 | endif |
Jiri Olsa | f39e042 | 2014-12-29 15:03:09 +0100 | [diff] [blame] | 831 | |
| 832 | $(call detected_var,bindir_SQ) |
| 833 | $(call detected_var,PYTHON_WORD) |
| 834 | ifneq ($(OUTPUT),) |
| 835 | $(call detected_var,OUTPUT) |
| 836 | endif |
Jiri Olsa | 285ab8b | 2014-12-29 15:13:44 +0100 | [diff] [blame] | 837 | $(call detected_var,htmldir_SQ) |
| 838 | $(call detected_var,infodir_SQ) |
| 839 | $(call detected_var,mandir_SQ) |
Jiri Olsa | 9352aab | 2014-12-29 17:42:46 +0100 | [diff] [blame^] | 840 | $(call detected_var,ETC_PERFCONFIG_SQ) |
| 841 | $(call detected_var,prefix_SQ) |
| 842 | $(call detected_var,perfexecdir_SQ) |