-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (63 loc) · 2.13 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mrantil <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/01/26 15:01:43 by mrantil #+# #+# #
# Updated: 2022/08/27 13:43:02 by mrantil ### ########.fr #
# #
# **************************************************************************** #
NAME = libftprintf.a
FLAGS = -Wall -Werror -Wextra -O3
LIBFT = libft
LIBS = libft.a
SRCS = srcs/ft_printf.c \
srcs/print_int_address.c \
srcs/print_c_str.c \
srcs/print_uint_binary.c \
srcs/print_null_float_oct.c \
srcs/print_hex_astrix_procent.c \
srcs/float_work.c \
srcs/flags_plus_minus_hash_null.c \
srcs/flags_proc_zero_space.c \
srcs/width_and_precision.c \
srcs/tools_write_flags.c \
srcs/tools_itoa_b_getit_nullprint.c \
srcs/colors.c
OBJS = ft_printf.o \
print_int_address.o \
print_c_str.o \
print_uint_binary.o \
print_null_float_oct.o \
print_hex_astrix_procent.o \
float_work.o \
flags_plus_minus_hash_null.o \
flags_proc_zero_space.o \
width_and_precision.o \
tools_write_flags.o \
tools_itoa_b_getit_nullprint.o \
colors.o
all: $(NAME)
$(NAME): $(OBJ)
@echo "Compiling(libft)..."
@make -C $(LIBFT)
@echo "libft done."
@cp $(LIBFT)/$(LIBS) ./$@
@echo "Compiling(libftprintf)..."
@gcc $(FLAGS) -c $(SRCS)
@ar rc $(NAME) $(OBJS)
@echo "$@ created"
@ranlib $@
@echo "$@ indexed"
clean:
@echo "Cleaning object files..."
@rm -f $(OBJS)
@make -C libft clean
fclean: clean
@echo "Cleaning binary..."
@make -C libft fclean
@rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re