Mail Archives: djgpp/1999/01/27/03:08:40
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 -