From 573eb683a4c7469527f6b536b28d4bef90514db4 Mon Sep 17 00:00:00 2001 From: Chloekkk Date: Mon, 4 Jul 2022 16:49:04 +0900 Subject: [PATCH] chore: Update Makefile arch dependencies --- Makefile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1605828..8530627 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: nkim +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2022/05/04 14:54:52 by hannkim #+# #+# # -# Updated: 2022/07/03 17:38:18 by hannkim ### ########.fr # +# Updated: 2022/07/04 16:48:39 by nkim ### ########.fr # # # # **************************************************************************** # @@ -21,8 +21,17 @@ else CFLAGS = -Wall -Wextra -Werror endif -LDFLAGS := $(LDFLAGS) -CPPFLAGS := $(CPPFLAGS) +ARCH := $(shell arch) +ifeq ($(ARCH), i386) + LDFLAGS = -L$(HOME)/.brew/opt/readline/lib + CPPFLAGS = -I$(HOME)/.brew/opt/readline/include +else ifeq ($(ARCH), arm64) + LDFLAGS = -L/opt/homebrew/opt/readline/lib + CPPFLAGS = -I/opt/homebrew/opt/readline/include +else + LDFLAGS := $(LDFLAGS) + CPPFLAGS := $(CPPFLAGS) +endif AR = ar rcs RM = rm -f