Date: Sun, 13 Jun 1999 11:32:14 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Yogesh Sharma cc: djgpp AT delorie DOT com Subject: Re: makefile In-Reply-To: <7jpua1$11ci$1@newssvr01-int.news.prodigy.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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?