pushswap/getnextline/Makefile

45 lines
1.6 KiB
Makefile
Raw Permalink Normal View History

2023-03-01 04:36:58 +01:00
# **************************************************************************** #
# #
# .--. _ #
2023-10-26 19:09:02 +02:00
# Makefile :+: :+: #
2023-03-01 04:36:58 +01:00
# |:_/ || |_ _ ___ __ #
# By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / #
# (| | )|_| |_| |> < #
# Created: 2021/05/27 01:24:02 by djonker /'\_ _/`\__|\__,_/_/\_\ #
2023-10-26 19:09:02 +02:00
# Updated: 2023/10/26 18:00:26 by houtworm ######## odam.nl #
2023-03-01 04:36:58 +01:00
# #
# **************************************************************************** #
2023-03-07 05:42:47 +01:00
NAME =get_next_line.a
CC =gcc
FC =-Wall -Werror -Wextra
RM =rm -f
SRC =src/get_next_line.c\
2023-03-01 04:36:58 +01:00
src/get_next_line_utils.c
OBJ =$(SRC:src/%.c=obj/%.o)
2023-03-07 05:42:47 +01:00
FAR =ar -crs
2023-03-01 04:36:58 +01:00
all: $(NAME)
2023-03-07 05:42:47 +01:00
bonus: $(NAME)
2023-03-01 04:36:58 +01:00
clean:
@$(RM) -r obj
@printf "\e[1;35mCleaned Object Files\n\e[0;00m"
fclean: clean
@$(RM) $(NAME)
@printf "\e[1;31mCleaned Executables\n\e[0;00m"
re: fclean all
2023-10-26 19:09:02 +02:00
$(OBJ): $(SRC) get_next_line.h Makefile
2023-03-07 05:42:47 +01:00
@mkdir -p $(dir $@)
2023-03-01 04:36:58 +01:00
@printf "\e[1;34mBuilding $@\n\e[0;00m"
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@
$(NAME): $(OBJ)
@printf "\e[1;36mCompiling get next line\e[0;00m\n"
@$(FAR) $(NAME) $^ > /dev/null 2>&1
@printf "\e[1;32mDone\e[0;00m\n"