www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/19/21:10:11

From: Vladimir Taltos <draco AT ttlc DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: "No rule to make target..." makefile problem
Date: Sun, 18 Oct 1998 23:44:09 -0400
Organization: Chronohalt's Multiverse
Lines: 57
Message-ID: <362AB588.1D3F978F@ttlc.net>
NNTP-Posting-Host: 206.151.173.61
Mime-Version: 1.0
X-Trace: 908845442 3OI7.FECTAD3DCE97C usenet76.supernews.com
X-Complaints-To: newsabuse AT supernews DOT com
X-Mailer: Mozilla 4.04 [en] (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The makefile I am trying to run (from stock Rom 2.4 Beta Release 6)
consists of the following:

> CC      = gcc
> PROF    = -O -g
> NOCRYPT =
> C_FLAGS =  -Wall $(PROF) $(NOCRYPT)
> L_FLAGS =  $(PROF)
>
> O_FILES =  act_comm.o act_enter.o act_info.o act_move.o act_obj.o
act_wiz.o \
>                     alias.o ban.o comm.o const.o db.o db2.o effects.o
fight.o flags.o \
>                    handler.o healer.o interp.o note.o lookup.o magic.o
magic2.o \
>                   music.o recycle.o save.o scan.o skills.o special.o
tables.o \
>                    update.o
>
> rom: $(O_FILES)
>          rm -f rom
>          $(CC) $(L_FLAGS) -o rom $(O_FILES)
>
> .c.o: merc.h
>         $(CC) -c $(C_FLAGS) $<

This makefile was part of the stock release, and the developer seems to
have expected it to work. In addition, a highly similar version works
fine for a freind of mine when he compiles his mud code, the only
difference being the object files named, since he has a few .c files
that he has added in the process of customizing his mud.
However, when I try to run this, I get the error message:
    "No rule to make target 'act_comm.o', needed by rom. Stop."

I have indulged in a number of lengthy hair-tairing sessions trying to
figure this out. In the process, I stumbled across something that might
have to do with it. I asked for, and got, a copy of the first .o file
named, act_comm.o. I stuck it in the source directory for the mudcode,
and tried a make again.
This time I got the message:
    "No rule to make target 'act_enter.o', needed by rom. Stop."

This would seem to indicate that the .o files named have to already be
present before running make.
But I clearly recall being told to remove ALL .o files before running a
make if the file merc.h was modified in ANY way. (Sorry for the caps,
but I am still having nightmares about the time I tied my freind's mud
into knots when I tried a really minor modification of that file.)

Is there a way to create object files without making the executable?
Is the lack of object files really the source of this error?

Any help would be appreciated. Thank you for your time.




- Raw text -


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