1
0

Makefile 1.5 KB

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