-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (61 loc) · 2.24 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
73
74
75
76
77
# **************************************************************************** #
# LE - / #
# / #
# Makefile .:: .:/ . .:: #
# +:+:+ +: +: +:+:+ #
# By: mschneid <[email protected]> +:+ +: +: +:+ #
# #+# #+ #+ #+# #
# Created: 2018/01/17 15:05:19 by mschneid #+# ## ## #+# #
# Updated: 2018/02/20 14:05:08 by mschneid ### #+. /#+ ###.fr #
# / #
# / #
# **************************************************************************** #
NAME = libftprintf.a
CC = gcc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
SRCDIR = srcs
SOURCES = srcs/ft_printf.c\
srcs/ft_printf_parsing.c\
srcs/ft_printf_struct.c\
srcs/ft_printf_process.c\
srcs/ft_printf_output.c\
srcs/ft_itoa_base.c\
srcs/ft_printf_process_iud.c\
srcs/ft_printf_process_ho.c\
srcs/ft_printf_process_p.c\
srcs/ft_printf_process_unic.c\
srcs/ft_printf_process_sunis.c\
libft/ft_bzero.c\
libft/ft_isdigit.c\
libft/ft_memdel.c\
libft/ft_memset.c\
libft/ft_strdup.c\
libft/ft_strjoin.c\
libft/ft_strlen.c\
libft/ft_strnew.c\
libft/ft_strsub.c\
libft/ft_toupper.c\
libft/ft_atoi.c\
libft/ft_putstr.c\
libft/ft_putchar.c\
OBJECT = $(SOURCES:.c=.o)
all: $(NAME)
%.o: %.c ft_printf.h
@(echo "\033[32m Librairie :[ \033[31m\t\c")
@(echo "$@ \033[32m]\033[0m \033[0K")
@($(CC) $(CFLAGS) -I ./ -c -o $@ $<)
@(echo "\033[2F")
$(NAME): $(OBJECT)
@(ar rc $(NAME) $(OBJECT))
@(ranlib $(NAME))
@(echo "\033[2K\033[2F")
@(echo "\n\033[32m Librairie compilée\033[0m";)
clean:
@rm -f $(OBJECT)
@echo "\033[1;34mLibft\t\t\033[1;33mCleaning obj\t\033[0;32m[OK]\033[0m"
fclean: clean
@rm -f $(NAME)
@echo "\033[1;34mLibft\t\t\033[1;33mCleaning lib\t\033[0;32m[OK]\033[0m"
re: fclean all
.PHONY: clean fclean re