## A Generic Makefile for C/C++ Program

2018年08月02日

I used to work a lot on scientific computing with C/C++, in which compiling the source code could be quite inconvenient. After some iteration, I came up with following Makefile. Just drop it into a source code directory and make.

Following is a simple adjustable Makefile which should locate inside your code directory.

Put following generic Makefile in to a location like \$HOME/.local/include/.

There are some drawbacks for this Makefile like only one main function can exist in the code tree.