DTC_DEPENDENCIES = host-bison host-flex
HOST_DTC_DEPENDENCIES = host-bison host-flex
+DTC_MAKE_OPTS = \
+ PREFIX=/usr \
+ NO_PYTHON=1
+
+HOST_DTC_MAKE_OPTS = \
+ PREFIX=$(HOST_DIR) \
+ NO_PYTHON=1
+
define DTC_POST_INSTALL_TARGET_RM_DTDIFF
rm -f $(TARGET_DIR)/usr/bin/dtdiff
endef
endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
define DTC_BUILD_CMDS
- $(TARGET_CONFIGURE_OPTS) $(MAKE) CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) PREFIX=/usr
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) $(DTC_MAKE_OPTS)
endef
# For staging, only the library is needed
define DTC_INSTALL_STAGING_CMDS
- $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install-lib \
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) $(DTC_MAKE_OPTS) install-lib \
install-includes
endef
define DTC_INSTALL_TARGET_CMDS
- $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL)
+ $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(DTC_MAKE_OPTS) $(DTC_INSTALL_GOAL)
endef
# host build
define HOST_DTC_BUILD_CMDS
- $(HOST_CONFIGURE_OPTS) $(MAKE) CFLAGS="$(HOST_CFLAGS) -fPIC" -C $(@D) PREFIX=$(HOST_DIR)
+ $(HOST_CONFIGURE_OPTS) $(MAKE) CFLAGS="$(HOST_CFLAGS) -fPIC" -C $(@D) $(HOST_DTC_MAKE_OPTS)
endef
define HOST_DTC_INSTALL_CMDS
- $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install
+ $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(HOST_DTC_MAKE_OPTS) install
endef
$(eval $(generic-package))