Automake generating binaries to bin/ instead of in src/

前端 未结 3 1670
孤街浪徒
孤街浪徒 2020-12-09 08:37

I searched for the answer to this question but couldn\'t find any good. Maybe they\'re old and something has changed, so I ask again.

I have a directory structure as

3条回答
  •  爱一瞬间的悲伤
    2020-12-09 08:55

    Automake doesn't cope very well if you try to set up your directories in a different way than it expects. What you want would involve writing extra rules to move the binaries to ../bin after compiling them, which is needlessly complicated.

    If you don't want to clutter your source directory, try this:

    cd my_project
    mkdir build
    cd build
    ../configure
    make
    

    That will put all the generated files (like makefiles, binaries, object files) in subdirectories of my_project/build.

提交回复
热议问题