]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/oprofile/oprofile.mk
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / oprofile / oprofile.mk
1 ################################################################################
2 #
3 # oprofile
4 #
5 ################################################################################
6
7 OPROFILE_VERSION = 1.1.0
8 OPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION)
9 OPROFILE_LICENSE = GPL-2.0+
10 OPROFILE_LICENSE_FILES = COPYING
11 OPROFILE_CONF_OPTS = \
12         --disable-account-check \
13         --enable-gui=no \
14         --with-kernel=$(STAGING_DIR)/usr
15
16 OPROFILE_BINARIES = \
17         utils/ophelp pp/opannotate pp/oparchive pp/opgprof \
18         pp/opreport opjitconv/opjitconv \
19         utils/op-check-perfevents libabi/opimport \
20         pe_counting/ocount pe_profiling/operf
21
22 ifeq ($(BR2_i386),y)
23 OPROFILE_ARCH = i386
24 endif
25 ifeq ($(BR2_mipsel),y)
26 OPROFILE_ARCH = mips
27 endif
28 ifeq ($(BR2_powerpc),y)
29 OPROFILE_ARCH = ppc
30 endif
31 ifeq ($(BR2_x86_64),y)
32 OPROFILE_ARCH = x86-64
33 endif
34 ifeq ($(OPROFILE_ARCH),)
35 OPROFILE_ARCH = $(BR2_ARCH)
36 endif
37
38 OPROFILE_DEPENDENCIES = popt binutils host-pkgconf
39
40 ifeq ($(BR2_PACKAGE_LIBPFM4),y)
41 OPROFILE_DEPENDENCIES += libpfm4
42 endif
43
44 ifeq ($(BR2_STATIC_LIBS),)
45 define OPROFILE_INSTALL_SHARED_LIBRARY
46         $(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile
47 endef
48 endif
49
50 define OPROFILE_INSTALL_TARGET_CMDS
51         $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin
52         $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/oprofile
53         $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib/oprofile
54         if [ -d $(@D)/events/$(OPROFILE_ARCH) ]; then \
55                 cp -dpfr $(@D)/events/$(OPROFILE_ARCH) \
56                         $(TARGET_DIR)/usr/share/oprofile; \
57         fi
58         $(INSTALL) -m 644 $(@D)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile
59         $(INSTALL) -m 755 $(addprefix $(@D)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin
60         $(OPROFILE_INSTALL_SHARED_LIBRARY)
61 endef
62
63 $(eval $(autotools-package))