Copyright 2021, 月下麒麟
起源
reference:Why are Makefiles in Linux so useful
A makefile is useful because (if properly defined) allows recompiling only what is needed when you make a change. In a large project rebuilding the program can take some serious time because there will be many files to be compiled and linked and there will be documentation, tests, examples etc.
每次都敲打指令gcc -o...,修改程式過程中,不斷來回compile,
重工又繁瑣,若是要編譯、連結的檔案繁多,那工程又更浩大。
此時,撰寫makefile腳本會使編譯過程輕鬆。