-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (30 loc) · 828 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CC = gcc
CFLAGS = -Wall -g -O2
SRC1 = heap_overflow.c
SRC2 = use_after_free.c
SRC3 = use_after_free_fix.c
TARGET1 = $(SRC1:.c=)
TARGET2 = $(SRC2:.c=)
TARGET3 = $(SRC3:.c=)
TEST_TARGET = test_uaf
all: $(TARGET1) $(TARGET2) $(TARGET3) $(TEST_TARGET)
$(TARGET1): $(SRC1)
$(CC) $(CFLAGS) -o $(TARGET1) $(SRC1)
$(TARGET2): $(SRC2)
$(CC) $(CFLAGS) -o $(TARGET2) $(SRC2)
$(TARGET3): $(SRC3)
$(CC) $(CFLAGS) -o $(TARGET3) $(SRC3)
test: $(TEST_TARGET)
$(TEST_TARGET): $(SRC2)
$(CC) $(CFLAGS) -o $(TEST_TARGET) $(SRC2)
heap_overflow: $(TARGET1)
$(TARGET1): $(SRC1)
$(CC) $(CFLAGS) -o $(TARGET1) $(SRC1)
uaf: $(TARGET2)
$(TARGET2): $(SRC2)
$(CC) $(CFLAGS) -o $(TARGET2) $(SRC2)
uaf_fix: $(TARGET3)
$(TARGET3): $(SRC3)
$(CC) $(CFLAGS) -o $(TARGET3) $(SRC3)
clean:
rm -f $(TARGET1) $(TARGET2) $(TARGET3) $(TEST_TARGET)