1#!/usr/bin/make -f
2
3BUILD_TREE:=../build-tree
4
5check: $(BUILD_TREE)/cc-test
6	$(MAKE) -f Makefile.wrapper $@
7	$(MAKE) -f Makefile.includes $@
8
9clean:
10	rm -f $(BUILD_TREE)/cc-test
11	$(MAKE) -f Makefile.wrapper $@
12	$(MAKE) -f Makefile.includes $@
13
14$(BUILD_TREE)/cc-test:
15	# Check the stack protector and PIE options directly, just to have
16	# a historical record in the build logs.
17	$(CC) -Wall -fstack-protector hello.c -o $(BUILD_TREE)/cc-test || true
18	$(BUILD_TREE)/cc-test || true
19	$(CC) -Wall -fstack-protector-strong hello.c -o $(BUILD_TREE)/cc-test || true
20	$(BUILD_TREE)/cc-test || true
21	$(CC) -Wall -fPIE -pie hello.c -o $(BUILD_TREE)/cc-test || true
22	$(BUILD_TREE)/cc-test || true
23	$(BUILD_TREE)/cc-test || true
24
25.PHONY: check clean
26