-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.61 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: rmahjoub <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/09/20 23:14:05 by rmahjoub #+# #+# #
# Updated: 2019/09/21 15:57:43 by rmahjoub ### ########.fr #
# #
# **************************************************************************** #
NAME = rmahjoub.filler
SRC_PATH = srcs
SRC_NAME = extrafun.c\
getter.c\
heatter.c\
inis.c\
placer.c\
play.c\
updatter.c
INC_PATH = -Iincludes -Ilibft/includes
LIB = -Llibft
LIB_NAME = -lft
OBJ_PATH = objs
OBJ_NAME = $(SRC_NAME:.c=.o)
FLAGS = gcc -Wall -Werror -Wextra
SRC = $(addprefix $(SRC_PATH)/,$(SRC_NAME))
OBJ = $(addprefix $(OBJ_PATH)/,$(OBJ_NAME))
all: cmpile_libft $(NAME)
$(NAME): $(OBJ)
$(FLAGS) $(LIB) $(LIB_NAME) $^ -o $@
$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c
@mkdir $(OBJ_PATH) 2> /dev/null || true
$(FLAGS) $(INC_PATH) -o $@ -c $<
cmpile_libft:
make -C libft
clean:
@make -C libft clean
rm -fv $(OBJ)
@rmdir $(OBJ_PATH) 2> /dev/null || true
fclean: clean
@make -C libft fclean
rm -fv $(NAME)
re: fclean all