delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/13/04:34:53

Date: Sun, 13 Jun 1999 11:32:14 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Yogesh Sharma <SHARMAYOGESH AT prodigy DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: makefile
In-Reply-To: <7jpua1$11ci$1@newssvr01-int.news.prodigy.com>
Message-ID: <Pine.SUN.3.91.990613113112.17906T-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019