Store GNU make generated files elsewhere
linux, makefile
Solution
The Makefile must support this feature.
I think the autoconf generated makefiles all support the following use:
mkdir ../build
cd ../build
../configure --prefix=/usr
make
make install
(It's certainly recommended for gcc builds).
Problem
How can I store GNU make & configure files elsewhere? I have a project I am working on that I get compiled using: ``` ./configure --prefix=/usr && make && su -c 'make install' ``` The thing is I don't want to pollute the current folder, which is a svn/git/hg/whatever sandbox with files generated by that command. I want to put those files in a separate location. I don't know if it's similar, but when I compile the linux kernel from source, I can specify where to put the ouput by passing the 'O' option to 'make', something like this: ``` make O=/home/user/linux-output ```