How can I configure my makefile for debug and release builds?

后端 未结 7 597
借酒劲吻你
借酒劲吻你 2020-12-12 08:41

I have the following makefile for my project, and I\'d like to configure it for release and debug builds. In my code, I have lots of #ifdef DEBUG macros in plac

7条回答
  •  粉色の甜心
    2020-12-12 09:39

    you can have a variable

    DEBUG = 0
    

    then you can use a conditional statement

      ifeq ($(DEBUG),1)
    
      else
    
      endif
    

提交回复
热议问题