Revert "dtc: install libfdt library and headers for host variant"
[buildroot-gz.git] / package / dtc / dtc.mk
blob8fdcdbed7766ea5c29f1546ba45a2bcbd3965db9
1 ################################################################################
3 # dtc
5 ################################################################################
7 DTC_VERSION = 1.4.1
8 DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz
9 DTC_SITE = https://www.kernel.org/pub/software/utils/dtc
10 DTC_LICENSE = GPLv2+/BSD-2c
11 DTC_LICENSE_FILES = README.license GPL
12 DTC_INSTALL_STAGING = YES
13 DTC_DEPENDENCIES = host-bison host-flex
14 HOST_DTC_DEPENDENCIES = host-bison host-flex
16 define DTC_POST_INSTALL_TARGET_RM_DTDIFF
17 rm -f $(TARGET_DIR)/usr/bin/dtdiff
18 endef
20 ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y)
22 DTC_LICENSE += (for the library), GPLv2+ (for the executables)
23 DTC_INSTALL_GOAL = install
24 ifeq ($(BR2_PACKAGE_BASH),)
25 DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
26 endif
28 else # $(BR2_PACKAGE_DTC_PROGRAMS) != y
30 DTC_INSTALL_GOAL = install-lib
32 endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
34 define DTC_BUILD_CMDS
35 $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr
36 endef
38 # For staging, only the library is needed
39 define DTC_INSTALL_STAGING_CMDS
40 $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install-lib \
41 install-includes
42 endef
44 define DTC_INSTALL_TARGET_CMDS
45 $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL)
46 endef
48 # host build
49 define HOST_DTC_BUILD_CMDS
50 $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr
51 endef
53 define HOST_DTC_INSTALL_CMDS
54 $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install-bin
55 endef
57 $(eval $(generic-package))
58 $(eval $(host-generic-package))