-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (30 loc) · 1.39 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mac <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/12/21 14:50:13 by yagnaou #+# #+# #
# Updated: 2022/02/21 18:39:49 by mac ### ########.fr #
# #
# **************************************************************************** #
NAME = pipex.a
CFLAGS = -Wall -Wextra -Werror
SRCS = pipex.c pipex_utils.c pipex_utils2.c
BSCRS = pipex_bonus.c pipex_utils.c pipex_utils2.c
OBJS = $(SRCS:.c=.o)
BOBJS = $(BSCRS:.c=.o)
all : $(NAME)
$(CC) $(CFLAGS) pipex.c $(NAME) -o pipex
bonus : $(BOBJS)
$(CC) $(CFLAGS) pipex_bonus.c $(NAME) -o pipex_bonus
$(NAME) : $(OBJS)
%.o : %.c
$(CC) $(CFLAGS) -c $<
ar rc $(NAME) $@
clean :
@rm -rf $(OBJS) $(BOBJS)
fclean : clean
@rm -rf $(NAME) $(OBJS) $(BOBJS) pipex pipex_bonus
re : fclean all bonus pipex pipex_bonus