Hi,
I'm working on http://c.learncodethehardway.org/book/. And I've spent several days on makefiles. I'm pretty lost with them. I'm just trying to make a makefile that compiles only the C files I've modified. This is what I have so far. I think I'm pretty close. My files are ex1.c and ex3.c. I will have more exercises as I continue through the book.
`CFLAGS=-Wall -g
exs1.o:
gcc ex1.c
exs3.o:
gcc ex3.c
.PHONY: clean
clean:
rm -f exl
`
Maybe an "all:" target is the way to go.
It looks like you're new here. If you want to get involved, click one of these buttons!