We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce8f45b commit 54782c7Copy full SHA for 54782c7
c/clang_return_stack_checks/Makefile
@@ -2,17 +2,21 @@ ifeq ($(origin CC),default)
2
CC = scan-build clang
3
endif
4
5
-ifeq ($(origin CFLAGS),default)
6
-CFLAGS = -Wall -Wextra
+ifeq ($(origin CFLAGS),undefined)
+CFLAGS = -Wall -Wextra -Og -ggdb3
7
8
9
all: return_stack_escape
10
11
guard.so: guard.c guard.h
12
- $(CC) -shared -fPIC $< -o $@
+ $(CC) $(CFLAGS) -shared -fPIC $< -o $@
13
14
return_stack_escape: return_stack_escape.c guard.so
15
- $(CC) $< ./guard.so -o $@
+ $(CC) $(CFLAGS) $< ./guard.so -o $@
16
17
clean:
18
rm -f guard.so return_stack_escape
19
+
20
+run:
21
+ ./return_stack_escape 0
22
+ if ./return_stack_escape; then exit 1; fi
0 commit comments