-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
46 lines (35 loc) · 1.46 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
# ************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: shovsepy <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/07/09 18:33:22 by shovsepy #+# #+# #
# Updated: 2021/07/09 18:33:23 by shovsepy ### ########.fr #
# #
# ************************************************************************** #
NAME = push_swap
CHECK = checker
SRCS = $(wildcard src/*.c utils/*.c)
CHECK_SRCS = $(wildcard utils/*.c) src/instructions.c checker.c
OBJS = ${SRCS:.c=.o}
CHECK_OBJS = ${CHECK_SRCS:.c=.o}
CC = gcc
CFLAGS = -Wall -Wextra -Werror -Iincludes
RM = rm -rf
all: ${NAME} ${CHECK}
${NAME}: ${OBJS}
@${MAKE} -C ./libft
@${CC} ${CFLAGS} ${OBJS} ./libft/libft.a -o ${NAME}
${CHECK}: ${CHECK_OBJS}
@${CC} ${CFLAGS} ${CHECK_OBJS} ./libft/libft.a -o ${CHECK}
clean:
@${MAKE} -C ./libft fclean
@${RM} ${OBJS}
@${RM} ${CHECK_OBJS}
fclean: clean
@${RM} ${NAME}
@${RM} ${CHECK}
re: fclean all
.PHONY: all clean fclean re