-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (30 loc) · 1.36 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: darkwater <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/07/23 07:27:14 by darkwater #+# #+# #
# Updated: 2023/07/26 01:51:01 by darkwater ### ########.fr #
# #
# **************************************************************************** #
NAME = play-hangman
SRC = main.c secret_input.c user_input.c str_functions.c ascii_art_lives.c ft_ascii_art.c
SRCPRE = $(addprefix $(PREFIX), $(SRC))
OBJS = $(SRCPRE:c=o)
PREFIX = ./src/
HEADER = ./includes/
CC = cc
CFLAGS = -g -Wall -Wextra -Werror
all: $(NAME)
%.o: %.c
$(CC) $(CFLAGS) -c -I $(HEADER) $< -o $(<:.c=.o)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(NAME)
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re