From 898d00738e9b38163d3ffa6e8528948b2a3e590f Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Fri, 13 Oct 2023 11:51:50 +0200 Subject: [PATCH] Create include dir for main.h and patch Makefile acordingly. --- Makefile | 3 ++- main.h => include/main.h | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename main.h => include/main.h (100%) diff --git a/Makefile b/Makefile index 179b373..e1292d5 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ CFLAGS = -Wall -Wextra -Werror -g GNLDIR = ../ SRCDIR = src/ OBJDIR = obj/ +INCLUDE = include/ SRCS = $(shell find $(SRCDIR) -name '*.c' -type f -printf "%f\n") GNLSRCS = get_next_line.c get_next_line_utils.c @@ -19,7 +20,7 @@ $(NAME) : $(OBJS) $(GNLOBJS) $(CC) $(CFLAGS) $^ -o $@ $(OBJS) : $(OBJDIR)%.o : $(SRCDIR)%.c | $(OBJDIR) - $(CC) $(CFLAGS) -c $< -o $@ -I$(GNLDIR) -I. + $(CC) $(CFLAGS) -c $< -o $@ -I$(GNLDIR) -I$(INCLUDE) $(GNLOBJS) : $(OBJDIR)%.o : $(GNLDIR)%.c | $(OBJDIR) ifndef BUFFER_SIZE diff --git a/main.h b/include/main.h similarity index 100% rename from main.h rename to include/main.h -- 2.30.2