Makefile error
This commit is contained in:
parent
d3d063d793
commit
9502638ab6
@ -1,19 +1,19 @@
|
|||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
# #
|
# #
|
||||||
# .--. _ #
|
# .--. _ #
|
||||||
# Makefile :+: :+: :+: #
|
# Makefile |o_o || | #
|
||||||
# |:_/ || |_ _ ___ __ #
|
# |:_/ || |_ _ ___ __ #
|
||||||
# By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / #
|
# By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / #
|
||||||
# (| | )|_| |_| |> < #
|
# (| | )|_| |_| |> < #
|
||||||
# Created: 2021/08/19 15:20:20 by djonker /'\_ _/`\__|\__,_/_/\_\ #
|
# Created: 2021/08/19 15:20:20 by djonker /'\_ _/`\__|\__,_/_/\_\ #
|
||||||
# Updated: 2023/05/22 07:23:22 by houtworm ### ########.fr #
|
# Updated: 2023/06/15 23:37:40 by houtworm \___)=(___/ #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
NAME =philo
|
NAME =philo
|
||||||
CC =gcc
|
CC =gcc
|
||||||
CFLAGS =-Wall -Werror -Wextra# -g -fsanitize=thread
|
CFLAGS =-Wall -Werror -Wextra# -g -fsanitize=thread
|
||||||
RM =rm -f
|
RM =rm -rf
|
||||||
SRC =src/philo.c\
|
SRC =src/philo.c\
|
||||||
src/init.c\
|
src/init.c\
|
||||||
src/util.c
|
src/util.c
|
||||||
@ -22,23 +22,21 @@ OBJ =$(SRC:src/%.c=obj/%.o)
|
|||||||
all: $(NAME)
|
all: $(NAME)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@$(RM) -r obj
|
@$(RM) obj
|
||||||
@printf "\e[1;35mCleaned Object Files\n\e[0;00m"
|
@printf "\e[1;35mCleaned Object Files\n\e[0;00m"
|
||||||
|
|
||||||
fclean: clean
|
fclean: clean
|
||||||
@$(RM) philo
|
@$(RM) $(NAME)
|
||||||
@printf "\e[1;31mCleaned Executables\n\e[0;00m"
|
@printf "\e[1;31mCleaned Executables\n\e[0;00m"
|
||||||
|
|
||||||
re: fclean all
|
re: fclean all
|
||||||
|
|
||||||
$(NAME):
|
|
||||||
|
|
||||||
$(OBJ): $(SRC)
|
$(OBJ): $(SRC)
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@printf "\e[1;34mBuilding $@\n\e[0;00m"
|
@printf "\e[1;34mBuilding $@\n\e[0;00m"
|
||||||
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@
|
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@
|
||||||
|
|
||||||
philo: $(OBJ)
|
$(NAME): $(OBJ)
|
||||||
@printf "\e[1;36mCompiling $@\n\e[0;00m"
|
@printf "\e[1;36mCompiling $@\n\e[0;00m"
|
||||||
@$(CC) $(CFLAGS) $^ -o $@
|
@$(CC) $(CFLAGS) $^ -o $@
|
||||||
@printf "\e[1;32mDone\e[0;00m\n"
|
@printf "\e[1;32mDone\e[0;00m\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user