Makefile 940 字节
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-libnuma
15

16 17
CC := $(CC) -MD

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

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

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

24
test-hello:
25 26
	$(BUILD)

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

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

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

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

39 40 41
test-bionic:
	$(BUILD)

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

45 46 47
test-glibc:
	$(BUILD)

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

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

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

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

60 61
-include *.d */*.d

62 63 64
###############################

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