#
# qmake configuration for linux-g++ with modifications for building with OpenEmbedded
#

MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)

# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip
QMAKE_AR              = $$(OE_QMAKE_AR) cqs
QMAKE_STRIP           = $$(OE_QMAKE_STRIP)

include(../common/gcc-base-unix.conf)

# *FLAGS from gcc-base.conf
QMAKE_CFLAGS                += $$(OE_QMAKE_CFLAGS)
QMAKE_CXXFLAGS              += $$(OE_QMAKE_CXXFLAGS)
QMAKE_LFLAGS                += $$(OE_QMAKE_LDFLAGS)

include(../common/g++-unix.conf)

# tc settings from g++-base.conf
QMAKE_CC       = $$(OE_QMAKE_CC)
QMAKE_CXX      = $$(OE_QMAKE_CXX)

QMAKE_LINK         = $$(OE_QMAKE_LINK)
QMAKE_LINK_SHLIB   = $$(OE_QMAKE_LINK)
QMAKE_LINK_C       = $$(OE_QMAKE_LINK)
QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK)
QMAKE_CFLAGS_ISYSTEM =
# for the SDK
isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG)

include(../oe-device-extra.pri)

load(device_config)
load(qt_config)

# default compiler options which can be overwritten from the environment
count(QMAKE_AR, 1): QMAKE_AR = aarch64-xilinx-linux-gcc-ar cqs
isEmpty(QMAKE_CC): QMAKE_CC = aarch64-xilinx-linux-gcc -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
isEmpty(QMAKE_CXX): QMAKE_CXX = aarch64-xilinx-linux-g++ -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
isEmpty(QMAKE_CFLAGS): QMAKE_CFLAGS =  -O2 -pipe -g -feliminate-unused-debug-types                 
isEmpty(QMAKE_CXXFLAGS): QMAKE_CXXFLAGS =  -O2 -pipe -g -feliminate-unused-debug-types                  -fvisibility-inlines-hidden
isEmpty(QMAKE_LINK): QMAKE_LINK = aarch64-xilinx-linux-g++ -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
isEmpty(QMAKE_LINK_SHLIB): QMAKE_LINK_SHLIB = aarch64-xilinx-linux-g++ -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
isEmpty(QMAKE_LINK_C): QMAKE_LINK_C = aarch64-xilinx-linux-g++ -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = aarch64-xilinx-linux-g++ -mcpu=cortex-a72.cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/git=/usr/src/debug/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0  -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/git=/usr/src/debug/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0  -fmacro-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/build=/usr/src/debug/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0  -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/build=/usr/src/debug/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0  -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/recipe-sysroot=  -fmacro-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/recipe-sysroot=  -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/recipe-sysroot-native=   -fmacro-prefix-map=/scratch/jenkins-BUILDS-eSDK-2023.1_stable-pipeline-build_async-47_ZynqMpEvFull/build/tmp/work/zynqmp_generic-xilinx-linux/qtbase/5.15.4+gitAUTOINC+fa9a234c10-r0/image=  -Wl,-z,relro,-z,now
isEmpty(QMAKE_OBJCOPY): QMAKE_OBJCOPY = aarch64-xilinx-linux-objcopy
isEmpty(QMAKE_STRIP): QMAKE_STRIP = aarch64-xilinx-linux-strip
isEmpty(CC_host): CC_host = gcc
isEmpty(CXX_host): CXX_host = g++
isEmpty(LD_host): LD_host = g++
