-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
76 lines (59 loc) · 2.3 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gcollet <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/07/08 11:07:37 by gcollet #+# #+# #
# Updated: 2022/02/06 10:24:56 by gcollet ### ########.fr #
# #
# **************************************************************************** #
PROG = pipex
PROG_B = pipex_bonus
SRCS = srcs/pipex.c srcs/utils.c
OBJS = ${SRCS:.c=.o}
MAIN = srcs/pipex.c
SRCS_B = srcs/pipex_bonus.c srcs/utils.c srcs/utils_bonus.c
OBJS_B = ${SRCS_B:.c=.o}
MAIN_B = srcs/pipex_bonus.c
HEADER = -Iincludes
CC = gcc
CFLAGS = -Wall -Wextra -Werror -g
.c.o: %.o : %.c
@gcc ${CFLAGS} ${HEADER} -c $< -o $(<:.c=.o)
all: ${PROG}
${PROG}: ${OBJS}
@echo "\033[33m----Compiling lib----"
@make re -C ./libft
@$(CC) ${OBJS} -Llibft -lft -o ${PROG}
@echo "\033[32mPipex Compiled! ᕦ(\033[31m♥\033[32m_\033[31m♥\033[32m)ᕤ\n"
bonus: ${PROG_B}
${PROG_B}: ${OBJS_B}
@echo "\033[33m----Compiling lib----"
@make re -C ./libft
@$(CC) ${OBJS_B} -Llibft -lft -o ${PROG_B}
@echo "\033[32mPipex Bonus Compiled! ᕦ(\033[31m♥\033[32m_\033[31m♥\033[32m)ᕤ\n"
clean:
@make clean -C ./libft
@rm -f ${OBJS} ${OBJS_B}
fclean: clean
@make fclean -C ./libft
@rm -f $(NAME)
@rm -f ${PROG}
@echo "\n\033[31mDeleting EVERYTHING! ⌐(ಠ۾ಠ)¬\n"
re: fclean all
re_bonus: fclean bonus
party:
@printf "\033c"
@echo "\n\033[35m♪┏(・o・)┛♪"
@sleep 1
@printf "\033c"
@echo "\033[1;33m♪┗(・o・)┓♪"
@sleep 1
@printf "\033c"
@echo "\n\033[36m♪┏(・o・)┛♪"
@sleep 1
@printf "\033c"
@echo "\033[34m♪┗(・o・)┓♪\n"
.PHONY: all clean fclean re re_bonus bonus party