-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 1.47 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vfurmane <vfurmane@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/06/14 13:23:55 by vfurmane #+# #+# #
# Updated: 2021/06/22 21:56:00 by vfurmane ### ########.fr #
# #
# **************************************************************************** #
NAME = pipex
SRCS = $(addprefix srcs/, execute_command.c init.c main.c parse_command.c put.c \
$(addprefix utils/, ft_free_array.c ft_getenv.c ft_memcpy.c ft_split.c ft_strccmp.c ft_strcdup.c ft_strchr.c ft_strjoin.c ft_strlcpy.c ft_strlen.c))
OBJS = $(SRCS:.c=.o)
INCL = $(addprefix -I , includes)
CC = clang
CFLAGS = -Wall -Wextra -Werror
RM = rm -f
%.o: %.c
$(CC) $(CFLAGS) -c $< $(INCL) -o $@
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $^ -o $(NAME)
bonus: all
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(NAME)
re: fclean all
.PHONY: all bonus nosanitize clean fclean re