2605bc61cb7e61834108a38817c42b559af747c7
[openwrt/staging/stintel.git] / tools / elfutils / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=elfutils
6 PKG_VERSION:=0.189
7 PKG_RELEASE:=1
8
9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
10 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
11 PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
12
13 PKG_LICENSE:=GPL-3.0-or-later
14 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
15 PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
16
17 PKG_FIXUP:=autoreconf
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 ifeq ($(HOST_OS),Darwin)
23 HOST_CFLAGS += -I/opt/homebrew/include
24 endif
25
26 HOST_CFLAGS += -Wno-error
27
28 HOST_CONFIGURE_ARGS += \
29 --without-libintl-prefix \
30 --without-libiconv-prefix \
31 --disable-debuginfod \
32 --disable-libdebuginfod \
33 --disable-nls \
34 --disable-shared \
35 --enable-static \
36 --without-lzma \
37 --without-zstd
38
39 ifeq ($(HOST_OS),Darwin)
40 HOST_CONFIGURE_ARGS += --disable-symbol-versioning
41 endif
42
43 Hooks/HostConfigure/Pre := Host/Gnulib $(Hooks/HostConfigure/Pre)
44 define Host/Gnulib
45 cd $(HOST_BUILD_DIR); $(STAGING_DIR_HOST)/bin/gnulib-tool --libtool --source-base=libgnu --import argp obstack fts strchrnul progname tsearch;
46 ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
47 endef
48
49 define Host/Uninstall
50 -$(call Host/Compile/Default,uninstall)
51 endef
52
53 $(eval $(call HostBuild))