perf: disable libcrypto dependency
[openwrt/openwrt.git] / package / devel / perf / Makefile
1 #
2 # Copyright (C) 2011-2013 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:=perf
12 PKG_VERSION:=$(LINUX_VERSION)
13 PKG_RELEASE:=2
14
15 PKG_USE_MIPS16:=0
16 PKG_BUILD_PARALLEL:=1
17 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
18
19 # Perf's makefile and headers are not relocatable and must be built from the
20 # Linux sources directory
21 PKG_BUILD_DIR:=$(LINUX_DIR)/tools/perf-$(TARGET_DIR_NAME)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/perf
26 SECTION:=devel
27 CATEGORY:=Development
28 DEPENDS:= +libelf1 +libdw +libpthread +librt +objdump @!LINUX_3_18
29 TITLE:=Linux performance monitoring tool
30 VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
31 URL:=http://www.kernel.org
32 endef
33
34 define Package/perf/description
35 perf is the Linux performance monitoring tool
36 endef
37
38 define Build/Prepare
39 $(CP) $(LINUX_DIR)/tools/perf/* $(PKG_BUILD_DIR)/
40 endef
41
42 MAKE_FLAGS = \
43 ARCH="$(LINUX_KARCH)" \
44 NO_LIBPERL=1 \
45 NO_LIBPYTHON=1 \
46 NO_NEWT=1 \
47 NO_LZMA=1 \
48 NO_BACKTRACE=1 \
49 NO_LIBNUMA=1 \
50 NO_GTK2=1 \
51 NO_LIBAUDIT=1 \
52 NO_LIBCRYPTO=1 \
53 CROSS_COMPILE="$(TARGET_CROSS)" \
54 CC="$(TARGET_CC)" \
55 LD="$(TARGET_CROSS)ld" \
56 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
57 LDFLAGS="$(TARGET_LDFLAGS)" \
58 $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
59 WERROR=0 \
60 prefix=/usr
61
62 ifdef CONFIG_USE_MUSL
63 MAKE_FLAGS += EXTRA_CFLAGS="-I$(CURDIR)/musl-include -include $(CURDIR)/musl-compat.h -D__UCLIBC__"
64 endif
65
66 define Build/Compile
67 +$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \
68 -C $(PKG_BUILD_DIR) \
69 -f Makefile.perf \
70 --no-print-directory
71 endef
72
73 define Package/perf/install
74 $(INSTALL_DIR) $(1)/usr/bin
75 $(INSTALL_BIN) $(PKG_BUILD_DIR)/perf $(1)/usr/bin/
76 endef
77
78 $(eval $(call BuildPackage,perf))