Results 1 to 5 of 5

Thread: Pre-processor-defines depending on makefile-targets ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Posts
    23
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Pre-processor-defines depending on makefile-targets ?

    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:
    Qt Code:
    1. #ifdef DEBUG
    2. ...debug-code
    3. #endif
    To copy to clipboard, switch view to plain text mode 
    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
    Last edited by Comer352l; 11th March 2009 at 18:59.

Similar Threads

  1. not able to change Makefile
    By shamik in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2007, 12:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.