-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (28 loc) · 1.27 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: zelhajou <zelhajou@student.1337.ma> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/12/13 05:19:17 by zelhajou #+# #+# #
# Updated: 2022/12/13 05:23:03 by zelhajou ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
SRCS= ft_printf.c ft_putchar.c ft_putstr.c ft_putnbr.c ft_putunbr.c \
ft_putaddr.c ft_puthex.c
OBJS = ${SRCS:%.c=%.o}
FLAGS = -Wall -Wextra -Werror
HEADER = ft_printf.h
all: $(NAME)
$(NAME): $(OBJS)
gcc $(FLAGS) -c $(SRCS) -I ./
ar rc $(NAME) $(OBJS)
%.o: %.c $(HEADER)
$(CC) -c $(CFLAGS) $<
clean:
rm -rf $(OBJS)
fclean: clean
rm -rf $(NAME)
re: fclean all