1 include $(TOPDIR)/rules.mk
8 PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
9 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=8c10a774f1f8586cd8b0e3ce8666a376cb1d98e3
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 # PKG_MIRROR_MD5SUM:=6a08dfa2519a969d184e7bb5bb390620
17 include $(INCLUDE_DIR)/package.mk
19 define Package/trace-cmd
22 TITLE:=Linux trace command line utility
26 define Package/trace-cmd-extra
29 TITLE:=Extra plugins for trace-cmd
37 PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins
38 PLUGINS_MAIN := function hrtimer mac80211 sched_switch
40 TARGET_CFLAGS += --std=gnu99
42 define Package/trace-cmd/install
43 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins
44 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/
46 $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
47 $(1)/usr/lib/trace-cmd/plugins
50 define Package/trace-cmd-extra/install
51 $(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins
53 $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
54 $$(filter-out $(PLUGINS_MAIN), \
55 $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
56 $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
57 $(1)/usr/lib/trace-cmd/plugins
60 $(eval $(call BuildPackage,trace-cmd))
61 $(eval $(call BuildPackage,trace-cmd-extra))