-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (52 loc) · 1.89 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mwen <mwen@student.42wolfsburg.de> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/05/30 17:49:17 by mwen #+# #+# #
# Updated: 2021/08/31 16:42:49 by mwen ### ########.fr #
# #
# **************************************************************************** #
SRCS_DIR = src/
SRCS = push_swap.c check.c error.c init_stack.c get.c sort.c\
swap.c rotate.c push.c has.c sort_large.c sort_helper.c
SRCS_WITHPATH = $(addprefix $(SRCS_DIR), $(SRCS))
OBJS = $(SRCS_WITHPATH:.c=.o)
NAME = push_swap
LIB = libft.a
CC = gcc
RM = rm -f
FLAGS = -Wall -Werror -Wextra
define CAT
|\ _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_) You've got a libft.a
endef
export CAT
define DONE
_._ _,-'""`-._
(,-.`._,'( |\`-/|
`-.-' \ )-`( , o o)
`- \`_`"'- Time to push swup wup
endef
export DONE
all: $(LIB) $(NAME)
$(LIB):
@make -f Makefile.libft
@echo "$$CAT"
$(NAME): $(OBJS)
@$(CC) $(FLAGS) $(OBJS) libft.a -o push_swap
@echo "$$DONE"
clean:
@$(RM) $(OBJS)
@make -f Makefile.libft clean
@echo "Why did you clean me?"
fclean: clean
@$(RM) push_swap
@make -f Makefile.libft fclean
@echo "There is NOTHING LEFT!"
re: fclean all
.PHONY: all clean fclean re