-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (51 loc) · 1.69 KB
/
Makefile
File metadata and controls
68 lines (51 loc) · 1.69 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: egarcia- <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/12/02 14:00:39 by egarcia- #+# #+# #
# Updated: 2019/12/20 16:11:12 by egarcia- ### ########.fr #
# #
# **************************************************************************** #
C = clang
NAME = libftprintf.a
FLAGS = -Wall -Wextra -Werror -O2
LIBFT = libft
DIR_S = sources
DIR_O = temporary
HEADER = include
SOURCES = ft_printf.c \
ft_printf_sc.c \
ft_checktype.c \
ft_initzero.c \
ft_parse_chars.c \
ft_printf_x_id.c \
ft_printf_p.c \
ft_parse_numbers.c
SRCS = $(addprefix $(DIR_S)/,$(SOURCES))
OBJS = $(addprefix $(DIR_O)/,$(SOURCES:.c=.o))
all: $(NAME)
$(NAME): $(OBJS)
@make -C $(LIBFT)
@cp libft/libft.a ./$(NAME)
@ar rc $(NAME) $(OBJS)
@ranlib $(NAME)
$(DIR_O)/%.o: $(DIR_S)/%.c
@mkdir -p temporary
@$(CC) -I $(HEADER) -o $@ -c $<
norme:
norminette ./libft/
@echo
norminette ./$(HEADER)/
@echo
norminette ./$(DIR_S)/
clean:
@rm -f $(OBJS)
@rm -rf $(DIR_O)
@make clean -C $(LIBFT)
fclean: clean
@rm -f $(NAME)
@make fclean -C $(LIBFT)
re: fclean all