1
0

Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=trace-cmd
  3. PKG_VERSION:=v2.6
  4. PKG_RELEASE=1
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL:=\
  7. https://kernel.googlesource.com/pub/scm/linux/kernel/git/rostedt/trace-cmd \
  8. https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
  9. PKG_SOURCE_VERSION:=9be5d74805830a291615f2f34a27c903f6a37b1e
  10. PKG_MIRROR_HASH:=735b69f61a8c627037dcc01361cdb8415e5ab0ec892fbd731236c444003b0c71
  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))