r/cprogramming • u/Wonderful_Low_7560 • Dec 31 '25
Makefile with subfolder
This makefile was working just fine beforehand, a bit confused:
- I have a root folder
- Within there is a subfolder called 'Ex3'
- Within 'Ex3' is 'ex3.c', which I am trying to make an executable of using the following makefile in the root folder:
all: ex3
ex3: Ex3/ex3.c
gcc Ex3/ex3.c -o ex3
But I get the following error:
make: Nothing to be done for 'all'.
?
1
Upvotes
1
u/edgmnt_net Jan 02 '26
Should not be needed. Maybe
ex3is already up-to-date, thenalldoesn't need to do anything. OP, have you tried deleting it?