01663634cc5ddcd1cddd1498aa80876775f02de4
[openwrt/svn-archive/archive.git] / 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.4
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/oprofile/
16 PKG_MD5SUM:=82b059379895cf125261d7d773465915
17
18 PKG_BUILD_DEPENDS:=binutils
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/kernel.mk
24
25 define KernelPackage/oprofile
26 SUBMENU:=Other modules
27 TITLE:=OProfile profiling support
28 KCONFIG:=CONFIG_OPROFILE @!LINUX_2_4
29 FILES:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/oprofile/oprofile.$(LINUX_KMOD_SUFFIX)
30 DEPENDS:=@KERNEL_PROFILING
31 endef
32
33 define KernelPackage/oprofile/description
34 Kernel module for support for oprofile system profiling.
35 endef
36
37 define Package/oprofile
38 SECTION:=devel
39 CATEGORY:=Development
40 TITLE:=OProfile System Profiler
41 URL:=http://oprofile.sourceforge.net
42 DEPENDS:=+libpopt +kmod-oprofile +libstdcpp +objdump
43 endef
44
45 define Package/oprofile/description
46 A transparent low-overhead system-wide profiler.
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_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
57
58 define Package/oprofile/install
59 $(INSTALL_DIR) $(1)/usr/bin
60 $(INSTALL_BIN) \
61 $(PKG_INSTALL_DIR)/usr/bin/* \
62 $(1)/usr/bin
63
64 $(INSTALL_DIR) $(1)/usr/lib/oprofile
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/lib/oprofile/*.so* \
67 $(1)/usr/lib/oprofile/
68
69 $(INSTALL_DIR) $(1)/usr/share/oprofile
70 $(CP) \
71 $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
72 $(PKG_INSTALL_DIR)/usr/share/oprofile/$(LINUX_KARCH) \
73 $(1)/usr/share/oprofile/
74 endef
75
76 $(eval $(call BuildPackage,oprofile))
77 $(eval $(call KernelPackage,oprofile))