A generic makefile to be used in your C projects. It is reasonably small, but has some sweet features:
- Automatically detects changes in dependencies (eg header files)
- Detects system compiler / linker (via environment variable
CCandLD) - Ability to amend
CFLAGS,CPPFLAGS,LDFLAGS, orLDLIBSvia cli installandcleantargets, the former also respectsPREFIX- Genereting gdb debug files
- Sane compiler defaults
Change the EXE variable to your desired name and you're good to go.
You can also do the optional changes below if you desire:
- Change default
CFLAGS, andLDFLAGS - Change default compiler / linker (via
CCandLDvariables)
Dual-Licensed under Public Domain & MIT
Copyright (c) 2017, Arvid Gerstmann All rights reserved.