Creating nested makefile

前端 未结 3 1362
独厮守ぢ
独厮守ぢ 2021-02-08 05:45

I am learning makefiles and I know how to create a simple makefile. I am moving on to nested makefiles. Here is my directory structure

/src
...makefile
         


        
3条回答
  •  無奈伤痛
    2021-02-08 06:28

    There are more modern build systems like SCons That have an easier syntax than make and avoid many pitfalls of make. For example SCons scans the source files to determine dependencies on it's own, whereas for make one needs to specify dependencies manually. If you e.g. add a new #include statement to an implementation file make will not recompile that implementation file if the header changes (unless you add the new dependency). SCons will automatically detect the new dependency and recompile whatever necessary.

提交回复
热议问题