use variables for calling qmake
authorMirko Vogt <mirko-dev@nanl.de>
Tue, 21 Feb 2017 18:16:52 +0000 (19:16 +0100)
committerMirko Vogt <mirko-dev@nanl.de>
Tue, 21 Feb 2017 18:19:20 +0000 (19:19 +0100)
We need to distinguish as carefully as possible
between qmake for the host builds and qmake for
target builds

frameworks/qt5base/files/qmake.mk

index 3feabc6b04a9993c16a2693a373b2b25947f0d3a..80066dc31c7627a5a8c4cac588779112e82674b0 100644 (file)
@@ -74,18 +74,21 @@ HOST_INSTALL_DIR_ROOT:=$(HOST_INSTALL_DIR)
 HOST_INSTALL_DIR:=$(HOST_INSTALL_DIR_ROOT)/$(STAGING_DIR_HOST)
 #HOST_INSTALL_DIR:=$(HOST_INSTALL_DIR_ROOT)/$(STAGING_DIR)
 
+QMAKE_TARGET=$(STAGING_DIR)/bin/qmake
+QMAKE_HOST=$(STAGING_DIR_HOST)/bin/qmake
+
 define Build/Configure/Default
        TARGET_CROSS="$(TARGET_CROSS)" \
        TARGET_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
        TARGET_CXXFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS)" \
        TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
-       qmake \
+       $(QMAKE_TARGET) \
                -o $(PKG_BUILD_DIR)/$(MAKE_PATH)/Makefile \
                $(PKG_BUILD_DIR)/$(MAKE_PATH)/$(if $(1),$(1).pro,)
 endef
 
 define Host/Configure/Default
-       qmake_host \
+       $(QMAKE_HOST) \
                -o $(HOST_BUILD_DIR)/$(MAKE_PATH)/Makefile \
                $(HOST_BUILD_DIR)/$(MAKE_PATH)/$(if $(1),$(1).pro,)
 endef
@@ -106,9 +109,6 @@ define Build/Compile/Default
 endef
 
 define Host/Compile/Default
-       +TARGET_CFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" \
-       TARGET_CXXFLAGS="$(HOST_CPPFLAGS) $(HOST_CXXFLAGS)" \
-       TARGET_LDFLAGS="$(HOST_LDFLAGS)" \
                $(MAKE) $(PKG_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) \
                        $(1)
 endef