xref: /OK3568_Linux_fs/buildroot/package/oprofile/oprofile.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# oprofile
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunOPROFILE_VERSION = 1.4.0
8*4882a593SmuzhiyunOPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION)
9*4882a593SmuzhiyunOPROFILE_LICENSE = GPL-2.0+
10*4882a593SmuzhiyunOPROFILE_LICENSE_FILES = COPYING
11*4882a593SmuzhiyunOPROFILE_CPE_ID_VENDOR = maynard_johnson
12*4882a593SmuzhiyunOPROFILE_CONF_OPTS = \
13*4882a593Smuzhiyun	--disable-account-check \
14*4882a593Smuzhiyun	--enable-gui=no \
15*4882a593Smuzhiyun	--with-kernel=$(STAGING_DIR)/usr
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunOPROFILE_BINARIES = \
18*4882a593Smuzhiyun	utils/ophelp pp/opannotate pp/oparchive pp/opgprof \
19*4882a593Smuzhiyun	pp/opreport opjitconv/opjitconv \
20*4882a593Smuzhiyun	utils/op-check-perfevents libabi/opimport \
21*4882a593Smuzhiyun	pe_counting/ocount pe_profiling/operf
22*4882a593Smuzhiyun
23*4882a593Smuzhiyunifeq ($(BR2_i386),y)
24*4882a593SmuzhiyunOPROFILE_ARCH = i386
25*4882a593Smuzhiyunendif
26*4882a593Smuzhiyunifeq ($(BR2_mipsel),y)
27*4882a593SmuzhiyunOPROFILE_ARCH = mips
28*4882a593Smuzhiyunendif
29*4882a593Smuzhiyunifeq ($(BR2_powerpc),y)
30*4882a593SmuzhiyunOPROFILE_ARCH = ppc
31*4882a593Smuzhiyunendif
32*4882a593Smuzhiyunifeq ($(BR2_x86_64),y)
33*4882a593SmuzhiyunOPROFILE_ARCH = x86-64
34*4882a593Smuzhiyunendif
35*4882a593Smuzhiyunifeq ($(OPROFILE_ARCH),)
36*4882a593SmuzhiyunOPROFILE_ARCH = $(BR2_ARCH)
37*4882a593Smuzhiyunendif
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunOPROFILE_DEPENDENCIES = popt binutils host-pkgconf
40*4882a593Smuzhiyun
41*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBPFM4),y)
42*4882a593SmuzhiyunOPROFILE_DEPENDENCIES += libpfm4
43*4882a593Smuzhiyunendif
44*4882a593Smuzhiyun
45*4882a593Smuzhiyunifeq ($(BR2_STATIC_LIBS),)
46*4882a593Smuzhiyundefine OPROFILE_INSTALL_SHARED_LIBRARY
47*4882a593Smuzhiyun	$(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile
48*4882a593Smuzhiyunendef
49*4882a593Smuzhiyunendif
50*4882a593Smuzhiyun
51*4882a593Smuzhiyundefine OPROFILE_INSTALL_TARGET_CMDS
52*4882a593Smuzhiyun	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin
53*4882a593Smuzhiyun	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/oprofile
54*4882a593Smuzhiyun	$(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib/oprofile
55*4882a593Smuzhiyun	if [ -d $(@D)/events/$(OPROFILE_ARCH) ]; then \
56*4882a593Smuzhiyun		cp -dpfr $(@D)/events/$(OPROFILE_ARCH) \
57*4882a593Smuzhiyun			$(TARGET_DIR)/usr/share/oprofile; \
58*4882a593Smuzhiyun	fi
59*4882a593Smuzhiyun	$(INSTALL) -m 644 $(@D)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile
60*4882a593Smuzhiyun	$(INSTALL) -m 755 $(addprefix $(@D)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin
61*4882a593Smuzhiyun	$(OPROFILE_INSTALL_SHARED_LIBRARY)
62*4882a593Smuzhiyunendef
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun$(eval $(autotools-package))
65