Skip to content

Commit 573eb68

Browse files
committedJul 4, 2022
chore: Update Makefile arch dependencies
1 parent aaf226e commit 573eb68

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed
 

‎Makefile

+12-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# By: nkim <nkim@student.42seoul.kr> +#+ +:+ +#+ #
77
# +#+#+#+#+#+ +#+ #
88
# Created: 2022/05/04 14:54:52 by hannkim #+# #+# #
9-
# Updated: 2022/07/03 17:38:18 by hannkim ### ########.fr #
9+
# Updated: 2022/07/04 16:48:39 by nkim ### ########.fr #
1010
# #
1111
# **************************************************************************** #
1212

@@ -21,8 +21,17 @@ else
2121
CFLAGS = -Wall -Wextra -Werror
2222
endif
2323

24-
LDFLAGS := $(LDFLAGS)
25-
CPPFLAGS := $(CPPFLAGS)
24+
ARCH := $(shell arch)
25+
ifeq ($(ARCH), i386)
26+
LDFLAGS = -L$(HOME)/.brew/opt/readline/lib
27+
CPPFLAGS = -I$(HOME)/.brew/opt/readline/include
28+
else ifeq ($(ARCH), arm64)
29+
LDFLAGS = -L/opt/homebrew/opt/readline/lib
30+
CPPFLAGS = -I/opt/homebrew/opt/readline/include
31+
else
32+
LDFLAGS := $(LDFLAGS)
33+
CPPFLAGS := $(CPPFLAGS)
34+
endif
2635

2736
AR = ar rcs
2837
RM = rm -f

0 commit comments

Comments
 (0)
Please sign in to comment.