delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/27/03:08:40

Date: Wed, 27 Jan 1999 10:05:35 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Sahab Yazdani <sahaby AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Intermidate AND Final Directory
In-Reply-To: <36AE0317.CF0A9BFE@geocities.com>
Message-ID: <Pine.SUN.3.91.990127100347.25202N-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Tue, 26 Jan 1999, Sahab Yazdani wrote:

> %.o : %.cc
>         gcc -g -c $< -o $@
> 
> clean :
>         del inter/*.o

This won't work: DEL doesn't understand forward slashes

> It finds the source files in the source directory (sure enough) but puts
> all the files in the root project directory...
> 
> So:
> 
> E:\SAHAB\CPROJ\MASSACRE\SOURCE> SOURCES sure enough
> E:\SAHAB\CPROJ\MASSACRE> *.o and *.exe go here where I want it to put it
> in
> "    "    "       "    \INTER> is there something I'm missing?

This is how Make works.  VPATH is only for finding the input files,
output still goes to the current directory.

(Btw, should you need to define a different place for different files, 
like one directory for *.c and another for *.h, use the vpath variable, 
lower-case, to do that.  This is described in the Make manual.)

> Like do make the %.o : %.cc line read:
> 
> gcc -g -c $< -o E:/SAHAB/CPROJ/MASSACRE/INTER/$@  ?

Yes.  You don't need to spell the directory in UPPER CASE, though.

- Raw text -


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