-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (44 loc) · 894 Bytes
/
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
_SRCS_ = printf\
putchar_str\
itoa_plus\
uitoa_plus\
uitox_plus\
uiptox_plus\
strlen\
strchr\
calloc\
bzero\
memset\
SRCS_ = $(addprefix ft_, $(_SRCS_))
SRCS = $(addsuffix .c, $(SRCS_))
OBJS = $(SRCS:.c=.o)
NAME = libftprintf.a
CC = cc
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
AR = ar -rcs
OUT = a.out
MAIN = main.c
$(NAME) : $(OBJS)
$(AR) $(NAME) $(OBJS)
all : $(NAME)
out : all
$(CC) $(CFLAGS) $(NAME) $(MAIN) ; time ./$(OUT)
clean :
$(RM) $(OBJS)
fclean : clean
$(RM) $(NAME)
oclean : fclean
$(RM) $(OUT)
re : fclean all
norm :
@norminette ft_printf.h $(SRCS)
normd :
@norminette -R CheckDefine ft_printf.h $(SRCS)
normf :
@norminette -R CheckForbiddenSourceHeader ft_printf.h $(SRCS)
commit : fclean
git add .
git commit -m "commit through Makefile"
git log
.PHONY : all out clean fclean oclean re norm commit