-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (67 loc) · 2.02 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aggrigor <aggrigor@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/03/14 18:14:57 by aggrigor #+# #+# #
# Updated: 2024/03/23 15:27:53 by aggrigor ### ########.fr #
# #
# **************************************************************************** #
# Project name
NAME = fdf
# Compilator
CC = cc
# Compilator flags
CFLAGS = -Wall -Wextra -Werror -I minilibx_macos
LDFLAGS = -Lminilibx_macos -lmlx -framework OpenGL -framework AppKit
# Headers
HEADERS = inc/fdf.h inc/get_next_line.h
# Source directory
SRCS_DIR = src/
# Objects directory
OBJS_DIR = objs/
# Source file names
SRCS_NAME = fdf.c \
sidebar.c \
sidebar_utils.c \
hooks.c \
ft_putstr_fd.c \
ft_strcmp.c \
ft_strlen.c \
validation.c \
get_next_line.c \
get_next_line_utils.c \
ft_split.c \
ft_atoi.c \
ft_itoa.c \
color_utils.c \
color_presets.c \
button_actions.c \
button_actions2.c \
button_actions3.c \
rotate.c \
draw.c \
draw_line.c \
assign_utils.c \
fdf_utils1.c \
fdf_utils2.c
# Objects file names
OBJS = $(addprefix $(OBJS_DIR), $(OBJS_NAME))
OBJS_NAME = $(SRCS_NAME:.c=.o)
# Compilation process
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
$(OBJS_DIR)%.o: $(SRCS_DIR)%.c $(HEADERS) Makefile
$(CC) $(CFLAGS) -c $< -o $@
# Cleaning
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
# Remaking
re: clean all
# PHONY files
.PHONY: all clean fclean re