iputils: move to trunk and add myself as maintainer
[packages.git] / 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.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=8b5d1d9b65f84420bcc3234777ad3be3
17
18 PKG_BUILD_DEPENDS:=binutils
19 PKG_FIXUP:=autoreconf
20 PKG_INSTALL:=1
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/kernel.mk
25
26 define Package/oprofile
27   SECTION:=devel
28   CATEGORY:=Development
29   TITLE:=OProfile System Profiler
30   URL:=http://oprofile.sourceforge.net
31   DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
32 endef
33
34 define Package/oprofile/description
35  A transparent low-overhead system-wide profiler.
36 endef
37
38 define Package/oprofile-utils
39   SECTION:=devel
40   CATEGORY:=Development
41   TITLE:=OProfile System Profiler (extra utilities)
42   URL:=http://oprofile.sourceforge.net
43   DEPENDS:=oprofile
44 endef
45
46 define Build/Configure
47         $(call Build/Configure/Default, \
48                 --with-kernel-support \
49                 --without-x \
50         )
51 endef
52
53 TARGET_CXXFLAGS += -fpermissive
54 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
55
56 define Package/oprofile-utils/install
57         $(INSTALL_DIR) $(1)/usr/bin
58         $(INSTALL_BIN) \
59                 $(PKG_INSTALL_DIR)/usr/bin/opannotate \
60                 $(PKG_INSTALL_DIR)/usr/bin/oparchive \
61                 $(PKG_INSTALL_DIR)/usr/bin/opgprof \
62                 $(1)/usr/bin
63 endef
64
65 define Package/oprofile/install
66         $(INSTALL_DIR) $(1)/usr/bin
67         $(INSTALL_BIN) \
68                 $(PKG_INSTALL_DIR)/usr/bin/* \
69                 $(1)/usr/bin
70
71         rm -f \
72                 $(1)/usr/bin/opannotate \
73                 $(1)/usr/bin/oparchive \
74                 $(1)/usr/bin/opgprof
75
76         $(INSTALL_DIR) $(1)/usr/lib/oprofile
77         $(CP) \
78                 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
79                 $(1)/usr/lib/oprofile/
80
81         $(INSTALL_DIR) $(1)/usr/share/oprofile
82         $(CP) \
83                 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
84                 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst x86,i386,$(LINUX_KARCH)) \
85                 $(1)/usr/share/oprofile/
86 endef
87
88 $(eval $(call BuildPackage,oprofile))
89 $(eval $(call BuildPackage,oprofile-utils))