This is a general-purpose Makefile I use for most of my C projects. It it fully commented to help you know where to put what and how to change settings like the name of your executable.
This is linux-specific but would probably work on MacOS with no changes (untested) and could very easily be ported to windows.