-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (42 loc) · 1.86 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
54
55
56
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rodrodri <[email protected] > +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/05 12:16:57 by rodrodri #+# #+# #
# Updated: 2022/01/26 11:44:58 by rodrodri ### ########.fr #
# #
# **************************************************************************** #
NAME := libftprintf.a
CC := clang
CFLAGS := -Wall -Werror -Wextra -Iincludes -Ilibft/includes
SRCS = ft_printf.c pf_parsing.c pf_parsing_utils.c
SRCS += pf_numeric_converter.c pf_numeric_utils.c pf_numeric_utils2.c
SRCS += pf_to_percent_converter.c pf_to_char_converter.c
SRCS += pf_to_string_converter.c pf_to_addr_converter.c
SRCS += pf_to_int_converter.c pf_to_uint_converter.c pf_to_hex_converter.c
SRCS += pf_to_upphex_converter.c pf_to_octal_converter.c
SRCS += pf_to_float_converter.c pf_to_float_converter2.c
SRCS += pf_to_bin_converter.c pf_to_bin_converter2.c
# SRCS += debug.c
vpath %.c ./srcs
OBJS_DIR := ./objs
OBJS := $(patsubst %,$(OBJS_DIR)/%,$(SRCS:.c=.o))
all: $(NAME)
$(NAME): $(OBJS)
cp libft/libft.a $(NAME)
ar rcs $(NAME) $(OBJS)
$(OBJS_DIR)/%.o: %.c
make -sC libft
mkdir -p $(OBJS_DIR)
$(CC) $(CFLAGS) -o $@ -c $<
clean:
/bin/rm -rf $(OBJS_DIR)
make -sC libft clean
fclean: clean
/bin/rm -f $(NAME)
make -sC libft fclean
re: fclean all
.PHONY: all clean fclean re