Notes on the Makefile
- The TODO at the top reminds me that I am using a different version of a library in development and it must be removed before deployment.
- The TARGET is the main executable of the project, in this case bin/runner. Type make and this is what gets built.
- I’m using g++ because it’s the same on Mac OS X and on the production Linux boxes.
- If I uncomment the clang line, I get a failed link as the libraries are incompatible (or comment out the last line under $(TARGET):). But then I get the benefit of a clang static analyzer run help me make my code better, well worth it.
- I use the fewest number of compiler CFLAGS when developing as possible, optimization happens later.
- The SOURCES list is dynamic, I don’t want to manually have to maintain this list as I program. Anything in the src folder will be included in the compile as long as it has a SRCEXT extension.
- The OBJECTS list is also dynamic and uses a Makefile trick to build the list based on available sources.
- The LIB in this