fillit/Makefile
Gregory Tertyshny 60119d12bb some new changes
2016-12-21 16:47:36 +02:00

75 lines
1.9 KiB
Makefile

# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gtertysh <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/12/14 16:54:48 by gtertysh #+# #+# #
# Updated: 2016/12/20 20:37:58 by gtertysh ### ########.fr #
# #
# **************************************************************************** #
NAME = fillit
SRCDIR = ./src/
OBJDIR = ./obj/
SRC_FILES = main.c \
fillit.c \
glue_figure.c \
move_up_left.c \
read_file.c \
string_to_table.c \
to_letters.c \
dancing_links.c \
get_types.c \
get_amount.c \
test!_check.c \
test!_print_one_string.c \
test!_print_table.c \
check_raw_string.c
OBJ_FILES = $(SRC_FILES:.c=.o)
SRC = $(addprefix $(SRCDIR), $(SRC_FILES))
OBJ = $(addprefix $(OBJDIR), $(OBJ_FILES))
INC = -I ./inc -I $(LIBFOLDER)
LIB = libft.a
LIBFLAGS = -lft -L $(LIBFOLDER)
LIBFOLDER = ./libft/
FLAGS = -Werror -Wextra -Wall
CC = clang
all: $(NAME)
$(NAME): $(OBJ) $(LIBFOLDER)$(LIB)
$(CC) $(FLAGS) $(OBJ) $(LIBFLAGS) -o $(NAME)
$(OBJDIR)%.o : $(SRCDIR)%.c
$(CC) $(FLAGS) $(INC) -c $< -o $@
$(LIBFOLDER)$(LIB):
make -C $(LIBFOLDER)
clean:
rm -rf $(OBJ)
fclean: clean
rm -rf $(NAME)
libclean:
make clean -C $(LIBFOLDER)
libfclean:
make fclean -C $(LIBFOLDER)
re: fclean libfclean all