0. PrefaceFrom the beginning of learning C language began to contact Makefile, consulted a lot of makefile information but always feel no real master makefile, if you write a makefile always feel very laborious. So deliberately using the blog to summarize the relevant knowledge of makefile, through examples to illustrate the specific use of makefile. The blog is trying to be simple, by example, to illustrate Makefile's writing, rather than the entire paragraph or the entire piece of plagiarism on the web.
1. Index1. Only a single C file 2. Contains multiple C files 3. You need to include the header file path 4. Add a macro definition 5. Add a system Shared library 6. Add a custom shared Library 7. A practical case--freemodbus linuxtcp
2. Code WarehouseThe Code warehouse--makefile-example code warehouse is located in BitBucket, where you can clone code with TORTOISEHG (GUI tools) or download a zip package directly from a Web page.