2 # Copyright (C) 2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/utils/cpu/msr-tools
16 PKG_MD5SUM:=2452d2233556aa0fb8b53208361a2c94
18 include $(INCLUDE_DIR)/package.mk
20 TARGET_CFLAGS += -fomit-frame-pointer -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
22 define Package/msr-tools
26 TITLE:=x86 MSR utilities.
27 URL:=http://www.kernel.org/pub/linux/utils/cpu/msr-tools
31 define Package/msr-tools/description
32 Manipulate the MSR (machine state registers) on i386 and x86_64
36 define Build/Configure
40 $(INSTALL_DIR) "$(PKG_INSTALL_DIR)/usr/sbin"
41 $(MAKE) -C $(PKG_BUILD_DIR) all \
42 $(TARGET_CONFIGURE_OPTS) \
43 sbindir="$(PKG_INSTALL_DIR)/usr/sbin" \
44 CFLAGS="$(TARGET_CFLAGS)" \
49 define Package/msr-tools/install
50 $(INSTALL_DIR) $(1)/usr/sbin/
51 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
54 $(eval $(call BuildPackage,msr-tools))