-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·43 lines (31 loc) · 950 Bytes
/
makefile
File metadata and controls
executable file
·43 lines (31 loc) · 950 Bytes
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
CC = gcc
WARNING_FLAGS = -Wall -Wextra -g -O0
EXE = Prog4Test
SCAN_BUILD_DIR = scan-build-out
#NAME = advanced_testcase4
all: 537malloc.o range_tree.o rb_tree.o $(NAME).o
$(CC) -o $(EXE) 537malloc.o range_tree.o rb_tree.o $(NAME).o
# main.c is your testcase file name
$(NAME).o: $(NAME).c 537malloc.h
$(CC) $(WARNING_FLAGS) -c $(NAME).c
# Include all your .o files in the below rule
obj: 537malloc.o range_tree.o rb_tree.o
537malloc.o: 537malloc.c 537malloc.h range_tree.h
$(CC) $(WARNING_FLAGS) -c 537malloc.c
range_tree.o: range_tree.c range_tree.h rb_tree.h
$(CC) $(WARNING_FLAGS) -c range_tree.c
rb_tree.o: rb_tree.c rb_tree.h
$(CC) $(WARNING_FLAGS) -c rb_tree.c
clean:
rm $(EXE) *.o
rm -rf $(SCAN_BUILD_DIR)
#
# Run the Clang Static Analyzer
#
scan-build: clean
scan-build -o $(SCAN_BUILD_DIR) make
#
# View the one scan available using firefox
#
scan-view: scan-build
firefox -new-window $(SCAN_BUILD_DIR)/*/index.html