QT5交叉编译环境qmake配置

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_PLATFORM         += linux unix posix
QMAKE_LEX               = flex
QMAKE_LEXFLAGS         +=
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_EXTENSION_SHLIB   = so
QMAKE_PREFIX_STATICLIB  = lib
QMAKE_EXTENSION_STATICLIB = a
QMAKE_CFLAGS_THREAD    += -D_REENTRANT
QMAKE_CXXFLAGS_THREAD  += $$QMAKE_CFLAGS_THREAD
QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
QMAKE_LFLAGS_REL_RPATH  = -Wl,-z,origin
QMAKE_REL_RPATH_BASE    = $ORIGIN
QMAKE_INCDIR            =
QMAKE_LIBDIR            =
QMAKE_INCDIR_X11        =
QMAKE_LIBDIR_X11        =
QMAKE_INCDIR_OPENGL     =
QMAKE_LIBDIR_OPENGL     =
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL        =
QMAKE_LIBDIR_EGL        =
QMAKE_INCDIR_OPENVG     =
QMAKE_LIBDIR_OPENVG     =
QMAKE_LIBS              =
QMAKE_LIBS_DYNLOAD      = -ldl
QMAKE_LIBS_X11          = -lXext -lX11 -lm
QMAKE_LIBS_NIS          = -lnsl
QMAKE_LIBS_EGL          = -lEGL
QMAKE_LIBS_OPENGL       = -lGL
QMAKE_LIBS_OPENGL_ES2   = -lGLESv2
QMAKE_LIBS_OPENVG       = -lOpenVG
QMAKE_LIBS_THREAD       = -lpthread
QMAKE_LIBS_LIBUDEV      = -ludev
QMAKE_CFLAGS_WAYLAND    =
QMAKE_INCDIR_WAYLAND    =
QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client
QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server
QMAKE_LIBDIR_WAYLAND    =
QMAKE_DEFINES_WAYLAND   =
QMAKE_WAYLAND_SCANNER   = wayland-scanner
QMAKE_CFLAGS_XCB        =
QMAKE_LIBS_XCB          =
QMAKE_DEFINES_XCB       =

QMAKE_AR                = arm-poky-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = arm-poky-linux-gnueabi-objcopy
QMAKE_NM                = arm-poky-linux-gnueabi-nm -P
QMAKE_RANLIB            = arm-poky-linux-gnueabi-ranlib
QMAKE_STRIP             = arm-poky-linux-gnueabi-strip
QMAKE_STRIPFLAGS_LIB   += --strip-unneeded

QMAKE_CFLAGS_OPTIMIZE       = -O2
QMAKE_CFLAGS_OPTIMIZE_FULL  = -O3
QMAKE_CFLAGS               += -pipe
QMAKE_CFLAGS_DEPS          += -M
QMAKE_CFLAGS_WARN_ON       += -Wall -W
QMAKE_CFLAGS_WARN_OFF      += -w
QMAKE_CFLAGS_RELEASE       += $$QMAKE_CFLAGS_OPTIMIZE
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
QMAKE_CFLAGS_DEBUG         += -g -feliminate-unused-debug-types
QMAKE_CFLAGS_SHLIB         += -fPIC
QMAKE_CFLAGS_STATIC_LIB    += -fPIC
QMAKE_CFLAGS_APP           += -fPIC
QMAKE_CFLAGS_ISYSTEM        = -isystem
QMAKE_CFLAGS_YACC          += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS      += -fvisibility=hidden
QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
QMAKE_CFLAGS_SPLIT_SECTIONS += -ffunction-sections
QMAKE_CFLAGS_LTCG           = -flto -fno-fat-lto-objects
QMAKE_CFLAGS_LTCG_FATOBJECTS = -ffat-lto-objects
QMAKE_CFLAGS_DISABLE_LTCG   = -fno-lto
QMAKE_CFLAGS_SSE2      += -msse2
QMAKE_CFLAGS_SSE3      += -msse3
QMAKE_CFLAGS_SSSE3     += -mssse3
QMAKE_CFLAGS_SSE4_1    += -msse4.1
QMAKE_CFLAGS_SSE4_2    += -msse4.2
QMAKE_CFLAGS_AVX       += -mavx
QMAKE_CFLAGS_AVX2      += -mavx2
QMAKE_CFLAGS_NEON      += -mfpu=neon
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            += $$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_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_DEBUG      += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB      += $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
QMAKE_CXXFLAGS_APP        += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC       += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS   += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS_LTCG        = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
QMAKE_CXXFLAGS_DISABLE_LTCG   = $$QMAKE_CFLAGS_DISABLE_LTCG
QMAKE_CXXFLAGS_PRECOMPILE     = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_CXXFLAGS_CXX11    = -std=c++0x
QMAKE_CXXFLAGS_CXX14    = -std=c++1y
QMAKE_CXXFLAGS_CXX1Z    = -std=c++1z
QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++0x
QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z

