Skip to content

Commit

Permalink
chore: Update Makefile arch dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nyeoni committed Jul 4, 2022
1 parent aaf226e commit 573eb68
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# By: nkim <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# 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 #
# #
# **************************************************************************** #

Expand All @@ -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
Expand Down

0 comments on commit 573eb68

Please sign in to comment.