]> rtime.felk.cvut.cz Git - sojka/tekpic.git/blobdiff - qtpcxio/rules.pri
Added support for PCX images. TDS224 doesn't have TIFF.
[sojka/tekpic.git] / qtpcxio / rules.pri
diff --git a/qtpcxio/rules.pri b/qtpcxio/rules.pri
new file mode 100644 (file)
index 0000000..b2c7cfb
--- /dev/null
@@ -0,0 +1,313 @@
+#######################################################################
+#
+# Basic compilation rules. Should not need to be changed 8-).
+#
+#######################################################################
+# Make sure debug/release flags are set correctly.
+debug: release: error( Can't be both in debug and release mode )
+
+debug {
+    message(----------- DEBUG compilation ----------------)
+    DEFINES *= DEBUG 
+    # Add all the Qt's check flags. This the default, but add them in any case.
+    DEFINES *= QT_DEBUG QT_FATAL_ASSERT
+    TARGET = $$TARGET-debug
+    
+    win32 {
+        OBJECTS_DIR = Debug/Obj/
+    } else {
+        OBJECTS_DIR = .debug.obj/
+    }
+}
+
+release {
+    message(+++++++++++ RELEASE compilation ++++++++++++++)
+    # Remove all Qt's checking code, and all Q_ASSERT().
+    # *BUT* still do Q_CHECK_PTR !
+    DEFINES *= QT_NO_DEBUG QT_NO_CHECK QT_CHECK_NULL
+
+    win32 {
+        OBJECTS_DIR = Release/Obj/
+    } else {
+        OBJECTS_DIR = .release.obj/
+    }
+}
+
+win32 {
+    MOC_DIR = Generated/
+} else {
+    MOC_DIR = .generated/
+}
+UI_DIR  = $${MOC_DIR}
+
+#######################################################################
+#
+# Specific compiler rules. Might need to be twicked to achieve what
+# you really need...
+#
+#######################################################################
+
+win32 {
+    DEFINES *= WIN32=1
+    DEFINES -= UNICODE
+    DEFINES *= HAVE_STRING_H=1
+}
+
+win32-msvc {
+    message( Compile using MSVC6 )
+    # Make sure to have C++/C files, PentiumPro code, few warnings
+    # add support to RTTI and Exceptions,
+    # and generate debug info "program database" :
+    QMAKE_CXXFLAGS = -TP -G6 -W1 -GR -GX -EHsc -Zi -Fo$$OBJECTS_DIR -FR$$OBJECTS_DIR -Fd$$OBJECTS_DIR
+    QMAKE_CFLAGS =   -TC -G6 -W1 -GR -GX -EHsc -Zi -Fo$$OBJECTS_DIR -FR$$OBJECTS_DIR -Fd$$OBJECTS_DIR
+    # Optimise for speed, and expand any suitable inlines :
+    QMAKE_CXXFLAGS_RELEASE = -Ot -Ox
+    QMAKE_CFLAGS_RELEASE   = -Ot -Ox
+    # Optimise for debug :
+    QMAKE_CXXFLAGS_DEBUG = -Od
+    QMAKE_CFLAGS_DEBUG   = -Od
+}
+
+win32-msvc.net* {
+    message( Compile using .NET )
+    # Make sure to have C++ files, PentiumPro code, few warnings
+    # add support to RTTI, use exceptions, use ANSI C++ for scope,
+    # and generate debug info "program database", and compile using intrisic functions
+    QMAKE_CFLAGS = -G6 -G7 -GR -EHsc -Zc:forScope -Zi -Oi
+    QMAKE_CFLAGS += -MT -Fd$$OBJECTS_DIR
+    QMAKE_CXXFLAGS = -TP $$QMAKE_CFLAGS
+    
+    # Full Optimise, Global optimize, Optimise for speed, 
+    # omit frame pointer, and expand any suitable inlines :
+    QMAKE_CXXFLAGS_RELEASE= -Ox -Og -Ot -Oy -Ob2
+    QMAKE_CFLAGS_RELEASE  = $$QMAKE_CXXFLAGS_RELEASE
+    
+    # Optimise for debug, and generate navigation file
+    QMAKE_CXXFLAGS_DEBUG  = -Od -Fr
+    QMAKE_CFLAGS_DEBUG    = $$QMAKE_CXXFLAGS_DEBUG
+    
+    # Bugs in Qt's .h and mkspecs/qmake.conf :
+    # warning 4251 : nécessite une interface DLL pour être utilisé(e)
+    #                (issues in QGLViewer)
+    # warning 4305 : troncation de 'double' à 'float'
+    # warning 4189 : variable locale initialisée mais non référencée
+    QMAKE_CXXFLAGS_WARN_ON = -W3 -wd4100 -wd4251 -wd4305 -wd4189
+    
+    # Links flags :
+    # Add checksum, and machine code X86.
+    QMAKE_LFLAGS += -machine:x86
+    release {
+        QMAKE_LFLAGS *= /RELEASE
+        QMAKE_LFLAGS -= /DEBUG
+    }
+}
+
+# Copyed from win32-msvc.net
+# See http://blogs.msdn.com/branbray/archive/2005/07/08/437078.aspx for a nice description
+# for the new switch rationals.
+win32-msvc2005 {
+    message( Compile using Visual Studio 2005 (8.0))
+
+    # Make sure to have C++/C files (TP),
+    # Share string literals (in a RO page) (GF),
+    # add use exceptions (EHsc),
+    # and compile using intrisic functions (Oi),
+    # and enlarge compiler memory allocation (by 800%).
+    # Now by default : ZR (RTTI) and  Zc:forScope
+    QMAKE_CXXFLAGS = -TP -EHsc -Oi -Zm800
+    QMAKE_CFLAGS   = -TC -EHsc -Oi -Zm800
+
+    # Full Optimise, Global optimize, Optimise for speed, 
+    # omit frame pointer, and expand any suitable inlines :
+    #  /Os = also throw Oy Ob2 GF
+    # Note : -Os == -O2 == -Ox
+    QMAKE_CXXFLAGS_RELEASE = -Os
+    QMAKE_CFLAGS_RELEASE   = -Os
+
+    # Optimise for debug, and generate navigation file
+    # Output debug info (Zi),
+    # Don't optimize (Od)
+    # /Od = also throw Oi- Oy-  Ob0 GF-
+    QMAKE_CXXFLAGS_DEBUG = -Od -Zi
+    QMAKE_CFLAGS_DEBUG   = -Od -Zi
+
+    # Qt Bug #114573 in vcproj generator. Waitting for 3.3.7 ...
+    # QMAKE_CXXFLAGS += -arch:SSE2
+
+    # .PDB and .SBR hidden in Obj dir.
+    QMAKE_CXXFLAGS += -Fd$$OBJECTS_DIR
+    QMAKE_CFLAGS   += -Fd$$OBJECTS_DIR
+
+    # avoid Microsoft crazyness about deprecating *NORMALIZED* functions...
+    DEFINES += _CRT_SECURE_NO_DEPRECATE=1
+    DEFINES += _CRT_NONSTDC_NO_DEPRECATE=1
+    DEFINES += __STDC_WANT_SECURE_LIB__=0
+    DEFINES += _SECURE_ATL=0
+
+    # Bugs in Qt's .h and mkspecs/qmake.conf :
+    QMAKE_CXXFLAGS_WARN_ON = -W3
+
+    # Links flags :
+    # Add checksum, and machine code X86.
+    QMAKE_LFLAGS += /machine:x86
+    release {
+        QMAKE_LFLAGS *= /RELEASE
+        QMAKE_LFLAGS -= /DEBUG /NOLOGO
+    }
+    QMAKE_LFLAGS -= /NOLOGO
+}
+
+win32-borland {
+    message( Compile using Borland C++ compiler )
+    DEFINES *= BORLAND=1
+    # Force C++, Pentium Pro code, with RTTI
+    QMAKE_CXXFLAGS -= -RT
+    QMAKE_CXXFLAGS *= -P -6
+    QMAKE_CXXFLAGS_DEBUG *= -v
+    # Shutup warnings:
+    CONFIG *= warn_off
+}
+
+win32-icc {
+       message( Compile using Intel C++ Compiler ICC )
+       DEFINES *= WIN32_ICC=1
+       QMAKE_CFLAGS = -nologo -Zm200 -W3 -MD -Od -Ob1 -arch:SSE2 -Qms2 -GA -EHsc -Zc:forScope -Qunroll500 -fast -Qprec -Qip -Qipo -Qparallel -Qopenmp -Ot -Oy -QaxKNBP -G7 -GX -GX -GR
+       QMAKE_CXXFLAGS *= $$QMAKE_CFLAGS
+
+       QMAKE_LFLAGS = /libpath:"C:/Intel/CPP/Compiler80/Ia32/Lib" \
+       /libpath:"C:/Program Files/Fichiers communs/Intel/Shared Files/Ia32/Lib" \
+       /libpath:"C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib" \
+       /libpath:"C:\Program Files\Microsoft Visual Studio .NET\Vc7\ATLMFC\LIB" \
+       /libpath:"C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib\prerelease" \
+       /libpath:"C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib" \
+       /libpath:"C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib" \
+       -nologo /DELAYLOAD:zlib.dll -nologo -Od -Ob1 -arch:SSE2 -Qms2 -GA -EHsc -Zc:forScope -Qunroll500 -fast -Qprec -Qip -Qipo -Qparallel -Qopenmp -Ot -Oy -QaxKNBP -G7
+}
+
+# Common part for all G++ compilers :
+*-g++* {
+    # Get more warnings on all G++ compilers.
+    QMAKE_CXXFLAGS_WARN_ON *= -Wall -W -Woverloaded-virtual -Wimplicit
+
+    # Keep some optimisations while in debug mode.
+    QMAKE_CXXFLAGS_DEBUG = -O1 -fno-omit-frame-pointer -g
+    QMAKE_LFLAGS_DEBUG += -g
+
+    # Use most agressive AND standard 'optimizing for speed' option.
+    QMAKE_CXXFLAGS_RELEASE = -O3
+}
+
+linux-g++* {
+    message( Compile using Linux platform specifics )
+    DEFINES *= LINUX=1
+    CONFIG *= linux
+
+    # On usual linux Qt distribution, only the thread-safe version of the 
+    # lib is compiled and installed...
+    CONFIG *= thread
+}
+
+irix-cc {
+    message( Compile using Irix platform specifics )
+    DEFINES *= SGI=1
+    CONFIG *= sgi
+    QMAKE_CXXFLAGS += -LANG:std -woff 1460,3284,1061
+    QMAKE_CXXFLAGS_RELEASE = -Ofast=IP35 -IPA:alias=ON -IPA:addressing=ON \
+                -IPA:aggr_cp
+                rop=ON -OPT:Olimit=0 -OPT:reorg_common=ON \
+                -OPT:rsqrt=ON -OPT:swp=ON -OPT:unroll_size=40000 \
+                -OPT:unroll_times_max=720 -LNO:auto_dist=ON -pca -apo
+    QMAKE_LFLAGS += -LANG:std
+    release: QMAKE_LFLAGS += $$QMAKE_CXXFLAGS_RELEASE
+
+    # MIPS is BigEndian
+    DEFINES += WORDS_BIGENDIAN=1
+}
+
+macx {
+    # ALSO the g++ compiler !
+    DEFINES *= MACX=1
+
+    # On universal binaries machine, let defaults work by themselfs...
+    # Adapt to PowerPC architectures :
+    # ppc {
+    #     !G5: !G4: !G3: CONFIG+=G4
+    #     G5: ARCH_PPC = -mtune=G5 -mpowerpc64 -mpowerpc-gpopt
+    #     G4: ARCH_PPC = -mtune=G4 -mpowerpc   -mpowerpc-gpopt -force_cpusubtype_ALL
+    #     G3: ARCH_PPC = -mtune=G3 -mpowerpc   -mpowerpc-gpopt -force_cpusubtype_ALL
+    #     QMAKE_CXXFLAGS += -arch ppc $$ARCH_PPC
+    #     QMAKE_CFLAGS   += -arch ppc $$ARCH_PPC
+    # }
+    # 
+    # And to x86 arch too !
+    # x86 {
+    #     ARCH_X86 = -mtune=pentiumpro -msse2 -mfpmath=sse
+    #     QMAKE_CXXFLAGS += -arch i386 $$ARCH_X86
+    #     QMAKE_CFLAGS   += -arch i386 $$ARCH_X86
+    # }
+
+    QMAKE_CXXFLAGS_RELEASE = -g -O3 -ffast-math -funroll-loops -finline -fobey-inline
+    QMAKE_CFLAGS_RELEASE   = -g -O3 -ffast-math -funroll-loops -finline -fobey-inline
+    QMAKE_CXXFLAGS_DEBUG   = -g -O1 -fno-inline
+    QMAKE_CFLAGS_DEBUG     = -g -O1 -fno-inline
+    QMAKE_LFLAGS += -g
+    
+    # PowerPC is BigEndian, x86 is not, and universal binaries means
+    # that every sources is compiled twice...
+    DEFINES *= WORDS_BIGENDIAN=__BIG_ENDIAN__
+}
+
+# Added HAVE_INT_TYPES and HAVE_UINT_TYPES in tiff.h, to avoid double-typedef 
+# of int32/uint32 etc. errors on some systems.
+#
+aix-xlc* {
+    DEFINES *= HAVE_INT_TYPES=1 HAVE_AIX=1
+}
+
+# Common to all unix platforms
+unix {
+       DEFINES *= UNIX=1
+       exists( /usr/include/string.h ): DEFINES *= HAVE_STRING_H=1
+       exists( /usr/include/unistd.h ): DEFINES *= HAVE_UNISTD_H=1
+}
+
+##############################################################################
+# Auto-detect Qt3 or Qt4 support mode...
+
+isEmpty(QTDIR) : QTDIR=$$(QTDIR)
+isEmpty(QTDIR) : error( QTDIR not set. Qt environement not installed correctly )
+
+# Auto-detect only if nothing said on the command line :
+!qt3: !qt4 {
+    macx {
+        exists( $$QTDIR/lib/QtCore.framework ) : CONFIG *= qt4
+        exists( /Library/Frameworks/QtCore.framework ) : CONFIG *= qt4
+    } else {
+        exists( $(QTDIR)/include/QtCore ) : CONFIG *= qt4
+    }
+
+    # Nothing detected: should be using Qt3...
+    !qt4: CONFIG *= qt3
+}
+
+qt3: qt4: error( Cannot be both Qt3 and Qt4 ! )
+
+qt4 {
+    message( Compiling for Qt4 )
+    !exists( $$QTDIR/include/Qt/qconfig.h ) : error( **** QTDIR for Qt4 does not leads to includes )
+    # Strange link error encontered on some windows variants:
+    # win32: QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMT
+    # win32: QMAKE_LFLAGS += /NODEFAULTLIB:MSVCRTD
+}
+
+qt3 {
+    message( Compiling for Qt3 )
+    !exists( $$QTDIR/include/qconfig.h ) : error( **** QTDIR for Qt3 does not leads to includes )
+}
+
+# If you have several versions of Qt installed, make sure the QTDIR's one
+# is the one used by the Makefile !
+unix {
+    QMAKE_UIC=$$QTDIR/bin/uic
+    QMAKE_MOC=$$QTDIR/bin/moc
+}