-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (29 loc) · 1.32 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: cvidot <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/12 15:00:43 by cvidot #+# #+# #
# Updated: 2023/07/16 11:15:17 by cvidot ### ########.fr #
# #
# **************************************************************************** #
SRCS = ft_printf.c ft_printf_utils.c ft_print_nums.c ft_print_ptrs.c
NAME = libftprintf.a
CC = cc
CC_FLAGS = -Wall -Wextra -Werror
OBJS_DIR = objs/
OBJS = $(SRCS:.c=.o)
OBJS_PREFIXED = $(addprefix $(OBJS_DIR),$(OBJS))
$(OBJS_DIR)%.o: %.c ft_printf.h
@mkdir -p $(OBJS_DIR)
@$(CC) $(CC_FLAGS) -c $< -o $@
$(NAME): $(OBJS_PREFIXED)
@ar r $(NAME) $(OBJS_PREFIXED)
all: $(NAME)
clean:
rm -rf $(OBJS_DIR)
fclean: clean
rm -f $(NAME)
re: fclean all