Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!turnkey!jackv From: jackv@turnkey.tcc.com (Jack F. Vogel) Newsgroups: comp.unix.aix Subject: Re: cc -o -c Message-ID: <1991May31.144929.2471@turnkey.tcc.com> Date: 31 May 91 14:49:29 GMT References: Reply-To: jackv@turnkey.TCC.COM (Jack F. Vogel) Distribution: comp Organization: Turnkey Computer Consultants, Westchester, CA Lines: 22 In article auvnele@auvc7.tamu.edu (Eric L. Nelson) writes: >I'm working on a large software program where sources are in one >directory and objects go into another. I cannot get: > > cc -c -o../dir/foo.o foo.c > >to put foo.o in ../dir. It insists on putting it in the same dir as >foo.c. The problem, I believe, is that the '-c' flag overrides the '-o' and it naturally puts the object in the current directory. What you want to do can be accomplished in another way, run your builds in the target compilation directory and then specify the path to the source. Either keep the makefile in the target directory or symlink it there. This is what we do in our build systems all the time. Disclaimer: I don't speak for my employer. -- Jack F. Vogel jackv@locus.com AIX370 Technical Support - or - Locus Computing Corp. jackv@turnkey.TCC.COM