-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·64 lines (49 loc) · 1.66 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
64
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tmerlier <tmerlier@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2013/11/27 16:01:27 by tmerlier #+# #+# #
# Updated: 2015/06/27 15:45:04 by tmerlier ### ########.fr #
# #
# **************************************************************************** #
NAME = push_swap2
LIB = libft/
HEADER = includes/
DIRSRC = srcs/
FLAGS = -Wall -Wextra -Werror -g
SRC = main.c \
push_swap2.c \
list.c \
actions.c \
cpy_list.c \
options.c \
check.c \
get.c \
print.c \
swap.c \
push.c \
rotate.c \
rev_rotate.c \
error.c
OBJ = $(SRC:.c=.o)
.PHONY: all clean fclean re
all: init $(NAME)
init:
@echo "\033[0;32m $(NAME) PROJECT\033[0m"
$(NAME): $(OBJ)
@make -s -C $(LIB)
@gcc $(FLAGS) -o $(NAME) $^ -L$(LIB) -lft
%.o: $(DIRSRC)%.c
@gcc $(FLAGS) -o $@ -c $< -I$(LIB)$(HEADER) -I$(HEADER)
clean:
@rm -f $(OBJ)
@make clean -s -C $(LIB)
@echo "\033[4;32mDeleted\033[0;33m $(OBJ)\033[0m"
fclean: clean
@rm -f $(NAME)
@make fclean -s -C $(LIB)
@echo "\033[4;32mDeleted\033[0;33m $(NAME)\033[0m"
re: fclean all