toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / trace-cmd / trace-cmd.mk
blob2348155cb8e596c5aebc1bcc384757c5bf84285e
1 ################################################################################
3 # trace-cmd
5 ################################################################################
7 TRACE_CMD_VERSION = trace-cmd-v2.6
8 TRACE_CMD_SITE = $(BR2_KERNEL_MIRROR)/scm/linux/kernel/git/rostedt/trace-cmd.git
9 TRACE_CMD_SITE_METHOD = git
10 TRACE_CMD_INSTALL_STAGING = YES
11 TRACE_CMD_LICENSE = GPLv2, LGPLv2.1
12 TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB
14 TRACE_CMD_DEPENDENCIES = host-pkgconf
16 ifeq ($(BR2_PACKAGE_AUDIT),y)
17 TRACE_CMD_DEPENDENCIES += audit
18 endif
20 ifeq ($(BR2_PACKAGE_PYTHON),y)
21 TRACE_CMD_DEPENDENCIES += python host-swig
22 TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python
23 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
24 TRACE_CMD_DEPENDENCIES += python3 host-swig
25 TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python3
26 else
27 TRACE_CMD_MAKE_OPTS += NO_PYTHON=1
28 endif
30 # trace-cmd already defines _LARGEFILE64_SOURCE when necessary,
31 # redefining it on the command line causes build problems.
32 TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
34 # trace-cmd use CPPFLAGS to add some extra flags.
35 # But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE
36 # that causes build problems.
37 TRACE_CMD_CPPFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CPPFLAGS))
39 define TRACE_CMD_BUILD_CMDS
40 $(MAKE) $(TARGET_CONFIGURE_OPTS) \
41 CFLAGS="$(TRACE_CMD_CFLAGS)" \
42 CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \
43 $(TRACE_CMD_MAKE_OPTS) \
44 -C $(@D) all
45 endef
47 define TRACE_CMD_INSTALL_TARGET_CMDS
48 $(INSTALL) -D -m 0755 $(@D)/trace-cmd $(TARGET_DIR)/usr/bin/trace-cmd
49 $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/trace-cmd/plugins
50 $(INSTALL) -D -m 0755 $(@D)/plugin_*.so $(TARGET_DIR)/usr/lib/trace-cmd/plugins
51 endef
53 $(eval $(generic-package))