minimum c++ make file for linux

后端 未结 11 1869
眼角桃花
眼角桃花 2020-12-23 17:32

I\'ve looking to find a simple recommended \"minimal\" c++ makefile for linux which will use g++ to compile and link a single file and h file. Ideally the make file will not

11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-23 17:59

    SConstruct with debug option:

    env = Environment()
    
    if ARGUMENTS.get('debug', 0):
        env.Append(CCFLAGS = ' -g')
    
    env.Program( source = "template.cpp" )
    

提交回复
热议问题