-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (43 loc) · 1.46 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
# **************************************************************************** #
# #
# :::::::: #
# Makefile :+: :+: #
# +:+ #
# By: kawish <[email protected]> +#+ #
# +#+ #
# Created: 2021/01/09 09:52:36 by kawish #+# #+# #
# Updated: 2021/03/05 18:37:24 by kawish ######## odam.nl #
# #
# **************************************************************************** #
NAME = libftprintf.a
OBJ_FILES = ft_printf.o \
set.o \
format_s.o \
format_c.o \
format_di.o \
format_u.o \
format_x.o \
format_p.o \
utils.o \
uitoa.o \
uitoa_hex.o \
precision_width_diuxp.o
HEADER_FILE = ft_printf.h
CFLAGS = -Wall -Wextra -Werror
LIBFT = libft/libft.a
all: $(NAME)
$(NAME): $(LIBFT) $(OBJ_FILES)
cp $< $@
ar -crs $@ $(OBJ_FILES)
%.o: %.c $(HEADER_FILE)
$(CC) -c $(CFLAGS) -o $@ $<
$(LIBFT):
make -C libft
clean:
make fclean -C libft
rm -f $(OBJ_FILES)
fclean: clean
rm -f $(LIBFT)
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re