Qmake: Makefiles for different platforms with the same name
-
I have a large subdirs project, which I need to build both for desktop linux as well as embedded linux (via a cross compiler).
I use the same source tree, and choose the platform to build for by setting different environment variables as well as QMAKESPEC and QTDIR. In my project files, I then direct the various outputs (DESTDIR, OBJECTS_DIR,...) to different folders to keep the builds separate. This part works well.
However, both builds use the same makefile names. When I completed a desktop build, a build for embedded only says "nothing to be done" for all projects. Only when I manually delete all makefiles does the embedded build actually run.
I have fooled around with the MAKEFILE variable, hoping to change the makefile name that way. However, it seems that even if an additional makefile by that name is created, the makefile actually used is still the default one, so no improvement.
How do I correctly specify a makefile name in a .pro file, so I can then call "make -f makefile_embedded" or "make -f makefile_desktop" and keep my build cleanly separated?