2 # Copyright (C) 2006-2016 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
9 include $(INCLUDE_DIR)/kernel.mk
15 PKG_HASH:=7c93ebc6c29280f47c24a0eb86873a99ccb2cac6512c60a60ba4ef99ab807281
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
18 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
21 PKG_LICENSE_FILES:=COPYRIGHT
23 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
26 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_strace_libunwind
29 include $(INCLUDE_DIR)/package.mk
31 HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
34 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
35 CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
36 CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
37 CC_FOR_BUILD="$(HOST_CC)"
42 TITLE:=System call tracer
43 DEPENDS:=+PACKAGE_strace_libunwind:libunwind
44 URL:=http://strace.sourceforge.net/
47 define Package/strace/description
48 A useful diagnostic, instructional, and debugging tool. Allows you to track what
49 system calls a program makes while it is running.
52 define Package/strace/config
53 config PACKAGE_strace_libunwind
54 bool "Enable stack tracing support using libunwind (experimental)"
58 CONFIGURE_ARGS += --with-libunwind=$(if $(CONFIG_PACKAGE_strace_libunwind),yes,no)
60 CCOPT="$(TARGET_CFLAGS)"
62 define Package/strace/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
67 $(eval $(call BuildPackage,strace))