Using GNU Make to build both debug and release targets at the same time

前端 未结 2 2016
抹茶落季
抹茶落季 2021-02-02 13:40

I\'m working on a medium sized project which contains several libraries with interdependence\'s which I\'ve recently converted over to build using a non-recursive makefile. My

2条回答
  •  借酒劲吻你
    2021-02-02 14:10

    Use VPATH to make debug and release builds use the same set of source files. The debug and release build can have their own directory, which means they'll have their object files separated.

    Alternatively, use a build tool that supports out-of-source builds natively, like automake or (ugh) cmake.

    If you enable the automake option subdir-objects (as in AM_INIT_AUTOMAKE([foreign subdir-objects])), you can write a non-recursive Makefile.am.

提交回复
热议问题