I have a Qt 4.8 project with subdir. I set my *.pro file to build a lib in this directory to use it with the core of my application. This works well.
The subdirectory uses a regular Makefile.
I'm now trying to add the possibility to clean this subdirectory by calling the clean command on the library's Makefile.
Here is what I got for now:
LIBS = bin/libfoo.a
QMAKE_EXTRA_TARGETS += somelib
# some lib
PRE_TARGETDEPS += somelib
somelib.commands = make -C lib/somelib LIB=../../bin/libfoo.a lib
somelib.clean_commands = make -C lib/somelib clean
I have no problem to compile my project with this lib.
But when I run 'make clean' on the qmake generated Makefile, 'make -C lib/somelib clean' is not called.
How can I achieve this ?