www.digitalmars.com         C & C++   DMDScript  

c++.command-line - compiler output directory

reply "chris elliott" <chris ampleforth.u-net.com> writes:
Hi

I am starting to try and improve the compilation of wxWindows

is it possible to provide a switch to make or dmc so that it puts the output
in a specified directory?

I'd like either to have a switch for dmc, like the bcc32 -noutputdir

or be able to parse the filename in make

make .... -oadir\$..obj

where $. gives you the filename. I guess the first is more effieicnet

chris
currently I have make 5.02, dmc 8.29n
Jun 13 2003
next sibling parent mjs NOSPAM.hannover.sgh-net.de (Mark Junker) writes:
 I am starting to try and improve the compilation of wxWindows
[..]
 I'd like either to have a switch for dmc, like the bcc32 -noutputdir
 or be able to parse the filename in make
 make .... -oadir\$..obj
 where $. gives you the filename. I guess the first is more effieicnet
You might try the following: ---------------- makefile ------------------- all: $(OUTDIR)test.exe $(OUTDIR)test.exe : test.cpp --------------------------------------------- -------------- commandline ------------------ make -DOUTDIR=test\ --------------------------------------------- Regards, Mark Junker
Jun 14 2003
prev sibling parent james westongold.com writes:
is it possible to provide a switch to make or dmc so that it puts the output
in a specified directory?
dmc does it. Unfortunately I just wasted some time (re)building ACE before noticing that it doesn't do what you expect. Unfortunately, unlike every other compiler you've used, '-o foo\bar.obj' DOES NOT create file foo\bar.obj as the output. Its the optimise flag '-o' followed by garbage. Using '-ofoo\bar.obj' does what we know and love, but if your makefiles are anything like the ACE build system its a pain. I'm amazed, having started to try dmc I find a lot of the old Zortech stuff is still there. I understand the history, I'm just surprised that the crufty old codegen options etc etc didn't die when the driver got a new name. I'll repoprt back on getting ACE (and maybe TAO) to build eventually. Takes a while 'cos its a train-time project and -HX doesn't work with STLPort. :-( (To be fair, it is of course damn fast even with PCH turned off) James
Jul 15 2003