######################################################################
# common config for project
######################################################################

DEPENDPATH        += .

CONFIG            += debug_and_release
CONFIG            += warn_off
CONFIG            -= warn_on 

CONFIG(debug, debug|release) {
    TARGET = $$join(TARGET,,,d)
    QMAKE_CXXFLAGS_DEBUG += -DDEBUG
}

unix {
    QMAKE_CXXFLAGS_WARN_ON = -Wall
    QMAKE_CXXFLAGS_WARN_OFF = -w
    LIBS += -lrt -ldl
    OS_VERSION = $$system(uname -a)
    contains(OS_VERSION, SunOS) {
		#QMAKE_CXXFLAGS +=-D_POSIX_PTHREAD_SEMANTICS
		LIBS += -lsocket -lnsl
    }    
    contains(QMAKE_CXXFLAGS, -m64) {
		DEFINES  +=FE_VERSION_64	
    }
}

win32 { 
    DEFINES                 -= UNICODE
    QMAKE_INCDIR            =  $(QTDIR)/include
    QMAKE_INCDIR_QT         =  $(QTDIR)/include
    QMAKE_LIBDIR_QT         =  $(QTDIR)/lib
    QMAKE_LFLAGS_RELEASE    =  /INCREMENTAL:no
    QMAKE_LFLAGS_DEBUG      += /INCREMENTAL:no  
    QMAKE_LFLAGS            += /MACHINE:X86
    QMAKE_MOC               =  $$(QTDIR)/bin/moc.exe
    QMAKE_RCC               =  $$(QTDIR)/bin/rcc.exe
    QMAKE_UIC               =  $$(QTDIR)/bin/uic.exe
    QMAKE_IDC               =  $$(QTDIR)/bin/idc.exe
    CONFIG                  -= warn_on 
    INCLUDEPATH             +=$(QTDIR)/mkspecs/win32-msvc2010 
    QMAKE_CXXFLAGS          +=-DWIN32_LEAN_AND_MEAN    
    #for remove ACE warning
    DEFINES		    += _CRT_SECURE_NO_DEPRECATE _M_IX86 WIN32
}
