-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (39 loc) · 895 Bytes
/
Makefile
File metadata and controls
57 lines (39 loc) · 895 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
##
## EPITECH PROJECT, 2026
## G-PSU-100-MLH-1-1-mytop-1
## File description:
## Makefile
##
SRC = src/utils/throw_error.c
NAME = emulator
MAIN = src/main.c
OBJ = $(SRC:.c=.o) $(MAIN:.c=.o)
LIBS = -lSDL2
CC = clang
OPTIONS = -I./include
all: $(OBJ)
@echo "📂 Compiling..."
@$(CC) $(OPTIONS) $(OBJ) -o $(NAME) $(LIBS)
@echo "🥬 Done! ./$(NAME) to execute!"
%.o: %.c
@$(CC) $(OPTIONS) -c $< -o $@
scan:
@gcc -fanalyzer -Wanalyzer-possible-null-dereference $(OPTIONS) -c $(SRC) $(MAIN)
debug: OPTIONS += -g
debug: all
clean:
@echo "🧹 Cleaning up..."
@rm -f $(OBJ)
fclean: clean
@echo "🗑️ Removing binary..."
@rm -f $(NAME)
@echo "🚮 Removed!"
leaks: OPTIONS += -g -fsanitize=address
leaks: all
style-check: CC = epiclang
style-check: re
dev: CC = epiclang
dev: OPTIONS += -g
dev: re
re: fclean all
.PHONY: all clean fclean leaks style-check dev debug re