-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (42 loc) · 864 Bytes
/
Makefile
File metadata and controls
60 lines (42 loc) · 864 Bytes
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
SRCS_LIBFT = ft_memset.c \
ft_strlen.c \
ft_strchr.c \
ft_atoi.c \
ft_itoa.c \
ft_uitoa.c \
ft_strcpy.c \
ft_strncpy.c \
ft_memalloc.c \
ft_strtoupper.c \
ft_bzero.c \
ft_isdigit.c \
ft_toupper.c \
SRCS = ft_printf.c \
parse.c \
print.c \
util.c \
mode.c \
flags.c \
padding.c \
convert.c \
sort.c \
OBJS_LIBFT = $(addprefix libft/, $(SRCS_LIBFT:.c=.o))
OBJS = $(addprefix srcs/, $(SRCS:.c=.o))
HEADER = -I include/
CC = cc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
NAME = libftprintf.a
AR = ar rcs
%.o: %.c
$(CC) $(CFLAGS) $(HEADER) -c $< -o $@
$(NAME): $(OBJS) $(OBJS_LIBFT)
$(AR) $@ $^
all: $(NAME)
bonus: all
clean:
$(RM) $(OBJS) $(OBJS_LIBFT)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all bonus clean fclean re