-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (35 loc) · 1.53 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: wboutzou <wboutzou@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/06/25 21:23:23 by wboutzou #+# #+# #
# Updated: 2022/06/25 21:38:54 by wboutzou ### ########.fr #
# #
# **************************************************************************** #
SRCS = helpers.c get_next_line.c checker_helper.c checker_map.c graphic.c so_long.c
FLAGS = -Wall -Wextra -Werror
MLX = -lmlx -framework OpenGL -framework AppKit
OBJS = $(SRCS:.c=.o)
NAME = so_long
PRINTF = ./ft_printf/libftprintf.a
LIBFT = ./libft/libft.a
.PHONY: all clean fclean re bonus
all: $(NAME)
$(NAME): $(LIBFT) $(PRINTF) $(OBJS)
cc -g $(FLAGS) $(OBJS) $(MLX) $(LIBFT) $(PRINTF) -o $(NAME)
$(LIBFT):
@make -C libft
$(PRINTF):
@make -C ft_printf
%.o:%.c
cc $(FLAGS) -c $< -o $@
clean:
@rm -f ${OBJS}
fclean: clean
@make -C libft fclean
@make -C ft_printf fclean
@rm -f ${NAME}
re: fclean all