-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
42 lines (36 loc) · 851 Bytes
/
makefile
File metadata and controls
42 lines (36 loc) · 851 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
NAME := binary_tree
CC := gcc
DEBUGGER := gdb
LEAK_CHECK:= valgrind
CFLAGS := -g -std=gnu90 -Wall -pedantic -Werror -Wextra
VFLAGS := --leak-check=full
MAIN := 0-main.c
CFILES := binary_tree_print.c
DMAIN := ./tests/
SRC := *.c
RM=rm
betty:
@betty $(SRC) \
&& betty *.h
build:
@betty $(SRC) \
&& betty *.h \
&& $(CC) $(CFLAGS) $(CFILES) $(DMAIN)$(MAIN) $(SRC) -o $(NAME)
run:
@betty $(SRC) \
&& betty *.h \
&& $(CC) $(CFLAGS) $(CFILES) $(DMAIN)$(MAIN) $(SRC) -o $(NAME) \
&& ./$(NAME) \
&& $(RM) -f ./$(NAME)
gdb:
@betty $(SRC) \
&& betty *.h \
&& $(CC) $(CFLAGS) $(CFILES) $(DMAIN)$(MAIN) $(SRC) -o $(NAME) \
&& $(DEBUGGER) ./$(NAME) \
&& $(RM) -f $(NAME)
valgrind:
@betty $(SRC) \
&& betty *.h \
&& $(CC) $(CFLAGS) $(CFILES) $(DMAIN)$(MAIN) $(SRC) -o $(NAME) \
&& $(LEAK_CHECK) $(VFLAGS) ./$(NAME) \
&& $(RM) -f ./$(NAME)