-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (30 loc) · 1.3 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: polmarti <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/10/12 19:30:20 by polmarti #+# #+# #
# Updated: 2023/10/12 19:30:21 by polmarti ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRCS = src/ft_printf_utils.c src/ft_printf.c
INCLUDES = includes/ft_print.h
FLAGS = -Wall -Wextra -Werror -I$(INCLUDES) -MMD
OBJS = $(SRCS:.c=.o)
DEPS = $(SRCS:.c=.d)
all: $(NAME)
CC = gcc
%.o:%.c Makefile
$(CC) $(FLAGS) -I ./ -c $< -o $@
$(NAME): $(OBJS)
ar rcs $(NAME) $(OBJS)
clean:
rm -f $(OBJS) $(DEPS)
fclean: clean
rm -f $(NAME)
re: fclean all
-include $(DEPS)
.PHONY: all clean fclean re