How can I have my makefile compile with the -l flag?
I have a makefile that looks like
myLibrary: gcc -c myLibrary.c -o myLibrary.o ar cr lib
To link purely statically library, use -static, Like
gcc -static main.c libmyLibrary.a
And run executable file ./a.out GCC Linux.
./a.out