-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·42 lines (34 loc) · 1.44 KB
/
Makefile
File metadata and controls
executable file
·42 lines (34 loc) · 1.44 KB
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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: pespalie <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/08/01 01:07:20 by pespalie #+# #+# #
# Updated: 2018/10/10 22:11:37 by pespalie ### ########.fr #
# #
# **************************************************************************** #
CC = cc
NAME = ft_select
SRC_NAME = main.c get_longest_word_len.c save_env.c refresh_screen.c\
print_words.c input_loop.c exit.c reduce_env.c
SRC_PATH = ./src/
SRC = $(addprefix $(SRC_PATH)/,$(SRC_NAME))
OBJ = $(SRC:.c=.o)
LIBFTD = ./includes/libft
LDFLAGS = -Wall -Wextra -Werror -g -I$(LIBFTD)
LDLIBS = -L$(LIBFTD) -lft -ltermcap
all: $(NAME)
$(NAME): $(OBJ)
make -C $(LIBFTD)
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
%.o: %.c
$(CC) $(LDFLAGS) -o $@ -c $<
clean:
rm -rf $(OBJ)
make -C $(LIBFTD) clean
fclean: clean
rm -rf $(NAME)
make -C $(LIBFTD) fclean
re: fclean all