Added package libpfm (note this package also requires perfmon2 be patched into the...
authorHamish Guthrie <hcg@openwrt.org>
Tue, 4 Nov 2008 08:01:22 +0000 (08:01 +0000)
committerHamish Guthrie <hcg@openwrt.org>
Tue, 4 Nov 2008 08:01:22 +0000 (08:01 +0000)
SVN-Revision: 13120

libs/libpfm/Makefile [new file with mode: 0644]

diff --git a/libs/libpfm/Makefile b/libs/libpfm/Makefile
new file mode 100644 (file)
index 0000000..0fa6514
--- /dev/null
@@ -0,0 +1,64 @@
+# 
+# Copyright (C) 2006-2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libpfm
+PKG_VERSION:=3.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/perfmon2
+PKG_MD5SUM:=5075fa45ddce4aa647b70e9f9446eacc
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libpfm
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Perfmon2 Kernel performance monitoring interface
+  DEPENDS:=@TARGET_ps3
+  URL:=http://perfmon2.sourceforge.net/
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               ARCH=cell \
+               CC=$(TARGET_CROSS)gcc \
+               AR=$(TARGET_CROSS)ar \
+               lib
+endef
+
+define Build/InstallDev
+       echo "Build/InstallDev"
+       $(MAKE) -C $(PKG_BUILD_DIR)/include \
+               ARCH=cell \
+               DESTDIR=$(1) \
+               INCDIR=/usr/include \
+               CONFIG_PFMLIB_ARCH_POWERPC=y \
+               install
+#      $(MAKE) -C $(PKG_BUILD_DIR)/lib \
+#              ARCH=cell \
+#              CC=$(TARGET_CROSS)gcc \
+#              DESTDIR=$(1) \
+#              LIBDIR=/usr/lib \
+#              CONFIG_PFMLIB_ARCH_POWERPC=y \
+#              CONFIG_PFMLIB_CELL=y \
+#              CONFIG_PFMLIB_SHARED=y \
+#              install
+       mkdir -p $(1)/usr/lib
+       $(CP)   $(PKG_BUILD_DIR)/lib/libpfm* $(1)/usr/lib/
+endef
+
+define Package/libpfm/install
+       echo "Package/libpfm/install"
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/lib/libpfm* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libpfm))