-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 1.26 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: caeduard <caeduard@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/02/16 19:50:15 by coder #+# #+# #
# Updated: 2022/02/17 11:54:33 by caeduard ### ########.fr #
# #
# **************************************************************************** #
CC = gcc
FLAGS = -Wall -Wextra -Werror
NAME = pipex
SRC_DIR = utils/
INC_DIR = includes/
SRC_FILES = $(wildcard $(SRC_DIR)*.c)
OBJ_FILES = $(SRC_FILES:.c=.o)
all: $(NAME)
$(NAME): $(OBJ_FILES)
$(CC) $(FLAGS) -I $(INC_DIR) $^ -o $@
%.o: %.c
$(CC) $(FLAGS) -I $(INC_DIR) -c $< -o $@
clean:
rm -f $(OBJ_FILES)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re