QMAKE_LFLAGS           += -Wl,--hash-style=gnu -Wl,--as-needed
QMAKE_LFLAGS_DEBUG     +=
QMAKE_LFLAGS_APP       +=
QMAKE_LFLAGS_RELEASE   +=
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO +=
QMAKE_LFLAGS_EXCEPTIONS_OFF +=
QMAKE_LFLAGS_LTCG       = $$QMAKE_CFLAGS_LTCG -fuse-linker-plugin
QMAKE_LFLAGS_SHLIB     += -shared
QMAKE_LFLAGS_PLUGIN    += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME    += -Wl,-soname,
QMAKE_LFLAGS_THREAD    +=
QMAKE_LFLAGS_RPATH      = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK  = -Wl,-rpath-link,
QMAKE_LFLAGS_NEW_DTAGS  = -Wl,--enable-new-dtags
QMAKE_LFLAGS_USE_GOLD   = -fuse-ld=gold
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
QMAKE_LFLAGS_DYNAMIC_LIST   = -Wl,--dynamic-list,
QMAKE_LFLAGS_VERSION_SCRIPT = -Wl,--version-script,
QMAKE_LFLAGS_CXX11      =
QMAKE_LFLAGS_CXX14      =
QMAKE_LFLAGS_CXX1Z      =
QMAKE_LFLAGS_RELEASE   += -Wl,-O1
QMAKE_LFLAGS_NOUNDEF   += -Wl,--no-undefined

QMAKE_AR_LTCG           = gcc-ar cqs
QMAKE_NM_LTCG           = gcc-nm -P

QMAKE_RANLIB_LTCG       = true          # No need to run since gcc-ar has "s"
QMAKE_COMMON_SANITIZE_CFLAGS   = -fno-omit-frame-pointer
QMAKE_COMMON_SANITIZE_CXXFLAGS = -fno-omit-frame-pointer
QMAKE_SANITIZE_ADDRESS_CFLAGS     = -fsanitize=address
QMAKE_SANITIZE_ADDRESS_CXXFLAGS   = -fsanitize=address
QMAKE_SANITIZE_ADDRESS_LFLAGS     = -fsanitize=address
QMAKE_SANITIZE_THREAD_CFLAGS      = -fsanitize=thread
QMAKE_SANITIZE_THREAD_CXXFLAGS    = -fsanitize=thread
QMAKE_SANITIZE_THREAD_LFLAGS      = -fsanitize=thread
QMAKE_SANITIZE_MEMORY_CFLAGS      = -fsanitize=memory
QMAKE_SANITIZE_MEMORY_CXXFLAGS    = -fsanitize=memory
QMAKE_SANITIZE_MEMORY_LFLAGS      = -fsanitize=memory
QMAKE_SANITIZE_UNDEFINED_CFLAGS   = -fsanitize=undefined
QMAKE_SANITIZE_UNDEFINED_CXXFLAGS = -fsanitize=undefined
QMAKE_SANITIZE_UNDEFINED_LFLAGS   = -fsanitize=undefined

QMAKE_COMPILER          = arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-x11/4.1.15-2.0.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi
QMAKE_CC                = arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-x11/4.1.15-2.0.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi
QMAKE_LINK_C            = $$QMAKE_CC
QMAKE_LINK_C_SHLIB      = $$QMAKE_CC
QMAKE_CXX               = arm-poky-linux-gnueabi-g++  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-x11/4.1.15-2.0.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi
QMAKE_LINK              = $$QMAKE_CXX
QMAKE_LINK_SHLIB        = $$QMAKE_CXX

QMAKE_PCH_OUTPUT_EXT    = .gch

load(qt_config)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值