Skip to content

Commit

Permalink
✨ aesthetics change: pimp my makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis M committed Nov 9, 2019
1 parent e4fc60a commit 43f77ea
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# By: amonteli <amonteli@student.le-101.fr> +:+ +: +: +:+ #
# #+# #+ #+ #+# #
# Created: 2019/10/12 14:02:26 by amonteli #+# ## ## #+# #
# Updated: 2019/10/26 22:10:46 by amonteli ### #+. /#+ ###.fr #
# Updated: 2019/11/09 16:29:34 by amonteli ### #+. /#+ ###.fr #
# / #
# / #
# **************************************************************************** #
Expand Down Expand Up @@ -67,18 +67,22 @@ OBJS = $(SRCS:.c=.o)
all : $(NAME)

$(NAME) : $(OBJS)
ar -rcs $(NAME) $(OBJS)
@ar -rcs $(NAME) $(OBJS)
@echo "\033[90m[\033[32mSuccess\033[90m]\033[32m Successfully compiled Libft.\033[0m"

bonus : $(OBJS) $(OBJS_B)
ar -rcs $(NAME) $(OBJS) $(OBJS_B)

%.o:%.c $(HEADER)
gcc -Wall -Wextra -Werror -o $@ -c $< -I $(HEADER)
@gcc -Wall -Wextra -Werror -o $@ -c $< -I $(HEADER)
@echo "\033[90m[\033[32mOK\033[90m]\033[34m Compiling $<\033[0m"

clean :
/bin/rm -f $(OBJS) $(OBJS_B)
@/bin/rm -f $(OBJS) $(OBJS_B)
@echo "\033[90m[\033[91mDeleting\033[90m]\033[31m Object files deleted\033[0m"

fclean : clean
/bin/rm -f $(NAME)
@/bin/rm -f $(NAME)
@echo "\033[90m[\033[91mDeleting\033[90m]\033[31m Libft.a deleted.\033[0m"

re : fclean all

0 comments on commit 43f77ea

Please sign in to comment.