X11 qmake.conf

From RidgeRun Developer Connection
Jump to: navigation, search

Introduction

This is the qmake.conf file used to compile Qt with X11 support for the iMX6 board.

qmake.fonf file

QMAKE_CFLAGS_THREAD             += -D_REENTRANT
QMAKE_CXXFLAGS_THREAD           += $$QMAKE_CFLAGS_THREAD
QMAKE_INCDIR                    = ___DEVDIR___/fs/fsdev/usr/include ___DEVDIR___/fs/fsdev/usr/include/freetype2
QMAKE_LIBDIR                    = ___DEVDIR___/fs/fsdev/lib ___DEVDIR___/fs/fsdev/usr/lib
QMAKE_INCDIR_QT                 = $$[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_QT                 = $$[QT_INSTALL_LIBS]
QMAKE_LIBS                      =
QMAKE_LIBS_DYNLOAD              = -ldl
QMAKE_LIBS_NIS                  = -lnsl
QMAKE_LIBS_THREAD               = -lpthread
QMAKE_CFLAGS_WAYLAND            =
QMAKE_INCDIR_WAYLAND            =
QMAKE_LIBS_WAYLAND              =
QMAKE_LIBDIR_WAYLAND            =
QMAKE_DEFINES_WAYLAND           =
QMAKE_MOC                       = $$[QT_INSTALL_BINS]/moc
QMAKE_UIC                       = $$[QT_INSTALL_BINS]/uic
QMAKE_RANLIB                    =
QMAKE_TAR                       = tar -cf
QMAKE_GZIP                      = gzip -9f
QMAKE_COPY                      = cp -f
QMAKE_COPY_FILE                 = $(COPY)
QMAKE_COPY_DIR                  = $(COPY) -r
QMAKE_MOVE                      = mv -f
QMAKE_DEL_FILE                  = rm -f
QMAKE_DEL_DIR                   = rmdir
QMAKE_STRIPFLAGS_LIB            += --strip-unneeded
QMAKE_CHK_DIR_EXISTS            = test -d
QMAKE_MKDIR                     = mkdir -p
QMAKE_INSTALL_FILE              = install -m 644 -p
QMAKE_INSTALL_PROGRAM           = install -m 755 -p
QMAKE_LEX                       = flex
QMAKE_YACC                      = yacc
QMAKE_YACCFLAGS                 += -d
QMAKE_YACCFLAGS_MANGLE          += -p $base -b $base
QMAKE_YACC_HEADER               = $base.tab.h
QMAKE_YACC_SOURCE               = $base.tab.c
QMAKE_PREFIX_SHLIB              = lib
QMAKE_PREFIX_STATICLIB          = lib
QMAKE_EXTENSION_STATICLIB       = a
QMAKE_CFLAGS                    += -pipe -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS_DEPS               += -M
QMAKE_CFLAGS_WARN_ON            += -Wall -W
QMAKE_CFLAGS_WARN_OFF           += -w
QMAKE_CFLAGS_RELEASE            += -O2
QMAKE_CFLAGS_DEBUG              += -g
QMAKE_CFLAGS_SHLIB              += -fPIC
QMAKE_CFLAGS_STATIC_LIB         += -fPIC
QMAKE_CFLAGS_YACC               += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS           += -fvisibility=hidden
QMAKE_CXXFLAGS                  += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_DEPS             += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON          += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF         += $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE          += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG            += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB            += $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB       += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_YACC             += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS         += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_LFLAGS                    += -Wl,-rpath-link ___DEVDIR___/fs/fsdev/usr/lib
QMAKE_LFLAGS_SHLIB              += -shared
QMAKE_LFLAGS_PLUGIN             += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME             += -Wl,-soname,
QMAKE_LFLAGS_RPATH              = -Wl,-rpath -Wl,___DEVDIR___/fs/fsdev/usr/lib
QMAKE_LFLAGS_BSYMBOLIC_FUNC     = -Wl,-Bsymbolic-functions
QMAKE_LFLAGS_DYNAMIC_LIST       = -Wl,--dynamic-list,
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_PCH_OUTPUT_EXT            = .gch
QMAKE_CFLAGS_PRECOMPILE         = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE     = -include ${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXXFLAGS_PRECOMPILE       = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE   = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_LFLAGS_RELEASE            += -Wl,-O1
QMAKE_LFLAGS_NOUNDEF            += -Wl,--no-undefined
MAKEFILE_GENERATOR              = UNIX
TARGET_PLATFORM                 = unix
TEMPLATE                        = app
CONFIG                          += qt warn_on release incremental link_prl gdb_dwarf_index
QT                              += core gui network
QMAKE_INCREMENTAL_STYLE         = sublib
QMAKE_INCDIR_X11            = ___DEVDIR___/fs/fsdev/usr/include/X11
QMAKE_LIBDIR_X11                = ___DEVDIR___/fs/fsdev/usr/lib/X11
QMAKE_LIBS_X11                  = -lXext -lX11 -lm -lXrandr
QMAKE_LIBS_X11SM                = -lSM -lICE
QMAKE_CC                        = ___TOOLCHAIN_CC___
QMAKE_CXX                       = ___TOOLCHAIN_CXX___
QMAKE_LINK                      = ___TOOLCHAIN_CXX___
QMAKE_LINK_SHLIB                = ___TOOLCHAIN_CXX___
QMAKE_AR                        = ___TOOLCHAIN_AR___ cqs
QMAKE_OBJCOPY                   = ___TOOLCHAIN_OBJCOPY___
QMAKE_STRIP                     = ___TOOLCHAIN_STRIP___

QMAKE_INCDIR_OPENGL_ES2 = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/
QMAKE_INCDIR_OPENGL_ES2 += ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/GLES2/
QMAKE_INCDIR_OPENGL_ES2 +=___DEVDIR___/fs/___FLOAT_ABI___/usr/include/
QMAKE_INCDIR_OPENGL_ES2 += ___DEVDIR___/fs/___FLOAT_ABI___/usr/include/GLES2/
QMAKE_LIBDIR_OPENGL_ES2 = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/

QMAKE_INCDIR_OPENGL     += ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/GLES/
QMAKE_LIBDIR_OPENGL     = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/
QMAKE_LIBDIR_OPENGL_QT  = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/
QMAKE_LIBS_OPENGL_ES1   = -lEGL -lGLES_CM -lIMGegl -lsrv_um -lusc

QMAKE_INCDIR_OPENVG     = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/
QMAKE_INCDIR_OPENVG     += ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/VG/
QMAKE_LIBDIR_OPENVG     = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/

QT_INSTALL_DIR          = $$PWD/../../../
QMAKE_INCDIR_POWERVR    = $$QT_INSTALL_DIR/src/3rdparty/powervr/wsegl2

QMAKE_INCDIR += $$QMAKE_INCDIR_OPENGL_ES2
QMAKE_INCDIR += ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/GLES
QMAKE_INCDIR += $$QT_INSTALL_DIR/src/src/3rdparty/powervr
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_LIBS = $$QMAKE_LIBS_OPENGL_ES2

QMAKE_INCDIR_OPENGL_ES1     = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/GLES/
QMAKE_LIBDIR_OPENGL_ES1     = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/
QMAKE_INCDIR_OPENGL_ES1CL   = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/GLES/
QMAKE_LIBDIR_OPENGL_ES1CL   = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/
QMAKE_INCDIR_EGL            = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/EGL/
QMAKE_INCDIR_EGL            += ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/include/
QMAKE_LIBDIR_EGL            = ___SGX_SDK_ROOT___/___FLOAT_ABI___/usr/lib/

QMAKE_LIBS_OPENGL_ES1       += -lGLESv1_CM -lEGL -lGAL
QMAKE_LIBS_OPENGL_ES1CL     += -lGLES_CL -lEGL -lGAL
QMAKE_LIBS_EGL        = -lEGL -lGAL -DLINUX=1 -DEGL_API_FB=1
QMAKE_LIBS_OPENGL     = -lGL
QMAKE_LIBS_OPENGL_QT  = -lGL
QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -lGAL -lEGL -DLINUX=1 -DEGL_API_FB=1
QMAKE_LIBS_OPENVG     = -lOpenVG -lGAL -lEGL -DLINUX=1 -DEGL_API_FB=1
QMAKE_LIBS_THREAD     = -lpthread

IMX6_CFLAGS             = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
IMX6_CFLAGS_RELEASE     = -O2 $$IMX6_CFLAGS
QMAKE_CFLAGS_RELEASE   += $$IMX6_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE
QMAKE_CFLAGS_DEBUG     += $$IMX6_CFLAGS
QMAKE_CXXFLAGS_DEBUG   += $$IMX6_CFLAGS



load(qt_config)