Makefile (1830B)
1 # 2 # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com> 3 # 4 # This is free software, licensed under the GNU General Public License v2. 5 # See /LICENSE for more information. 6 # 7 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=dtc 11 PKG_VERSION:=1.4.2 12 PKG_RELEASE:=2 13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz 14 PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc 15 PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0 16 PKG_LICENSE:=GPL-2.0 17 PKG_LICENSE_FILES:=GPL 18 PKG_INSTALL:=1 19 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com> 20 21 include $(INCLUDE_DIR)/package.mk 22 23 24 define Package/dtc 25 SECTION:=utils 26 CATEGORY:=Utilities 27 TITLE:=Device Tree Compiler 28 URL:=http://devicetree.org/Device_Tree_Compiler 29 endef 30 31 define Package/dtc/description 32 Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes 33 as input a device-tree in a given format and outputs a device-tree in another 34 format for booting kernels on embedded systems. 35 endef 36 37 define Package/dtc/install 38 $(INSTALL_DIR) $(1)/usr/bin 39 $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin 40 endef 41 42 43 define Package/libfdt 44 SECTION:=libs 45 CATEGORY:=Libraries 46 TITLE:=a utility library for reading and manipulating dtb files 47 URL:=http://devicetree.org/Device_Tree_Compiler 48 endef 49 50 define Package/libfdt/description 51 This is a library containing functions for manipulating Flat Device Trees. 52 endef 53 54 define Package/libfdt/install 55 $(INSTALL_DIR) $(1)/usr/lib 56 $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib 57 endef 58 59 TARGET_CFLAGS += \ 60 $(FPIC) 61 62 MAKE_FLAGS += \ 63 PREFIX= \ 64 CFLAGS="$(TARGET_CFLAGS)" 65 66 define Build/InstallDev 67 $(INSTALL_DIR) $(1)/usr/lib 68 $(INSTALL_DIR) $(1)/usr/include 69 $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include 70 $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib 71 endef 72 73 $(eval $(call BuildPackage,dtc)) 74 $(eval $(call BuildPackage,libfdt))