lantiq: move the dsl-modem config to network.@dsl-modem[-1]
[openwrt/svn-archive/archive.git] / package / devel / trace-cmd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=trace-cmd
4 PKG_VERSION:=v2.2.1
5 PKG_RELEASE=1
6
7 PKG_SOURCE_PROTO:=git
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
13 PKG_INSTALL:=1
14 PKG_USE_MIPS16:=0
15
16 PKG_BUILD_PARALLEL:=1
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/trace-cmd
21 SECTION:=devel
22 CATEGORY:=Development
23 TITLE:=Linux trace command line utility
24 DEPENDS:=
25 endef
26
27 define Package/trace-cmd-extra
28 SECTION:=devel
29 CATEGORY:=Development
30 TITLE:=Extra plugins for trace-cmd
31 DEPENDS:=
32 endef
33
34 MAKE_FLAGS += \
35 NO_PYTHON=1 \
36 prefix=/usr
37
38 PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins
39 PLUGINS_MAIN := function hrtimer mac80211 sched_switch
40
41 TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE
42
43 define Package/trace-cmd/install
44 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/trace-cmd/plugins
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/
46 $(CP) \
47 $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \
48 $(1)/usr/lib/trace-cmd/plugins
49 endef
50
51 define Package/trace-cmd-extra/install
52 $(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins
53 $(CP) \
54 $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
55 $$(filter-out $(PLUGINS_MAIN), \
56 $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
57 $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
58 $(1)/usr/lib/trace-cmd/plugins
59 endef
60
61 $(eval $(call BuildPackage,trace-cmd))
62 $(eval $(call BuildPackage,trace-cmd-extra))