a1970b1afd016f90a799b329feef1ba8c3b32aaa
[openwrt/svn-archive/archive.git] / libs / libpfm / Makefile
1 #
2 # Copyright (C) 2006-2008 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:=libpfm
11 PKG_VERSION:=3.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/perfmon2
16 PKG_MD5SUM:=5075fa45ddce4aa647b70e9f9446eacc
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libpfm
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=Perfmon2 Kernel performance monitoring interface
24 DEPENDS:=@TARGET_ps3
25 URL:=http://perfmon2.sourceforge.net/
26 endef
27
28 define Build/Compile
29 $(MAKE) -C $(PKG_BUILD_DIR) \
30 ARCH=cell \
31 CC=$(TARGET_CROSS)gcc \
32 AR=$(TARGET_CROSS)ar \
33 lib
34 endef
35
36 define Build/InstallDev
37 echo "Build/InstallDev"
38 $(MAKE) -C $(PKG_BUILD_DIR)/include \
39 ARCH=cell \
40 DESTDIR=$(1) \
41 INCDIR=/usr/include \
42 CONFIG_PFMLIB_ARCH_POWERPC=y \
43 install
44 # $(MAKE) -C $(PKG_BUILD_DIR)/lib \
45 # ARCH=cell \
46 # CC=$(TARGET_CROSS)gcc \
47 # DESTDIR=$(1) \
48 # LIBDIR=/usr/lib \
49 # CONFIG_PFMLIB_ARCH_POWERPC=y \
50 # CONFIG_PFMLIB_CELL=y \
51 # CONFIG_PFMLIB_SHARED=y \
52 # install
53 mkdir -p $(1)/usr/lib
54 $(CP) $(PKG_BUILD_DIR)/lib/libpfm* $(1)/usr/lib/
55 endef
56
57 define Package/libpfm/install
58 echo "Package/libpfm/install"
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_BUILD_DIR)/lib/libpfm* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,libpfm))