Mail Archives: djgpp/1999/06/13/04:34:53
On Thu, 10 Jun 1999, Yogesh Sharma wrote:
> CC = gcc
> CFLAGS = -g -O2
> OBJECTS = main.o foo.o
>
> libmain.a : $(OBJECTS)
>
> %.o : %.c
> $(CC) $(CFLAGS) -c $<
> ar rvs $@
>
> Message "make.exe: *** No rule to make target `main.o', needed by
> `libmain.a'. Stop."
I cannot reproduce this problem. Your Makefile works for me, after I
correct the mistake in the last command, so it says this:
ar rvs libmain.a $@
But even with the original command, I don't get the "No rule"
message. So some other problem seems to be at work here. Are you
sure you posted the exact Makefile and the exact description of the
problem?
- Raw text -