[gameprogrammer] Re: Makefile: How to put .o Files into a different directory
- From: "Paul Smith" <paul@xxxxxxxxxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Fri, 27 Oct 2006 15:46:42 +0100
Make doesn't make the object files, the compiler does. Make just asks
for the right ones.
Alter the line in your Makefile which calls the compiler, just add a
obj/ to the -o switch or similar.
Example:
.cpp.o:
$(CC) $(CFLAGS) $< -o obj/$@
If makefiles are completely foreign to you, google for a tutorial.
On 10/27/06, Torsten Giebl <wizard@xxxxxxxxxxxxxxx> wrote:
Hello !
I am coding on a game and the generated object
files are really cluttering the main source directory.
What is the way to say Make to put the generated
object files into for example an obj directory ?
Thanks.
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
--
Paul Smith
Computer programmer
paul@xxxxxxxxxxxxxxxxxx
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- References:
- [gameprogrammer] Makefile: How to put .o Files into a different directory
- From: Torsten Giebl
Other related posts:
- » [gameprogrammer] Makefile: How to put .o Files into a different directory
- » [gameprogrammer] Re: Makefile: How to put .o Files into a different directory
- » [gameprogrammer] Re: Makefile: How to put .o Files into a different directory
Hello !
I am coding on a game and the generated object files are really cluttering the main source directory.
What is the way to say Make to put the generated object files into for example an obj directory ?
Thanks.
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
-- Paul Smith Computer programmer
- [gameprogrammer] Makefile: How to put .o Files into a different directory
- From: Torsten Giebl