#
# qmake configuration for makefile based symbian
#

contains(QMAKE_HOST.os,Windows) {
    MAKEFILE_GENERATOR	= SYMBIAN_MINGW
} else {
    MAKEFILE_GENERATOR	= SYMBIAN_UNIX
}

include(symbian.conf)

QMAKE_INCDIR_OPENGL   = $${EPOCROOT}epoc32/include
QMAKE_LIBDIR_OPENGL   = $${EPOCROOT}epoc32/release/armv5/lib
QMAKE_INCDIR_OPENGL_ES1 = $${EPOCROOT}epoc32/include/GLES
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENGL_ES2 = $${EPOCROOT}epoc32/include/GLES2
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL      = $${EPOCROOT}epoc32/include/EGL
QMAKE_LIBDIR_EGL      = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_OPENVG   = $${EPOCROOT}epoc32/include/VG
QMAKE_LIBDIR_OPENVG   = $$QMAKE_LIBDIR_OPENGL

QMAKE_LIBDIR_QT         = $$[QT_INSTALL_LIBS]

QMAKE_RUN_CC		= $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CC_IMP	= $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
QMAKE_RUN_CXX		= $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CXX_IMP	= $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

QMAKE_ELF2E32_FLAGS	= --dlldata \
                          --fpu=softvfp \
                          --unfrozen \
                          --compressionmethod bytepair \
                          --unpaged

CONFIG(debug, debug|release) {
    QMAKE_ELF2E32_FLAGS += \
                           --debuggable
}

QMAKE_PREFIX_SHLIB    =
CONFIG *= no_plugin_name_prefix
QMAKE_PREFIX_STATICLIB =
QMAKE_SYMBIAN_SHLIB   = 1

QMAKE_LINK_OBJECT_SCRIPT = objects

is_using_gnupoc {
    DEFINES *= __QT_PRODUCT_INCLUDE_IS_LOWERCASE__
}
QMAKE_SYMBIAN_INCLUDES = $$IN_PWD/symbianincludes.h
symbian-armcc {
    QMAKE_CFLAGS += --preinclude $$QMAKE_SYMBIAN_INCLUDES
    QMAKE_CXXFLAGS += --preinclude $$QMAKE_SYMBIAN_INCLUDES
} else:symbian-gcce {
    QMAKE_CFLAGS += -include $$QMAKE_SYMBIAN_INCLUDES
    QMAKE_CXXFLAGS += -include $$QMAKE_SYMBIAN_INCLUDES
}
DEFINES *= \
    __SYMBIAN32__ \
    __MARM_INTERWORK__ \
    _UNICODE \
    __S60_50__ \
    __S60_3X__ \
    __SERIES60_3X__ \
    __EPOC32__ \
    __MARM__ \
    __EABI__ \
    __MARM_ARMV5__ \
    __SUPPORT_CPP_EXCEPTIONS__

QMAKE_CFLAGS_DEBUG      += -g
QMAKE_CXXFLAGS_DEBUG    += -g
QMAKE_CFLAGS_RELEASE    += -O2 -Otime
QMAKE_CXXFLAGS_RELEASE  += -O2 -Otime

