Makefile issues
Yet again, I find myself in the position where I am being defeated by either GCC, Makefile or library linking. This rather frustrated blog post concerns Makefile issues I have been having.
I have started exploring a couple of ideas in my head, but to implement them, I ideally need more structure to the codebase rather than working out of a single C file. So, with some trial and error, I adapted my current makefile to compile multiple files into a single executable. However, my non-main C files complain about undefined references.
Files wise, I have:
- main.c
- general.c
- general.h
general.c references the SDL library and correctly references the necessary includes. However, because of something in my makefile, general.c is compiled into the executable without acknowledging the defined includes.
This is somewhat infuriating. I want to do something productive but can't.