-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (46 loc) · 1.86 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
63
64
65
66
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: cgleason <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/09/06 14:09:11 by cgleason #+# #+# #
# Updated: 2018/09/15 18:40:12 by cgleason ### ########.fr #
# #
# **************************************************************************** #
NAME = lem-in
NAME2 = viz
CC = @gcc
CFLAGS = -Wall -Wextra -Werror
SRC = algo/main.c algo/qops.c algo/dict.c algo/algo.c \
algo/flow.c algo/free_print.c algo/helpers.c algo/adders.c \
md5/md5_bitset.c md5/md5_dispatch.c \
md5/md5_phase.c md5/md5_prmtvs.c md5/md5_rounds.c \
VSRC = visual/viz.c visual/parse_dickens.c visual/print_dickens.c \
visual/fill.c visual/v_parse.c visual/normnodelink.c \
visual/edge_findclean.c visual/node_findclean.c \
OBJS = $(SRC:.c=.o)
VOBJS = $(VSRC:.c=.o)
LIBDIR = libft
LIB = $(LIBDIR)/libft.a
both: $(NAME) $(NAME2)
$(NAME): $(OBJS) $(LIB)
$(CC) $(CFLAGS) -o $(NAME) $(OBJS) $(LIB)
$(NAME2): $(VOBJS) $(LIB)
$(CC) $(CFLAGS) -o $(NAME2) $(VOBJS) $(LIB)
$(LIB):
@make -C $(LIBDIR)
.PHONY: clean fclean all re debug both
debug: $(SRC) $(LIB)
$(CC) -o debug -g $(SRC) $(LIB)
clean:
@rm -f $(OBJS)
@rm -f $(VOBJS)
@make -C $(LIBDIR) clean
fclean: clean
@rm -f $(NAME)
@rm -f $(NAME2)
@make -C $(LIBDIR) fclean
all: $(NAME) $(NAME2)
re: fclean all