delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/17/01:43:14

Date: Tue, 17 Feb 1998 08:41:33 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Mike McLean <libolt AT primenet DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Makefile
In-Reply-To: <34E746BA.57915167@primenet.com>
Message-ID: <Pine.SUN.3.91.980217084112.3136G-100000@is>
MIME-Version: 1.0

On 15 Feb 1998, Mike McLean wrote:

> characte.cc:  characte.o
> 	gxx -c characte.cc

These rules are backwards.  "foo: bar" means that `foo' is made from
`bar' (or, more generally, depends on it), not the other way around.
So you should say "characte.o: characte.cc".

Other related issues:

      1) You should use `gcc' to compile, not `gxx'.  The latter is
         for linking C++ programs; if you use it for compilation (with
         -c switch), it will print a warning which is harmless, but
         annoying.

      2) Actually, you don't need to write rules for generating .o
         files from .cc files at all: Make already knows that.  So all
         you need is the first rule from your Makefile which shows how
         to build the program from the object files.  Make will figure
         out the rest itself.

- Raw text -


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