license info - revert r43155
[openwrt.git] / package / devel / oprofile / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=oprofile
11 PKG_VERSION:=0.9.9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=00aec1287da2dfffda17a9b1c0a01868
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19
20 PKG_BUILD_DEPENDS:=binutils
21 PKG_LICENSE:=GPL-2.0+
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/kernel.mk
28
29 define Package/oprofile
30   SECTION:=devel
31   CATEGORY:=Development
32   TITLE:=OProfile System Profiler
33   URL:=http://oprofile.sourceforge.net
34   DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
35 endef
36
37 define Package/oprofile/description
38  A transparent low-overhead system-wide profiler.
39 endef
40
41 define Package/oprofile-utils
42   SECTION:=devel
43   CATEGORY:=Development
44   TITLE:=OProfile System Profiler (extra utilities)
45   URL:=http://oprofile.sourceforge.net
46   DEPENDS:=oprofile
47 endef
48
49 define Build/Configure
50         $(call Build/Configure/Default, \
51                 --with-kernel-support \
52                 --without-x \
53         )
54 endef
55
56 TARGET_CXXFLAGS += -fpermissive
57 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
58
59 define Package/oprofile-utils/install
60         $(INSTALL_DIR) $(1)/usr/bin
61         $(INSTALL_BIN) \
62                 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
63                 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
64                 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
65                 $(1)/usr/bin
66 endef
67
68 define Package/oprofile/install
69         $(INSTALL_DIR) $(1)/usr/bin
70         $(INSTALL_BIN) \
71                 $(PKG_INSTALL_DIR)/usr/bin/* \
72                 $(1)/usr/bin
73
74         rm -f \
75                 $(1)/usr/bin/opannotate \
76                 $(1)/usr/bin/oparchive \
77                 $(1)/usr/bin/opgprof
78
79         $(INSTALL_DIR) $(1)/usr/lib/oprofile
80         $(CP) \
81                 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
82                 $(1)/usr/lib/oprofile/
83
84         $(INSTALL_DIR) $(1)/usr/share/oprofile
85         $(CP) \
86                 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
87                 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
88                 $(1)/usr/share/oprofile/
89 endef
90
91 $(eval $(call BuildPackage,oprofile))
92 $(eval $(call BuildPackage,oprofile-utils))