This repository has been archived by the owner on Jan 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (46 loc) · 1.75 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: arizzell <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/01/22 16:18:33 by arizzell #+# #+# #
# Updated: 2018/01/22 16:18:35 by arizzell ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_ls
SRCS_PATH = ./
OBJ_PATH = obj/
LIBFT_PATH = libft/
FLAGS = -Wall -Werror -Wextra
INC = -I ./ -I ./$(LIBFT_PATH)
SRCS_NAME = core_recursive.c \
getter.c \
main.c \
getter4.c \
getter3.c \
getter2.c \
getter5.c \
ordering.c \
print.c \
tobject.c \
recoursive.c \
tparams.c
SRCS = $(addprefix $(SRCS_PATH), $(SRCS_NAME))
OBJ = $(addprefix $(OBJ_PATH), $(SRCS_NAME:.c=.o))
all: $(NAME)
$(NAME): $(OBJ)
@make -C $(LIBFT_PATH)
@gcc $(FLAGS) $(OBJ) $(INC) -L $(LIBFT_PATH) -lft -o $(NAME)
$(OBJ_PATH)%.o: $(SRCS_PATH)%.c
@mkdir -p obj
@gcc -c $(FLAGS) $(INC) $< -o $@
clean:
@make -C $(LIBFT_PATH)/ clean
@/bin/rm -rf $(OBJ_PATH)
fclean: clean
@make -C $(LIBFT_PATH)/ fclean
@/bin/rm -rf $(NAME)
re: fclean all
.PHONY: all, clean, fclean, re