Skip to content

[Question] Generate and use libmodm.a+headers only? (no linking to main) #721

Answered by salkinium
mfp20 asked this question in Q&A
Discussion options

You must be logged in to vote

The include path is defined by this section in the modm/SConscript (relative to that file):

env.AppendUnique(CPPPATH=[
    abspath(r"ext"),
    abspath(r"ext/gcc/libstdc++/include"),
    abspath(r"src"),
])

So you can basically copy these folders where you want, and then set the -Ipath flags accordingly. You can remove all source files from those paths too (perhaps even with a .gitignore).

For you that would mean:

  1. Create an empty project without main.cpp, only with project.xml with all the settings/modules you want (build path is defaulted to . outside of the modm example folder).
  2. lbuild build and copy the generated modm/ext, modm/ext/gcc/libstdc++/include, modm/src folders where you nee…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by salkinium
Comment options

You must be logged in to vote
0 replies
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 #551 on September 29, 2021 14:36.