-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (53 loc) · 1.88 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jeongrol <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/06/20 21:32:47 by jeongrol #+# #+# #
# Updated: 2023/07/22 21:03:25 by jeongrol ### ########.fr #
# #
# **************************************************************************** #
NAME = pipex
BONUS_NAME = bonus_pipex
CC = cc
CFLAGS = -Wall -Wextra -Werror -g3 -fsanitize=address
RM = rm -f
HEADER = mandatory/pipex.h
BONUS_HEADER = bonus/bonus_pipex.h
SRCS = mandatory/main.c \
mandatory/util_libft.c \
mandatory/util_pipex.c \
mandatory/util_split.c \
mandatory/set_info.c \
mandatory/child.c \
BONUS_SRCS = bonus/bonus_main.c \
bonus/bonus_util_libft.c \
bonus/bonus_util_pipex.c \
bonus/bonus_util_split.c \
bonus/get_next_line_bonus.c \
bonus/get_next_line_utils_bonus.c \
bonus/bonus_set.c \
bonus/bonus_exec.c \
bonus/bonus_child.c \
OBJS = ${SRCS:.c=.o}
BONUS_OBJS = ${BONUS_SRCS:.c=.o}
all: $(NAME)
clean:
$(RM) $(OBJS)
$(RM) $(BONUS_OBJS)
fclean: clean
$(RM) $(NAME)
$(RM) $(BONUS_NAME)
re:
make fclean
make all
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(NAME): $(OBJS) $(HEADER)
$(CC) $(CFLAGS) -o $(NAME) $(OBJS)
bonus: $(BONUS_NAME)
$(BONUS_NAME): $(BONUS_OBJS) $(BONUS_HEADER)
$(CC) $(CFLAGS) -o $(NAME) $(BONUS_OBJS)
.PHONY: all clean fclean re bonus