[packages] strace: only change CPPFLAGS when building with an external toolchain...
[openwrt/svn-archive/archive.git] / utils / strace / Makefile
1 #
2 # Copyright (C) 2006-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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=strace
12 PKG_RELEASE:=3
13
14 ifeq ($(CONFIG_LINUX_2_6_25),y)
15 PKG_VERSION:=4.5.16
16 PKG_MD5SUM:=77f66d09aa82981bb6d65fa19a2c1ba9
17 PATCH_DIR:=patches-4.5.16
18 else
19 PKG_VERSION:=4.5.19
20 PKG_MD5SUM:=2415e435d61e40315a298c80aced0cda
21 endif
22
23 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
24 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
25
26 PKG_FIXUP:=libtool
27 PKG_INSTALL:=1
28
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/strace
32 SECTION:=utils
33 CATEGORY:=Utilities
34 TITLE:=System call tracer
35 URL:=http://strace.sourceforge.net/
36 endef
37
38 define Package/strace/description
39 A useful diagnostic, instructional, and debugging tool. Allows you to track what
40 system calls a program makes while it is running.
41 endef
42
43 # needed when compiling against Linux 2.4
44 CONFIGURE_VARS += \
45 ac_cv_header_linux_netlink_h=yes
46
47 ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
48 TARGET_CPPFLAGS += -I$(LINUX_DIR)/include
49 endif
50
51 MAKE_FLAGS := \
52 CCOPT="$(TARGET_CFLAGS)"
53
54 define Package/strace/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
57 endef
58
59 $(eval $(call BuildPackage,strace))