-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (35 loc) · 1.42 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: rjobert <rjobert@student.42barcelo> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/26 09:32:15 by rjobert #+# #+# #
# Updated: 2023/07/26 09:32:17 by rjobert ### ########.fr #
# #
# **************************************************************************** #
CC = CC
FLAGS = -Wall -Werror -Wextra -MMD -I/.
SRC = pipe.c env_parsing.c utils.c split_quotes.c error_free.c
OBJS = $(SRC:.c=.o)
DEPS = $(SRC:.c=.d)
LIBFT_PATH = ./libft
LIBFT = $(LIBFT_PATH)/libft.a
NAME = pipex
all: $(LIBFT) $(NAME)
-include $(DEPS)
$(NAME): $(OBJS)
$(CC) $(FLAGS) $(OBJS) $(LIBFT) -o $(NAME)
$(LIBFT):
make -C $(LIBFT_PATH) all
%.o: %.c
$(CC) $(FLAGS) -c $< -o $@
clean:
make -C $(LIBFT_PATH) clean
rm -rf $(OBJS) $(DEPS)
fclean: clean
make -C $(LIBFT_PATH) fclean
rm -rf $(NAME)
re: fclean all
.phony: clean re all fclean