Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 1 | |
Ingo Molnar | 3ae069c | 2013-09-30 13:37:10 +0200 | [diff] [blame] | 2 | FILES= \ |
3 | test-hello \ | ||||
Ingo Molnar | 90ac542 | 2013-09-30 13:48:44 +0200 | [diff] [blame] | 4 | test-stackprotector-all \ |
Ingo Molnar | 430be5a | 2013-10-07 09:47:00 +0200 | [diff] [blame] | 5 | test-stackprotector \ |
Ingo Molnar | c251044 | 2013-09-30 13:58:12 +0200 | [diff] [blame] | 6 | test-volatile-register-var \ |
Ingo Molnar | 1ea6f99 | 2013-10-07 09:38:28 +0200 | [diff] [blame] | 7 | test-fortify-source \ |
Ingo Molnar | 78e9d65 | 2013-09-30 14:11:46 +0200 | [diff] [blame] | 8 | test-bionic \ |
Ingo Molnar | 8f7f800 | 2013-09-30 14:20:25 +0200 | [diff] [blame] | 9 | test-libelf \ |
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 10 | test-glibc \ |
Ingo Molnar | 8295d4e | 2013-10-07 10:35:39 +0200 | [diff] [blame] | 11 | test-dwarf \ |
Ingo Molnar | 8869b17 | 2013-09-30 15:02:28 +0200 | [diff] [blame] | 12 | test-libelf-mmap \ |
Ingo Molnar | b7bcef6 | 2013-09-30 14:35:27 +0200 | [diff] [blame] | 13 | test-libelf-getphdrnum \ |
Ingo Molnar | 058f952 | 2013-09-30 14:45:44 +0200 | [diff] [blame] | 14 | test-libunwind \ |
Ingo Molnar | d795a65 | 2013-09-30 14:55:31 +0200 | [diff] [blame] | 15 | test-libaudit \ |
Ingo Molnar | b9498b5 | 2013-09-30 14:57:54 +0200 | [diff] [blame] | 16 | test-libslang \ |
Ingo Molnar | 7ef9e05 | 2013-09-30 15:01:56 +0200 | [diff] [blame] | 17 | test-gtk2 \ |
Ingo Molnar | c7a79e9 | 2013-09-30 15:08:30 +0200 | [diff] [blame] | 18 | test-gtk2-infobar \ |
Ingo Molnar | 7181a67 | 2013-09-30 15:15:36 +0200 | [diff] [blame^] | 19 | test-libperl \ |
Ingo Molnar | 3ae069c | 2013-09-30 13:37:10 +0200 | [diff] [blame] | 20 | test-libnuma |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 21 | |
Ingo Molnar | 8b6eb56 | 2013-09-30 13:51:28 +0200 | [diff] [blame] | 22 | CC := $(CC) -MD |
23 | |||||
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 24 | all: $(FILES) |
25 | |||||
26 | BUILD = $(CC) -o $(OUTPUT)$@ $@.c | ||||
27 | |||||
28 | ############################### | ||||
29 | |||||
Ingo Molnar | 8b6eb56 | 2013-09-30 13:51:28 +0200 | [diff] [blame] | 30 | test-hello: |
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 31 | $(BUILD) |
32 | |||||
Ingo Molnar | 90ac542 | 2013-09-30 13:48:44 +0200 | [diff] [blame] | 33 | test-stackprotector-all: |
34 | $(BUILD) -Werror -fstack-protector-all | ||||
35 | |||||
Ingo Molnar | 430be5a | 2013-10-07 09:47:00 +0200 | [diff] [blame] | 36 | test-stackprotector: |
37 | $(BUILD) -Werror -fstack-protector | ||||
38 | |||||
Ingo Molnar | c251044 | 2013-09-30 13:58:12 +0200 | [diff] [blame] | 39 | test-volatile-register-var: |
40 | $(BUILD) -Werror -Wvolatile-register-var | ||||
41 | |||||
Ingo Molnar | 1ea6f99 | 2013-10-07 09:38:28 +0200 | [diff] [blame] | 42 | test-fortify-source: |
43 | $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2 | ||||
44 | |||||
Ingo Molnar | 78e9d65 | 2013-09-30 14:11:46 +0200 | [diff] [blame] | 45 | test-bionic: |
46 | $(BUILD) | ||||
47 | |||||
Ingo Molnar | 8f7f800 | 2013-09-30 14:20:25 +0200 | [diff] [blame] | 48 | test-libelf: |
49 | $(BUILD) -lelf | ||||
50 | |||||
Ingo Molnar | e12762c | 2013-10-07 10:34:20 +0200 | [diff] [blame] | 51 | test-glibc: |
52 | $(BUILD) | ||||
53 | |||||
Ingo Molnar | 8295d4e | 2013-10-07 10:35:39 +0200 | [diff] [blame] | 54 | test-dwarf: |
55 | $(BUILD) -ldw | ||||
56 | |||||
Ingo Molnar | 8869b17 | 2013-09-30 15:02:28 +0200 | [diff] [blame] | 57 | test-libelf-mmap: |
58 | $(BUILD) -lelf | ||||
59 | |||||
Ingo Molnar | b7bcef6 | 2013-09-30 14:35:27 +0200 | [diff] [blame] | 60 | test-libelf-getphdrnum: |
61 | $(BUILD) -lelf | ||||
62 | |||||
Ingo Molnar | 3ae069c | 2013-09-30 13:37:10 +0200 | [diff] [blame] | 63 | test-libnuma: |
64 | $(BUILD) -lnuma | ||||
65 | |||||
Ingo Molnar | 058f952 | 2013-09-30 14:45:44 +0200 | [diff] [blame] | 66 | test-libunwind: |
67 | $(BUILD) -lunwind -lunwind-x86_64 -lelf | ||||
68 | |||||
Ingo Molnar | d795a65 | 2013-09-30 14:55:31 +0200 | [diff] [blame] | 69 | test-libaudit: |
70 | $(BUILD) -laudit | ||||
71 | |||||
Ingo Molnar | b9498b5 | 2013-09-30 14:57:54 +0200 | [diff] [blame] | 72 | test-libslang: |
73 | $(BUILD) -I/usr/include/slang -lslang | ||||
74 | |||||
Ingo Molnar | 7ef9e05 | 2013-09-30 15:01:56 +0200 | [diff] [blame] | 75 | test-gtk2: |
76 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | ||||
77 | |||||
Ingo Molnar | c7a79e9 | 2013-09-30 15:08:30 +0200 | [diff] [blame] | 78 | test-gtk2-infobar: |
79 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | ||||
80 | |||||
Ingo Molnar | 7181a67 | 2013-09-30 15:15:36 +0200 | [diff] [blame^] | 81 | grep-libs = $(filter -l%,$(1)) |
82 | strip-libs = $(filter-out -l%,$(1)) | ||||
83 | |||||
84 | PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) | ||||
85 | PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) | ||||
86 | PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) | ||||
87 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` | ||||
88 | FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) | ||||
89 | |||||
90 | test-libperl: | ||||
91 | $(BUILD) $(FLAGS_PERL_EMBED) | ||||
92 | |||||
Ingo Molnar | 8b6eb56 | 2013-09-30 13:51:28 +0200 | [diff] [blame] | 93 | -include *.d */*.d |
94 | |||||
Ingo Molnar | b6aa997 | 2013-09-30 10:08:24 +0200 | [diff] [blame] | 95 | ############################### |
96 | |||||
97 | clean: | ||||
Ingo Molnar | 8b6eb56 | 2013-09-30 13:51:28 +0200 | [diff] [blame] | 98 | rm -f $(FILES) *.d |