-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (44 loc) · 1.48 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: qdegraev <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/12/07 08:41:32 by qdegraev #+# #+# #
# Updated: 2016/03/31 14:45:21 by qdegraev ### ########.fr #
# #
# **************************************************************************** #
LIBPATH = libft
LIB = $(LIBPATH)/libft.a
NAME = minishell
CC = clang
VPATH = src:../include
INCLUDES = include/
CFLAGS = -g -Wall -Wextra -Werror
LDFLAGS = -L libft -lft
SRC = env.c \
set_unset_env.c \
minishell.c \
get_path.c \
command_cd.c \
tools.c \
prompt.c \
get_env.c \
do_fork.c \
OBJ = $(SRC:.c=.o)
all: $(LIB) $(NAME)
$(NAME): $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $< -I $(INCLUDES)
$(LIB):
make -C $(LIBPATH)
clean:
make clean -C $(LIBPATH)
rm -f $(OBJ)
fclean: clean
make fclean -C $(LIBPATH)
rm -f $(NAME)
re: fclean all
.PHONY: all re clean flcean