Given that I have a project with a simple Makefile, for example:
all: foobar
foobar: foo.o bar.o
which I can create for different architectures:
$ CC=clang make
$ CC=x86_64-w64-mingw32-gcc make
$ CC=arm-linux-gnueabihf-gcc make
This works, but I want to be able to support outputs for multiple configurations at the same time, for example, on the build server.
What would be a good, clean way to do this? I reviewed the following:
- Use autotools or another build tool, but I want to see what is possible without
- Create build directories using Make files in them that install VPATH and include the root Makefile
- Write a script that moves the output after building each architecture
- Makefile . , -Makefile, .
- Makefile, . , , Makefile. .