Makefile 1018 字节
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-libnuma
16

17 18
CC := $(CC) -MD

19 20 21 22 23 24
all: $(FILES)

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

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

25
test-hello:
26 27
	$(BUILD)

28 29 30
test-stackprotector-all:
	$(BUILD) -Werror -fstack-protector-all

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

34 35 36
test-volatile-register-var:
	$(BUILD) -Werror -Wvolatile-register-var

37 38 39
test-fortify-source:
	$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2

40 41 42
test-bionic:
	$(BUILD)

43 44 45
test-libelf:
	$(BUILD) -lelf

46 47 48
test-glibc:
	$(BUILD)

49 50 51
test-dwarf:
	$(BUILD) -ldw

52 53 54
test-libelf-mmap:
	$(BUILD) -lelf

55 56 57
test-libelf-getphdrnum:
	$(BUILD) -lelf

58 59 60
test-libnuma:
	$(BUILD) -lnuma

61 62 63
test-libunwind:
	$(BUILD) -lunwind -lunwind-x86_64 -lelf

64 65
-include *.d */*.d

66 67 68
###############################

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