[backfire] merge r28180
[openwrt/svn-archive/archive.git] / utils / valgrind / Makefile
index b52983c..3e8cdcb 100644 (file)
@@ -1,23 +1,19 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 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:=valgrind
-PKG_VERSION:=3.2.3
-PKG_RELEASE:=1
+PKG_VERSION:=3.3.1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://valgrind.org/downloads/
-PKG_MD5SUM:=978847992b136c8d8cb5c6559a91df1c
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_MD5SUM:=0539e2fa4aadb2cd4ca4bba65b1fe8b5
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -50,10 +46,18 @@ CONFIGURE_ARGS += \
 
 DEFAULT_SUPP += "uclibc.supp"
 
-define Build/Compile   
+define Build/Compile
+       $(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/abort.o ./src/abort.c
+       $(TARGET_CROSS)ar rcu $(PKG_BUILD_DIR)/abort.a $(PKG_BUILD_DIR)/abort.o
        $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                CFLAGS="$(TARGET_CFLAGS)" \
+               AM_CFLAGS_X86_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
+               AM_CFLAGS_AMD64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
+               AM_CFLAGS_PPC32_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
+               AM_CFLAGS_PPC64_LINUX="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/coregrind" \
+               TOOL_LDADD_COMMON="$(LIBGCC_A) $(PKG_BUILD_DIR)/abort.a" \
                all install
 endef