Compile multiple C files with make
The links posted are all good. For you particular case you can try this. Essentially all Makefiles follow this pattern. Everything else is shortcuts and macros. program: main.o dbAdapter.o gcc -o program main.o dbAdapter.o main.o: main.c dbAdapter.h gcc -c main.c dbAdapter.o dbAdapter.c dbAdapter.h gcc -c dbAdapter.c The key thing here is that the Makefile looks … Read more