Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=trace-cmd
  3. PKG_VERSION:=v2.4.2
  4. PKG_RELEASE=1
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
  7. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  8. PKG_SOURCE_VERSION:=01f8e669cb035aa911f1ee0e3f94d535cbcca78f
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. # PKG_MIRROR_MD5SUM:=6a08dfa2519a969d184e7bb5bb390620
  11. PKG_INSTALL:=1
  12. PKG_USE_MIPS16:=0
  13. PKG_LICENSE:=GPL-2.0
  14. PKG_BUILD_PARALLEL:=1
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/trace-cmd
  17. SECTION:=devel
  18. CATEGORY:=Development
  19. TITLE:=Linux trace command line utility
  20. DEPENDS:=
  21. endef
  22. define Package/trace-cmd-extra
  23. SECTION:=devel
  24. CATEGORY:=Development
  25. TITLE:=Extra plugins for trace-cmd
  26. DEPENDS:=
  27. endef
  28. MAKE_FLAGS += \
  29. NO_PYTHON=1 \
  30. prefix=/usr
  31. PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins
  32. PLUGINS_MAIN := function hrtimer mac80211 sched_switch
  33. TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE
  34. define Package/trace-cmd/install
  35. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/
  37. $(CP) \
  38. $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
  39. $(1)/usr/lib/trace-cmd/plugins
  40. endef
  41. define Package/trace-cmd-extra/install
  42. $(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins
  43. $(CP) \
  44. $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
  45. $$(filter-out $(PLUGINS_MAIN), \
  46. $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
  47. $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
  48. $(1)/usr/lib/trace-cmd/plugins
  49. endef
  50. $(eval $(call BuildPackage,trace-cmd))
  51. $(eval $(call BuildPackage,trace-cmd-extra))