Makefile 1.1 KB
Newer Older
1

2 3
FILES=					\
	test-hello			\
4
	test-stackprotector-all		\
5
	test-stackprotector		\
6
	test-volatile-register-var	\
7
	test-fortify-source		\
8
	test-bionic			\
9
	test-libelf			\
10
	test-glibc			\
11
	test-dwarf			\
12
	test-libelf-mmap		\
13
	test-libelf-getphdrnum		\
14
	test-libunwind			\
15
	test-libaudit			\
16
	test-libslang			\
17
	test-libnuma
18

19 20
CC := $(CC) -MD

21 22 23 24 25 26
all: $(FILES)

BUILD = $(CC) -o $(OUTPUT)$@ $@.c

###############################

27
test-hello:
28 29
	$(BUILD)

30 31 32
test-stackprotector-all:
	$(BUILD) -Werror -fstack-protector-all

33 34 35
test-stackprotector:
	$(BUILD) -Werror -fstack-protector

36 37 38
test-volatile-register-var:
	$(BUILD) -Werror -Wvolatile-register-var

39 40 41
test-fortify-source:
	$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2

42 43 44
test-bionic:
	$(BUILD)

45 46 47
test-libelf:
	$(BUILD) -lelf

48 49 50
test-glibc:
	$(BUILD)

51 52 53
test-dwarf:
	$(BUILD) -ldw

54 55 56
test-libelf-mmap:
	$(BUILD) -lelf

57 58 59
test-libelf-getphdrnum:
	$(BUILD) -lelf

60 61 62
test-libnuma:
	$(BUILD) -lnuma

63 64 65
test-libunwind:
	$(BUILD) -lunwind -lunwind-x86_64 -lelf

66 67 68
test-libaudit:
	$(BUILD) -laudit

69 70 71
test-libslang:
	$(BUILD) -I/usr/include/slang -lslang

72 73
-include *.d */*.d

74 75 76
###############################

clean:
77
	rm -f $(FILES) *.d