From: Lukas Jiriste Date: Wed, 28 Jun 2023 08:14:37 +0000 (+0200) Subject: Added Makefile to Ex. 05. X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=fcb5fc543eb8185a2b98c885f0661a3505c03b3a;p=42%2FC_11.git Added Makefile to Ex. 05. --- diff --git a/ex05/Makefile b/ex05/Makefile new file mode 100644 index 0000000..8d3288b --- /dev/null +++ b/ex05/Makefile @@ -0,0 +1,28 @@ +CC = cc +CFLAGS = -Wall -Wextra -Werror + +RM = rm -f + +INCDIR = ./headers +SRCDIR = ./sources +SOURCES = $(shell find $(SRCDIR) -name "*.c") +OBJECTS = $(SOURCES:.c=.o) + +NAME = do-op + +all : $(NAME) + +$(NAME) : $(OBJECTS) + $(CC) $(CFLAGS) -o $(NAME) $(OBJECTS) + +%.o : %.c + $(CC) $(CFLAGS) -c -o $@ $< -I $(INCDIR) + +clean : + $(RM) $(OBJECTS) + +fclean : clean + $(RM) $(NAME) + +re : fclean + $(MAKE) all