-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (25 loc) · 710 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (25 loc) · 710 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
CC = gcc
CCFLAGS = -std=c99 -Wall -Wextra -Werror -pedantic
LDFLAGS = -fsanitize=address
CFILES = $(wildcard *.c)
HDRFILES = $(wildcard *.h)
OBJ = $(CFILES:.c=.o)
DLISTC = $(wildcard /home/clement/my_repo/my_language/my_tools/dlist_string/*.c)
DLISTH = $(wildcard /home/clement/my_repo/my_language/my_tools/dlist_string/*.h)
TARGET = a.out
RM = rm -f
all: clang-format $(TARGET) valgrind clean
$(TARGET):
$(CC) $(CCFLAGS) $(CFILES) $(DLISTC) $(DLISTH) $(HDRFILES) -o $@
clang-format:
clang-format -i $(CFILES) $(HDRFILES)
exec:
./$(TARGET)
valgrind:
valgrind --leak-check=full --track-origins=yes ./$(TARGET) lexer.c
push:
git add *
git commit -m adv4
git push
clean:
$(RM) $(OBJ) $(TARGET)