-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (34 loc) · 1.47 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: mhorn <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2017/02/09 12:19:16 by mhorn #+# #+# #
# Updated: 2017/02/09 12:40:53 by mhorn ### ########.fr #
# #
# **************************************************************************** #
NAME = fillit
CC = gcc
CFLAGS = -Wall -Wextra -Werror -I "fillit.h" -L./libft -lft
OFLAGS = -Wall -Wextra -Werror -I "fillit.h"
FILES = main.c check_tet.c new_tet.c set_tet.c map.c read_in.c tet_types.c solver.c ft_strsplit2.c
LIBFT_DIR = ./libft
OBJS = $(addprefix src/, $(FILES:.c=.o))
all: $(NAME)
$(NAME): $(OBJS)
$(MAKE) -C $(LIBFT_DIR)
$(CC) $(CFLAGS) $(OBJS) -o $(NAME)
src/%.o: ./%.c | src
$(CC) $(OFLAGS) -o $@ -c $^
src:
mkdir src
clean:
rm -rf src/
cd $(LIBFT_DIR) && $(MAKE) clean
fclean: clean
rm -rf $(NAME)
cd $(LIBFT_DIR) && $(MAKE) fclean
re: fclean all
.PHONY: srcs clean fclean re