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