Makefile 772 字节
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-libnuma
12

13 14
CC := $(CC) -MD

15 16 17 18 19 20
all: $(FILES)

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

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

21
test-hello:
22 23
	$(BUILD)

24 25 26
test-stackprotector-all:
	$(BUILD) -Werror -fstack-protector-all

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

30 31 32
test-volatile-register-var:
	$(BUILD) -Werror -Wvolatile-register-var

33 34 35
test-fortify-source:
	$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2

36 37 38
test-bionic:
	$(BUILD)

39 40 41
test-libelf:
	$(BUILD) -lelf

42 43 44
test-glibc:
	$(BUILD)

45 46 47
test-libnuma:
	$(BUILD) -lnuma

48 49
-include *.d */*.d

50 51 52
###############################

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