Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Jiri Olsa | 2fedf79 | 2016-12-04 21:42:53 +0100 | [diff] [blame] | 2 | FILES= \ |
| 3 | test-all.bin \ |
| 4 | test-backtrace.bin \ |
| 5 | test-bionic.bin \ |
| 6 | test-dwarf.bin \ |
| 7 | test-dwarf_getlocations.bin \ |
| 8 | test-fortify-source.bin \ |
| 9 | test-sync-compare-and-swap.bin \ |
| 10 | test-glibc.bin \ |
| 11 | test-gtk2.bin \ |
| 12 | test-gtk2-infobar.bin \ |
| 13 | test-hello.bin \ |
| 14 | test-libaudit.bin \ |
| 15 | test-libbfd.bin \ |
Roman Gushchin | fb98266 | 2017-12-27 19:16:29 +0000 | [diff] [blame^] | 16 | test-disassembler-four-args.bin \ |
Jiri Olsa | 2fedf79 | 2016-12-04 21:42:53 +0100 | [diff] [blame] | 17 | test-liberty.bin \ |
| 18 | test-liberty-z.bin \ |
| 19 | test-cplus-demangle.bin \ |
| 20 | test-libelf.bin \ |
| 21 | test-libelf-getphdrnum.bin \ |
| 22 | test-libelf-gelf_getnote.bin \ |
| 23 | test-libelf-getshdrstrndx.bin \ |
| 24 | test-libelf-mmap.bin \ |
| 25 | test-libnuma.bin \ |
| 26 | test-numa_num_possible_cpus.bin \ |
| 27 | test-libperl.bin \ |
| 28 | test-libpython.bin \ |
| 29 | test-libpython-version.bin \ |
| 30 | test-libslang.bin \ |
| 31 | test-libcrypto.bin \ |
| 32 | test-libunwind.bin \ |
| 33 | test-libunwind-debug-frame.bin \ |
| 34 | test-libunwind-x86.bin \ |
| 35 | test-libunwind-x86_64.bin \ |
| 36 | test-libunwind-arm.bin \ |
| 37 | test-libunwind-aarch64.bin \ |
| 38 | test-libunwind-debug-frame-arm.bin \ |
| 39 | test-libunwind-debug-frame-aarch64.bin \ |
| 40 | test-pthread-attr-setaffinity-np.bin \ |
| 41 | test-stackprotector-all.bin \ |
| 42 | test-timerfd.bin \ |
| 43 | test-libdw-dwarf-unwind.bin \ |
| 44 | test-libbabeltrace.bin \ |
| 45 | test-compile-32.bin \ |
| 46 | test-compile-x32.bin \ |
| 47 | test-zlib.bin \ |
| 48 | test-lzma.bin \ |
| 49 | test-bpf.bin \ |
| 50 | test-get_cpuid.bin \ |
| 51 | test-sdt.bin \ |
| 52 | test-cxx.bin \ |
Arnaldo Carvalho de Melo | 120010c | 2017-03-02 12:55:49 -0300 | [diff] [blame] | 53 | test-jvmti.bin \ |
Arnaldo Carvalho de Melo | 86bcdb5 | 2017-07-18 17:15:29 -0300 | [diff] [blame] | 54 | test-sched_getcpu.bin \ |
| 55 | test-setns.bin |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 56 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 57 | FILES := $(addprefix $(OUTPUT),$(FILES)) |
| 58 | |
David Carrillo-Cisneros | 9961aa6 | 2017-04-11 23:49:14 -0700 | [diff] [blame] | 59 | CC ?= $(CROSS_COMPILE)gcc |
| 60 | CXX ?= $(CROSS_COMPILE)g++ |
| 61 | PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config |
Wang Nan | cb40d55 | 2016-11-26 07:03:31 +0000 | [diff] [blame] | 62 | LLVM_CONFIG ?= llvm-config |
Ingo Molnar | 8b6eb56 | 2013-09-30 13:51:28 +0200 | [diff] [blame] | 63 | |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 64 | all: $(FILES) |
| 65 | |
David Carrillo-Cisneros | 9961aa6 | 2017-04-11 23:49:14 -0700 | [diff] [blame] | 66 | __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 67 | BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1 |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 68 | |
David Carrillo-Cisneros | 9961aa6 | 2017-04-11 23:49:14 -0700 | [diff] [blame] | 69 | __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS) |
Wang Nan | 87095f7 | 2016-09-26 07:26:56 +0000 | [diff] [blame] | 70 | BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1 |
| 71 | |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 72 | ############################### |
| 73 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 74 | $(OUTPUT)test-all.bin: |
Jiri Olsa | 6c6f0f6 | 2015-03-04 11:35:47 +0100 | [diff] [blame] | 75 | $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma |
Ingo Molnar | baa9c30 | 2013-10-01 14:14:31 +0200 | [diff] [blame] | 76 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 77 | $(OUTPUT)test-hello.bin: |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 78 | $(BUILD) |
| 79 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 80 | $(OUTPUT)test-pthread-attr-setaffinity-np.bin: |
Ingo Molnar | b49f1a4 | 2015-02-28 10:16:27 +0100 | [diff] [blame] | 81 | $(BUILD) -D_GNU_SOURCE -lpthread |
Vineet Gupta | 459a3df | 2015-01-13 19:13:24 +0530 | [diff] [blame] | 82 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 83 | $(OUTPUT)test-stackprotector-all.bin: |
Ingo Molnar | b49f1a4 | 2015-02-28 10:16:27 +0100 | [diff] [blame] | 84 | $(BUILD) -fstack-protector-all |
Ingo Molnar | 90ac542 | 2013-09-30 13:48:44 +0200 | [diff] [blame] | 85 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 86 | $(OUTPUT)test-fortify-source.bin: |
Ingo Molnar | b49f1a4 | 2015-02-28 10:16:27 +0100 | [diff] [blame] | 87 | $(BUILD) -O2 -D_FORTIFY_SOURCE=2 |
Ingo Molnar | 1ea6f99 | 2013-10-07 09:38:28 +0200 | [diff] [blame] | 88 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 89 | $(OUTPUT)test-bionic.bin: |
Ingo Molnar | 78e9d65 | 2013-09-30 14:11:46 +0200 | [diff] [blame] | 90 | $(BUILD) |
| 91 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 92 | $(OUTPUT)test-libelf.bin: |
Ingo Molnar | 8f7f800 | 2013-09-30 14:20:25 +0200 | [diff] [blame] | 93 | $(BUILD) -lelf |
| 94 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 95 | $(OUTPUT)test-glibc.bin: |
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 96 | $(BUILD) |
| 97 | |
Arnaldo Carvalho de Melo | 120010c | 2017-03-02 12:55:49 -0300 | [diff] [blame] | 98 | $(OUTPUT)test-sched_getcpu.bin: |
| 99 | $(BUILD) |
| 100 | |
Arnaldo Carvalho de Melo | 86bcdb5 | 2017-07-18 17:15:29 -0300 | [diff] [blame] | 101 | $(OUTPUT)test-setns.bin: |
| 102 | $(BUILD) |
| 103 | |
Andi Kleen | 7aec51c | 2015-08-12 15:48:37 -0700 | [diff] [blame] | 104 | DWARFLIBS := -ldw |
| 105 | ifeq ($(findstring -static,${LDFLAGS}),-static) |
| 106 | DWARFLIBS += -lelf -lebl -lz -llzma -lbz2 |
| 107 | endif |
| 108 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 109 | $(OUTPUT)test-dwarf.bin: |
Andi Kleen | 7aec51c | 2015-08-12 15:48:37 -0700 | [diff] [blame] | 110 | $(BUILD) $(DWARFLIBS) |
Ingo Molnar | 8295d4e | 2013-10-07 10:35:39 +0200 | [diff] [blame] | 111 | |
Arnaldo Carvalho de Melo | bd0419e | 2016-04-05 11:33:41 -0300 | [diff] [blame] | 112 | $(OUTPUT)test-dwarf_getlocations.bin: |
| 113 | $(BUILD) $(DWARFLIBS) |
| 114 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 115 | $(OUTPUT)test-libelf-mmap.bin: |
Ingo Molnar | 8869b17 | 2013-09-30 15:02:28 +0200 | [diff] [blame] | 116 | $(BUILD) -lelf |
| 117 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 118 | $(OUTPUT)test-libelf-getphdrnum.bin: |
Ingo Molnar | b7bcef6 | 2013-09-30 14:35:27 +0200 | [diff] [blame] | 119 | $(BUILD) -lelf |
| 120 | |
Arnaldo Carvalho de Melo | 1c1a3a4 | 2016-07-12 12:19:09 -0300 | [diff] [blame] | 121 | $(OUTPUT)test-libelf-gelf_getnote.bin: |
| 122 | $(BUILD) -lelf |
| 123 | |
Arnaldo Carvalho de Melo | 2492c46 | 2016-07-04 19:35:47 -0300 | [diff] [blame] | 124 | $(OUTPUT)test-libelf-getshdrstrndx.bin: |
| 125 | $(BUILD) -lelf |
| 126 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 127 | $(OUTPUT)test-libnuma.bin: |
Ingo Molnar | 3ae069c | 2013-09-30 13:37:10 +0200 | [diff] [blame] | 128 | $(BUILD) -lnuma |
| 129 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 130 | $(OUTPUT)test-numa_num_possible_cpus.bin: |
Arnaldo Carvalho de Melo | f8ac860 | 2015-09-17 12:20:28 -0300 | [diff] [blame] | 131 | $(BUILD) -lnuma |
| 132 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 133 | $(OUTPUT)test-libunwind.bin: |
Jean Pihet | 1448fef | 2013-12-10 13:24:04 +0100 | [diff] [blame] | 134 | $(BUILD) -lelf |
Ingo Molnar | 058f952 | 2013-09-30 14:45:44 +0200 | [diff] [blame] | 135 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 136 | $(OUTPUT)test-libunwind-debug-frame.bin: |
Jean Pihet | 1448fef | 2013-12-10 13:24:04 +0100 | [diff] [blame] | 137 | $(BUILD) -lelf |
He Kuang | b1d9600 | 2016-05-10 07:40:31 +0000 | [diff] [blame] | 138 | $(OUTPUT)test-libunwind-x86.bin: |
| 139 | $(BUILD) -lelf -lunwind-x86 |
| 140 | |
| 141 | $(OUTPUT)test-libunwind-x86_64.bin: |
| 142 | $(BUILD) -lelf -lunwind-x86_64 |
| 143 | |
| 144 | $(OUTPUT)test-libunwind-arm.bin: |
| 145 | $(BUILD) -lelf -lunwind-arm |
| 146 | |
| 147 | $(OUTPUT)test-libunwind-aarch64.bin: |
| 148 | $(BUILD) -lelf -lunwind-aarch64 |
| 149 | |
He Kuang | f9be7ee | 2016-05-10 07:40:32 +0000 | [diff] [blame] | 150 | $(OUTPUT)test-libunwind-debug-frame-arm.bin: |
| 151 | $(BUILD) -lelf -lunwind-arm |
| 152 | |
| 153 | $(OUTPUT)test-libunwind-debug-frame-aarch64.bin: |
| 154 | $(BUILD) -lelf -lunwind-aarch64 |
Ingo Molnar | e310718 | 2013-11-14 08:25:24 +0100 | [diff] [blame] | 155 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 156 | $(OUTPUT)test-libaudit.bin: |
Ingo Molnar | d795a65 | 2013-09-30 14:55:31 +0200 | [diff] [blame] | 157 | $(BUILD) -laudit |
| 158 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 159 | $(OUTPUT)test-libslang.bin: |
Ingo Molnar | b9498b5 | 2013-09-30 14:57:54 +0200 | [diff] [blame] | 160 | $(BUILD) -I/usr/include/slang -lslang |
| 161 | |
Stephane Eranian | 8ee4646 | 2015-11-30 10:02:21 +0100 | [diff] [blame] | 162 | $(OUTPUT)test-libcrypto.bin: |
| 163 | $(BUILD) -lcrypto |
| 164 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 165 | $(OUTPUT)test-gtk2.bin: |
Mark Rutland | a8a5cd8 | 2014-01-15 10:44:08 +0000 | [diff] [blame] | 166 | $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) |
Ingo Molnar | 7ef9e05 | 2013-09-30 15:01:56 +0200 | [diff] [blame] | 167 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 168 | $(OUTPUT)test-gtk2-infobar.bin: |
Mark Rutland | a8a5cd8 | 2014-01-15 10:44:08 +0000 | [diff] [blame] | 169 | $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) |
Ingo Molnar | c7a79e9 | 2013-09-30 15:08:30 +0200 | [diff] [blame] | 170 | |
Ingo Molnar | 7181a67 | 2013-09-30 15:15:36 +0200 | [diff] [blame] | 171 | grep-libs = $(filter -l%,$(1)) |
| 172 | strip-libs = $(filter-out -l%,$(1)) |
| 173 | |
| 174 | PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) |
| 175 | PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) |
| 176 | PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) |
| 177 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` |
| 178 | FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) |
| 179 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 180 | $(OUTPUT)test-libperl.bin: |
Ingo Molnar | 7181a67 | 2013-09-30 15:15:36 +0200 | [diff] [blame] | 181 | $(BUILD) $(FLAGS_PERL_EMBED) |
| 182 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 183 | $(OUTPUT)test-libpython.bin: |
David Carrillo-Cisneros | 7be6b31 | 2017-04-11 23:49:13 -0700 | [diff] [blame] | 184 | $(BUILD) $(FLAGS_PYTHON_EMBED) |
Ingo Molnar | 9734163 | 2013-09-30 15:18:37 +0200 | [diff] [blame] | 185 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 186 | $(OUTPUT)test-libpython-version.bin: |
Namhyung Kim | 56c7d79 | 2014-07-29 15:57:19 +0900 | [diff] [blame] | 187 | $(BUILD) |
Ingo Molnar | 95d061c | 2013-09-30 15:40:04 +0200 | [diff] [blame] | 188 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 189 | $(OUTPUT)test-libbfd.bin: |
Andi Kleen | 280e7c4 | 2014-01-11 11:42:51 -0800 | [diff] [blame] | 190 | $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl |
Ingo Molnar | 3b7646e | 2013-09-30 15:53:31 +0200 | [diff] [blame] | 191 | |
Roman Gushchin | fb98266 | 2017-12-27 19:16:29 +0000 | [diff] [blame^] | 192 | $(OUTPUT)test-disassembler-four-args.bin: |
| 193 | $(BUILD) -lbfd -lopcodes |
| 194 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 195 | $(OUTPUT)test-liberty.bin: |
| 196 | $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty |
Ingo Molnar | 1c47661 | 2013-10-02 15:15:09 +0200 | [diff] [blame] | 197 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 198 | $(OUTPUT)test-liberty-z.bin: |
| 199 | $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz |
Ingo Molnar | 1c47661 | 2013-10-02 15:15:09 +0200 | [diff] [blame] | 200 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 201 | $(OUTPUT)test-cplus-demangle.bin: |
Ingo Molnar | 1c47661 | 2013-10-02 15:15:09 +0200 | [diff] [blame] | 202 | $(BUILD) -liberty |
| 203 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 204 | $(OUTPUT)test-backtrace.bin: |
Ingo Molnar | 4cc9117 | 2013-09-30 16:49:38 +0200 | [diff] [blame] | 205 | $(BUILD) |
| 206 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 207 | $(OUTPUT)test-timerfd.bin: |
David Ahern | 87419c9 | 2013-10-29 10:43:16 -0600 | [diff] [blame] | 208 | $(BUILD) |
| 209 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 210 | $(OUTPUT)test-libdw-dwarf-unwind.bin: |
Jiri Olsa | 53d0a57 | 2015-02-20 23:16:58 +0100 | [diff] [blame] | 211 | $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind) |
| 212 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 213 | $(OUTPUT)test-libbabeltrace.bin: |
Jiri Olsa | 53d0a57 | 2015-02-20 23:16:58 +0100 | [diff] [blame] | 214 | $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) |
Jiri Olsa | 4575789 | 2014-02-19 16:52:56 +0100 | [diff] [blame] | 215 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 216 | $(OUTPUT)test-sync-compare-and-swap.bin: |
Ingo Molnar | b49f1a4 | 2015-02-28 10:16:27 +0100 | [diff] [blame] | 217 | $(BUILD) |
Adrian Hunter | f6d3136 | 2014-07-14 13:02:53 +0300 | [diff] [blame] | 218 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 219 | $(OUTPUT)test-compile-32.bin: |
| 220 | $(CC) -m32 -o $@ test-compile.c |
Adrian Hunter | e477f3f | 2014-10-23 18:16:03 -0300 | [diff] [blame] | 221 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 222 | $(OUTPUT)test-compile-x32.bin: |
| 223 | $(CC) -mx32 -o $@ test-compile.c |
Adrian Hunter | e477f3f | 2014-10-23 18:16:03 -0300 | [diff] [blame] | 224 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 225 | $(OUTPUT)test-zlib.bin: |
Namhyung Kim | e92ce12 | 2014-10-31 16:51:38 +0900 | [diff] [blame] | 226 | $(BUILD) -lz |
| 227 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 228 | $(OUTPUT)test-lzma.bin: |
Jiri Olsa | 6c6f0f6 | 2015-03-04 11:35:47 +0100 | [diff] [blame] | 229 | $(BUILD) -llzma |
| 230 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 231 | $(OUTPUT)test-get_cpuid.bin: |
Arnaldo Carvalho de Melo | b0063db | 2015-09-17 12:54:30 -0300 | [diff] [blame] | 232 | $(BUILD) |
| 233 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 234 | $(OUTPUT)test-bpf.bin: |
Wang Nan | 1b76c13 | 2015-07-01 02:13:51 +0000 | [diff] [blame] | 235 | $(BUILD) |
| 236 | |
Masami Hiramatsu | e26e63b | 2016-07-12 19:05:56 +0900 | [diff] [blame] | 237 | $(OUTPUT)test-sdt.bin: |
| 238 | $(BUILD) |
| 239 | |
Wang Nan | 87095f7 | 2016-09-26 07:26:56 +0000 | [diff] [blame] | 240 | $(OUTPUT)test-cxx.bin: |
| 241 | $(BUILDXX) -std=gnu++11 |
| 242 | |
Jiri Olsa | 285932a | 2016-11-02 14:35:48 +0100 | [diff] [blame] | 243 | $(OUTPUT)test-jvmti.bin: |
| 244 | $(BUILD) |
| 245 | |
Wang Nan | cb40d55 | 2016-11-26 07:03:31 +0000 | [diff] [blame] | 246 | $(OUTPUT)test-llvm.bin: |
Wang Nan | a940cad | 2016-12-06 07:22:30 +0000 | [diff] [blame] | 247 | $(BUILDXX) -std=gnu++11 \ |
Wang Nan | cb40d55 | 2016-11-26 07:03:31 +0000 | [diff] [blame] | 248 | -I$(shell $(LLVM_CONFIG) --includedir) \ |
| 249 | -L$(shell $(LLVM_CONFIG) --libdir) \ |
| 250 | $(shell $(LLVM_CONFIG) --libs Core BPF) \ |
| 251 | $(shell $(LLVM_CONFIG) --system-libs) |
| 252 | |
Wang Nan | a940cad | 2016-12-06 07:22:30 +0000 | [diff] [blame] | 253 | $(OUTPUT)test-llvm-version.bin: |
| 254 | $(BUILDXX) -std=gnu++11 \ |
| 255 | -I$(shell $(LLVM_CONFIG) --includedir) |
| 256 | |
Wang Nan | c7fb4f6 | 2016-11-26 07:03:32 +0000 | [diff] [blame] | 257 | $(OUTPUT)test-clang.bin: |
Wang Nan | a940cad | 2016-12-06 07:22:30 +0000 | [diff] [blame] | 258 | $(BUILDXX) -std=gnu++11 \ |
Wang Nan | c7fb4f6 | 2016-11-26 07:03:32 +0000 | [diff] [blame] | 259 | -I$(shell $(LLVM_CONFIG) --includedir) \ |
| 260 | -L$(shell $(LLVM_CONFIG) --libdir) \ |
| 261 | -Wl,--start-group -lclangBasic -lclangDriver \ |
| 262 | -lclangFrontend -lclangEdit -lclangLex \ |
| 263 | -lclangAST -Wl,--end-group \ |
| 264 | $(shell $(LLVM_CONFIG) --libs Core option) \ |
| 265 | $(shell $(LLVM_CONFIG) --system-libs) |
| 266 | |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 267 | -include $(OUTPUT)*.d |
Ingo Molnar | 8b6eb56 | 2013-09-30 13:51:28 +0200 | [diff] [blame] | 268 | |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 269 | ############################### |
| 270 | |
| 271 | clean: |
Josh Poimboeuf | 1925459 | 2015-12-15 09:39:32 -0600 | [diff] [blame] | 272 | rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output) |