-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (45 loc) · 1.71 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
53
54
55
56
57
58
59
60
61
62
63
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: aulamber <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2014/04/30 18:22:12 by aulamber #+# #+# #
# Updated: 2014/05/04 20:47:55 by aulamber ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_select
SRC = ./
INCDIR = includes/
SOURCE = main.c \
list_functions.c \
other_functions.c \
other_functions_3.c \
OBJ = $(SOURCE:.c=.o)
LIB = libft/libft.a
LINE = -Llibft -lft -L/usr/lib/ -ltermcap
CC = gcc
FLAG = -I $(INCDIR) -Wall -Wextra -Werror -g
RED = \033[33;31m
BLUE = \033[33;34m
GREEN = \033[33;32m
RESET = \033[0m
.PHONY: all re fclean
all: $(NAME)
$(LIB):
@$(MAKE) -C libft/
$(NAME): $(LIB) $(OBJ)
@$(CC) -o $(NAME) $(FLAG) $^ $(LINE)
@echo "[$(GREEN)Compilation $(BLUE)$(NAME) $(GREEN)ok$(RESET)]"
%.o: %.c
@$(CC) -c -o $@ $(FLAG) $^
clean:
@cd libft/ && $(MAKE) $@
@rm -f $(OBJ)
@echo "[$(RED)Supression des .o de $(BLUE)$(NAME) $(GREEN)ok$(RESET)]"
fclean: clean
@cd libft/ && $(MAKE) $@
@rm -f $(NAME)
@echo "[$(RED)Supression de $(BLUE)$(NAME) $(GREEN)ok$(RESET)]"
re: fclean all