python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / oprofile / oprofile.mk
blobf6c0f130e9e7591248fbaa058dbe033c59e1ecf2
1 ################################################################################
3 # oprofile
5 ################################################################################
7 OPROFILE_VERSION = 1.1.0
8 OPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION)
9 OPROFILE_LICENSE = GPLv2+
10 OPROFILE_LICENSE_FILES = COPYING
11 OPROFILE_CONF_OPTS = \
12 --disable-account-check \
13 --enable-gui=no \
14 --with-kernel=$(STAGING_DIR)/usr
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
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
38 OPROFILE_DEPENDENCIES = popt binutils host-pkgconf
40 ifeq ($(BR2_PACKAGE_LIBPFM4),y)
41 OPROFILE_DEPENDENCIES += libpfm4
42 endif
44 # When gettext is enabled, popt links with -lintl, specifies it in its
45 # popt.pc and has done so for the past 6+ years. But oprofile does not
46 # use pkconfig to find popt, so misses -lintl, which is important for
47 # a static build. We have to do the call to pkgconfig manually...
48 OPROFILE_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs popt`"
50 ifeq ($(BR2_STATIC_LIBS),)
51 define OPROFILE_INSTALL_SHARED_LIBRARY
52 $(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile
53 endef
54 endif
56 define OPROFILE_INSTALL_TARGET_CMDS
57 $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin
58 $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/oprofile
59 $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib/oprofile
60 if [ -d $(@D)/events/$(OPROFILE_ARCH) ]; then \
61 cp -dpfr $(@D)/events/$(OPROFILE_ARCH) \
62 $(TARGET_DIR)/usr/share/oprofile; \
64 $(INSTALL) -m 644 $(@D)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile
65 $(INSTALL) -m 755 $(addprefix $(@D)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin
66 $(OPROFILE_INSTALL_SHARED_LIBRARY)
67 endef
69 $(eval $(autotools-package))