Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed flags for macOS build #301

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mk/flags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ endif
# Add boost library search path.
# This is the defualt installation location by home brew.
ifeq "$(is_darwin)" "1"
LDFLAGS += -L/usr/local/lib
INCLUDES += /usr/local/opt/flex/include
LDFLAGS += -L $(BOOST_ROOT)/lib
LDFLAGS += -L$(FLEX_ROOT)/lib
INCLUDES += $(FLEX_ROOT)/include
endif

# Need to pass the -U option to GNU ar to turn off deterministic mode, or
Expand Down
17 changes: 14 additions & 3 deletions mk/paths.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ TEST_ROOT := $(ERPC_ROOT)/test

ifeq "$(is_mingw)" "1"
BOOST_ROOT ?= $(ERPC_ROOT)/erpcgen/VisualStudio_v14/boost_1_67_0
else
else ifneq "$(is_darwin)" "1"
BOOST_ROOT ?= /usr/local/opt/boost
else
ifndef BOOST_ROOT
BOOST_ROOT := $(shell brew --prefix boost)
endif
endif

TARGET_OUTPUT_ROOT = $(OUTPUT_ROOT)/$(DEBUG_OR_RELEASE)/$(os_name)/$(APP_NAME)
Expand Down Expand Up @@ -70,8 +74,15 @@ endif

# Tool paths. Use different paths for OS X.
ifeq "$(is_darwin)" "1"
FLEX ?= /usr/local/opt/flex/bin/flex
BISON ?= /usr/local/opt/bison/bin/bison
ifndef FLEX_ROOT
FLEX_ROOT := $(shell brew --prefix flex)
endif
ifndef BISON_ROOT
BISON_ROOT := $(shell brew --prefix bison)
endif

FLEX ?= $(FLEX_ROOT)/bin/flex
BISON ?= $(BISON_ROOT)/bin/bison
else ifeq "$(is_linux)" "1"
FLEX ?= /usr/bin/flex
BISON ?= /usr/bin/bison
Expand Down