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

enable passing CPPFLAGS to ports #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ LDFLAGS_WHOLE_ARCHIVE_END ?= $(LDFLAGS_PREFIX)--no-whole-archive

### right now we should have only target-necessary flags, save them for exporting (for building ports) ###
EXPORT_CFLAGS := $(CFLAGS)
EXPORT_CPPFLAGS := $(CPPFLAGS)
EXPORT_CXXFLAGS := $(CXXFLAGS)
EXPORT_LDFLAGS := $(LDFLAGS)

Expand Down Expand Up @@ -173,6 +174,9 @@ export-cflags:
export-cxxflags:
@echo $(EXPORT_CXXFLAGS)

export-cppflags:
@echo $(EXPORT_CPPFLAGS)

export-ldflags:
@echo $(EXPORT_LDFLAGS)

Expand Down
3 changes: 2 additions & 1 deletion build.sh
adamdebek marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ MAKEFLAGS="--no-print-directory -j 9"

# export flags for ports - call make only after all necessary env variables are already set
EXPORT_CFLAGS="$(make -f phoenix-rtos-build/Makefile.common export-cflags)"
EXPORT_CPPFLAGS="$(make -f phoenix-rtos-build/Makefile.common export-cppflags)"
EXPORT_LDFLAGS="$(make -f phoenix-rtos-build/Makefile.common export-ldflags)"
# export STRIP path & args for stripping binaries
EXPORT_STRIP="$(make -f phoenix-rtos-build/Makefile.common export-strip)"

export EXPORT_CFLAGS EXPORT_LDFLAGS EXPORT_STRIP
export EXPORT_CFLAGS EXPORT_CPPFLAGS EXPORT_LDFLAGS EXPORT_STRIP


#
Expand Down
Loading