-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
65 lines (46 loc) · 2.21 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: hhaddouc <hhaddouc@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/11/18 13:48:39 by hhaddouc #+# #+# #
# Updated: 2021/11/20 16:10:24 by hhaddouc ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
CFLAGS = -Wall -Wextra -Werror
NAME = mandatory/mandatory.a
BONUS = pipex_bonus/bonus.a
AR = ar rc
SRC = mandatory/pipex.c mandatory/utils.c mandatory/utils2.c\
mandatory/libft_fun/ft_putchar_fd.c mandatory/libft_fun/ft_putstr_fd.c\
mandatory/libft_fun/ft_split.c mandatory/libft_fun/ft_strchr.c mandatory/libft_fun/ft_strdup.c\
mandatory/libft_fun/ft_strjoin.c mandatory/libft_fun/ft_strlen.c \
mandatory/libft_fun/ft_strncmp.c mandatory/libft_fun/ft_substr.c\
OBG = $(SRC:.c=.o)
B_SRC = pipex_bonus/pipex_bonus.c pipex_bonus/utils_bonus.c pipex_bonus/pipex_utils_bonus2.c\
pipex_bonus/child.c pipex_bonus/libft_fun_bonus/ft_putstr_fd.c\
pipex_bonus/libft_fun_bonus/ft_split.c pipex_bonus/libft_fun_bonus/ft_strchr.c\
pipex_bonus/libft_fun_bonus/ft_strdup.c pipex_bonus/libft_fun_bonus/ft_strjoin.c\
pipex_bonus/libft_fun_bonus/ft_strlen.c pipex_bonus/libft_fun_bonus/ft_strncmp.c\
pipex_bonus/libft_fun_bonus/ft_substr.c pipex_bonus/libft_fun_bonus/ft_putchar_fd.c\
B_OBG = $(B_SRC:.c=.o)
all: $(NAME)
$(NAME) : $(OBG)
$(AR) $(NAME) $(OBG)
$(CC) $(CFLAGS) $(OBG) $(NAME) -o pipex
bonus: $(BONUS)
$(BONUS): $(B_OBG)
$(AR) $(BONUS) $(B_OBG)
$(CC) $(CFLAGS) $(B_OBG) -o pipex
clean:
rm -rf $(OBG)
rm -rf $(B_OBG)
fclean: clean
rm -f pipex
rm -rf $(NAME)
rm -rf $(BONUS)
re: fclean all
.PHONY: all clean fclean re