simplemake - A simple makefile
<p>Hello!</p> <p>I wanted to share a makefile that I have been using for multifile C projects that produce a single binary program. I included a simple hello world example so that it's easy to test this out.</p> <p>The way it works is you list all your .c files in <code>SOURCES=main.c greet.c</code> and it makes targets that compile them into .o object files. It also has a target called <code>main</code> which links all the objects together to make the final program.</p> <p>If you change one of the .c files it will recompile just that one object file before linking them all together to rebuild the binary. This helps a good fast workflow.</p> <p>Hope it's useful! I have been using this as a base for most of my projects. It can be used for other languages than C too if you edit it a little.</p>
Read the full article at notabug.org →
Related stories
- Show HN: Binary Code Translator – free browser-based text↔binary converterbinarycodetranslator.orgHacker News · 2 points · 1 day ago
- Binary Mutation Analysis of Tests Using Reassembleable Disassemblywww-users.cs.umn.eduLobsters · 5 points · over 6 years ago
- Continuous integration services for open-source projects not requiring config in root of repository?Lobsters · 9 points · almost 9 years ago
- Hacker News · 1 points · 8 days ago
- Hacker News · 3 points · 9 days ago
- Hacker News · 6 points · 13 days ago