-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (44 loc) · 1.53 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vbrazas <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/12/28 19:24:02 by vbrazas #+# #+# #
# Updated: 2018/03/10 13:08:31 by vbrazas ### ########.fr #
# #
# **************************************************************************** #
NAME = ft_ssl
LIB = libft/
SRC_D = src/
SRC = ft_ssl.c \
read_args.c \
error.c \
$(SRC_D)base64.c \
$(SRC_D)put_des.c \
$(SRC_D)des.c \
$(SRC_D)des3.c
OBJ_D = obj/
OBJ = $(addprefix $(OBJ_D), $(SRC:.c=.o))
LFLAGS = -lft -L $(LIB)
IFLAGS = -I $(LIB) -I ./
CFLAGS = -Wall -Wextra -Werror
all: $(NAME)
$(NAME): $(OBJ)
make -C $(LIB)
gcc -o $(NAME) $(CFLAGS) $(OBJ) $(LFLAGS)
$(OBJ): | $(OBJ_D)
$(OBJ_D):
mkdir -p $(OBJ_D)$(SRC_D)
$(OBJ_D)%.o: %.c
gcc $(CFLAGS) $(IFLAGS) -o $@ -c $<
clean:
rm -f $(OBJ)
make clean -C $(LIB)
fclean: clean
rm -f $(NAME)
rm -rf $(OBJ_D)
make fclean -C $(LIB)
re: fclean all
.PHONY: all clean fclean re