# **************************************************************************** # # # # .--. _ # # Makefile :+: :+: :+: # # |:_/ || |_ _ ___ __ # # By: djonker // \ \ __| | | \ \/ / # # (| | )|_| |_| |> < # # Created: 2021/08/19 15:20:20 by djonker /'\_ _/`\__|\__,_/_/\_\ # # Updated: 2023/05/22 07:37:03 by houtworm ### ########.fr # # # # **************************************************************************** # NAME =philo_bonus CC =gcc CFLAGS =-Wall -Werror -Wextra -g -fsanitize=address RM =rm -f SRC =src/philo.c\ src/init.c\ src/util.c\ src/watch.c OBJ =$(SRC:src/%.c=obj/%.o) all: $(NAME) clean: @$(RM) -r obj @printf "\e[1;35mCleaned Object Files\n\e[0;00m" fclean: clean @$(RM) philo_bonus @printf "\e[1;31mCleaned Executables\n\e[0;00m" re: fclean all $(OBJ): $(SRC) @mkdir -p $(dir $@) @printf "\e[1;34mBuilding $@\n\e[0;00m" @$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@ philo_bonus:$(OBJ) @printf "\e[1;36mCompiling $@\n\e[0;00m" @$(CC) $(CFLAGS) $^ -o $@ @printf "\e[1;32mDone\e[0;00m\n" .PHONY: all clean fclean re