Skip to content

Instantly share code, notes, and snippets.

Created September 4, 2013 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6440945 to your computer and use it in GitHub Desktop.
Save anonymous/6440945 to your computer and use it in GitHub Desktop.
test.o: test.c makeHeader.o getLine.o printArray.o shuffle.o insertionSort.o swap.o
gcc test.c makeHeader.o getLine.o printArray.o shuffle.o insertionSort.o swap.o -o test.o
makeHeader.o: makeHeader.c makeHeader.h
cc -c makeHeader.c
shuffle.o: shuffle.c shuffle.h swap.o //Problem occurs here - undefined reference to swap
//if i use cc shuffle.c shuffle.o i get undefined reference to main
cc -c shuffle.c
swap.o: swap.c swap.h
cc -c swap.c
insertionSort.o: insertionSort.c insertionSort.h
cc -c insertionSort.c
getLine.o: getLine.c getLine.h
cc -c getLine.c
printArray.o: printArray.c printArray.h
cc -c printArray.c
clean:
rm -f makeHeader.o
rm -f getLine.o
rm -f printArray.o
rm -f shuffle.o
rm -f a.out
rm -f test.o
rm -f swap.o
rm -f insertionSort.o
@m-e-leypold
Copy link

You read this comment here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment