This is part of a homework assignment. What we have to do is write a makefile to compile previous homework solutions. The solutions were provided by the professor, and they’re what will be used to test our makefiles. One of the files has an #include "quicksort.c".
I know the usage of something like that is discouraged, but that doesn’t really help me 🙂
What would be the best approach to getting the two files to compile (the file quicksortTest.c, which includes quicksort.c, and quicksort.c itself)?
What I currently have as part of my makefile is the following:
quicksort: quicksort.c quicksortTest.c
$(CC) quicksortTest.c quicksort.c -o quicksortTest
Where quicksortTest.c has the #include "quicksort.c".
When I try it, I get several gcc compiler errors… ideas?
Don’t pass
quicksort.ctogcc. Since you are including the file you should not compile it seperately: