I've written the below makefile:
hw2p1: hw2p1_main.o hw2p1_getit.o hw2p1_parseit.o hw2p1_moveit.o hw2p1_showit.o
gcc hw2p1_main.o hw2p1_getit.o hw2p1_parseit.o hw2p1_moveit.o hw2p1_showit.o
hw2p1_main.o: hw2p1_main.c
gcc -c hw2p1_main.c
hw2p1_getit.o: hw2p1_getit.c
gcc -c hw2p1_getit.c
hw2p1_parseit.o: hw2p1_parseit.c
gcc -c hw2p1_parseit.c
hw2p1_moveit.o: hw2p1_moveit.c
gcc -c hw2p1_moveit.c
hw2p1_showit.o: hw2p1_showit.c
gcc -c hw2p1_showit.c
The first time I tried to call make, I got the error: "make: Fatal error: unexpected end of line seen" I deleted the blank lines between targets and called make again, but this time I got " 'ake: Fatal error: Don't know how to make hw2p1_main.c"
I've compiled all of these files separately and then linked them so I know that the errors are a result of an incorrect makefile and not a result of errors in my c files.
This is the first makefile that I've ever written so I might just be doing it completely incorrectly. Either way, any suggestions on how to get rid of these errors?