-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 1.45 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mvan-pee <mvan-pee@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/12/11 16:39:29 by mvpee #+# #+# #
# Updated: 2023/12/12 12:53:53 by mvan-pee ### ########.fr #
# #
# **************************************************************************** #
NAME = pipex
LIBFT = srcs/libft
SRCS = srcs/main.c \
srcs/utils.c \
srcs/find_path.c
OBJS = $(SRCS:.c=.o)
CFLAGS = -I$(LIBFT) -Wall -Werror -Wextra
all: $(NAME)
$(LIBFT)/libft.a:
$(MAKE) -C $(LIBFT)
$(NAME): $(OBJS) $(LIBFT)/libft.a
gcc $(OBJS) -L$(LIBFT) -lft -o $(NAME)
%.o: %.c
gcc $(CFLAGS) -c $< -o $@
clean:
$(MAKE) -C $(LIBFT) clean
rm -f $(OBJS)
fclean: clean
$(MAKE) -C $(LIBFT) fclean
rm -f $(NAME)
re: fclean all
run: all
./$(NAME) input "ls -l" "wc -l" output
test: all
valgrind --leak-check=full ./$(NAME) input "ls" "wc" output
.PHONY: all clean fclean re