Skip to content

how to add Zephyr include directories to external library which's using different build system #30746

Answered by tejlmand
wentongwu asked this question in Q&A
Discussion options

You must be logged in to vote

@wentongwu you can use the zephyr_generated_headers build target.

Enable: CONFIG_MAKEFILE_EXPORTS=y, and build your sample.

As example when running CMake:

cmake ... -DCONFIG_MAKEFILE_EXPORTS=y <sample>

and then you can produce files containing build setting as:

$ ninja zephyr_generated_headers

or

$ make zephyr_generated_headers

which will produce:

$ ls Makefile.exports.*
Makefile.exports.ASM
Makefile.exports.C
Makefile.exports.CXX

with content like:

CC = /opt/zephyr-sdk-0.12.0-beta/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CXX = /opt/zephyr-sdk-0.12.0-beta/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
OBJCOPY = /opt/zephyr-sdk-0.12.0-beta/arm-zephyr-eabi/bin/arm-zephyr-eabi-objcopy
OBJDUMP = …

Replies: 4 comments 3 replies

Comment options

wentongwu
Dec 15, 2020
Collaborator Author

You must be logged in to vote
0 replies
Comment options

wentongwu
Dec 16, 2020
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wentongwu
Comment options

wentongwu Dec 17, 2020
Collaborator Author

Answer selected by henrikbrixandersen
Comment options

wentongwu
Dec 17, 2020
Collaborator Author

You must be logged in to vote
2 replies
@tejlmand
Comment options

@wentongwu
Comment options

wentongwu Jan 12, 2021
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #30746 on December 15, 2020 16:15.