OSDN Git Service

tools/dwarves: add host package
[immortalwrt/immortalwrt.git] / tools / dwarves / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=dwarves
6
7 PKG_SOURCE_VERSION:=v1.23
8 PKG_SOURCE_PROTO:=git
9 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/devel/pahole/pahole.git
10 PKG_MIRROR_HASH:=6ab1bb1dbdf6c73ffcf485d909229dc1da1a3d24efd213e92c56489b58d6a4bd
11 PKG_LICENSE:=GPL-2.0-only
12 PKG_LICENSE_FILES:=COPYING
13
14 HOST_BUILD_PARALLEL:=1
15
16 include $(INCLUDE_DIR)/host-build.mk
17 include $(INCLUDE_DIR)/cmake.mk
18
19 CMAKE_HOST_OPTIONS += \
20         -D__LIB=lib \
21         -DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOST)/lib" \
22         -DCMAKE_SKIP_RPATH=FALSE
23
24 define Host/Clean
25         $(RM) $(STAGING_DIR_HOST)/bin/{codiff,ctracer,dtagnames,pahole,pdwtags}
26         $(RM) $(STAGING_DIR_HOST)/bin/{pfunct,pglobal,prefcnt,scncopy,syscse}
27         $(RM) $(STAGING_DIR_HOST)/bin/{ostra-cg,btfdiff,fullcircle}
28         $(RM) $(STAGING_DIR_HOST)/lib/libdwarves*.so*
29         $(RM) $(STAGING_DIR_HOST)/share/man/man1/pahole.1
30         rm -rf $(STAGING_DIR_HOST)/include/dwarves
31         rm -rf $(STAGING_DIR_HOST)/share/dwarves
32         $(call Host/Clean/Default)
33 endef
34
35 $(eval $(call HostBuild))