-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (38 loc) · 1.49 KB
/
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
46
47
48
49
50
51
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rhiguita <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/04/22 20:49:44 by rhiguita #+# #+# #
# Updated: 2024/04/25 22:25:18 by rhiguita ### ########.fr #
# #
# **************************************************************************** #
Name = fractol
LIBFT = libft/libft.a
MLX = mlx/libmlx.a
CC = gcc
CFLAGS = -Wall -Werror -Wextra
ARFLAGS = ar
REMOVE = rm -f
SRCS = main.c \
OBJS = (SRCS:.c=.o)
all: $(NAME)
$(NAME): $(MLX) $(OBJS)
@$(CC) $(CFLAGS) $(OBJS) -L$(LIBFT) -L$(MLX) -lft $(MLX_F) -o $(NAME)
@echo "\033[0;36mCompilation of $(NAME) complete.\033[0m"
.c.o:
@$(CC) $(CFLAGS) -c $< -o $@
norm:
@norminette $(SRCS)
clean:
@make -C $(LIBFT) clean
@make -C $(MLX) clean
@$(REMOVE) $(OBJS)
@echo "\033[0;33mObject files removed.\033[0m"
fclean: clean
@make -C $(LIBFT) fclean
@$(REMOVE) $(NAME)
re: fclean all
.PHONY: all clean fclean re norm