2
0

Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=strace
  10. PKG_VERSION:=4.15
  11. PKG_RELEASE:=1
  12. PKG_HASH:=c0cdc094d6141fd9dbf6aaad605142d651ae10998b660fda57fc61f7ad583ca9
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  15. PKG_LICENSE:=BSD-3c
  16. PKG_LICENSE_FILES:=COPYRIGHT
  17. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  18. PKG_FIXUP:=autoreconf
  19. PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_strace_libunwind
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
  23. CONFIGURE_VARS+= \
  24. LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
  25. CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
  26. CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
  27. CC_FOR_BUILD="$(HOST_CC)"
  28. define Package/strace
  29. SECTION:=utils
  30. CATEGORY:=Utilities
  31. TITLE:=System call tracer
  32. DEPENDS:=+PACKAGE_strace_libunwind:libunwind
  33. URL:=http://strace.sourceforge.net/
  34. endef
  35. define Package/strace/description
  36. A useful diagnostic, instructional, and debugging tool. Allows you to track what
  37. system calls a program makes while it is running.
  38. endef
  39. define Package/strace/config
  40. config PACKAGE_strace_libunwind
  41. bool "Enable stack tracing support using libunwind (experimental)"
  42. default n
  43. endef
  44. CONFIGURE_ARGS += --with-libunwind=$(if $(CONFIG_PACKAGE_strace_libunwind),yes,no)
  45. MAKE_FLAGS := \
  46. CCOPT="$(TARGET_CFLAGS)"
  47. define Package/strace/install
  48. $(INSTALL_DIR) $(1)/usr/bin
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/strace $(1)/usr/bin/
  50. endef
  51. $(eval $(call BuildPackage,strace))