Comer352l
11th March 2009, 16:49
Hi,
I'm searching for a possibility to create pre-processor-defines depending on the called makefile target.
I'm currently using the usual solution for conditional compiling of debug code parts:
#ifdef DEBUG
...debug-code
#endif
At the moment, I set DEBUG in a separate header-file, which I have to include in all souces that contain such debug-sequences.
My idea/intention is to make this separate header-file obsolete. DEBUG should be set when I compile the software with "make debug" (only).
It's a qmake-project and I use CONFIG += debug_and_relase.
I know the DEFINES option, but don't know how to make it depending on the called make target. Does anyone know how to do that ?
Frank
I'm searching for a possibility to create pre-processor-defines depending on the called makefile target.
I'm currently using the usual solution for conditional compiling of debug code parts:
#ifdef DEBUG
...debug-code
#endif
At the moment, I set DEBUG in a separate header-file, which I have to include in all souces that contain such debug-sequences.
My idea/intention is to make this separate header-file obsolete. DEBUG should be set when I compile the software with "make debug" (only).
It's a qmake-project and I use CONFIG += debug_and_relase.
I know the DEFINES option, but don't know how to make it depending on the called make target. Does anyone know how to do that ?
Frank