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