diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-11-22 01:43:43 -0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-11-22 12:00:40 +0100 |
commit | 340c2ed2ef6578483f974e274bf6d638f953a246 (patch) | |
tree | 8b4cc72d444b7cea21cbded25901535d506ab4a4 /target/llvm-bpf/Makefile | |
parent | 8f458498768ab164d5e42becca52624448dfe2ee (diff) | |
download | upstream-340c2ed2ef6578483f974e274bf6d638f953a246.tar.gz upstream-340c2ed2ef6578483f974e274bf6d638f953a246.tar.bz2 upstream-340c2ed2ef6578483f974e274bf6d638f953a246.zip |
tools/llvm-bpf: move tarball packing to target/llvm-bpf
This ensures that the tarball is regenerated after make clean or after switching
to a different target
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/llvm-bpf/Makefile')
-rw-r--r-- | target/llvm-bpf/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/target/llvm-bpf/Makefile b/target/llvm-bpf/Makefile new file mode 100644 index 0000000000..c9ada017e6 --- /dev/null +++ b/target/llvm-bpf/Makefile @@ -0,0 +1,29 @@ +# +# Copyright (C) 2021 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +override MAKEFLAGS= + +LLVM_VERSION := $(shell cat $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version) + +LLVM_BPF_PREFIX := llvm-bpf-$(LLVM_VERSION).$(HOST_OS)-$(HOST_ARCH) +LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.xz + +$(LLVM_TAR): $(HOST_STAMP_INSTALLED) + tar -C $(STAGING_DIR_HOST) \ + -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' \ + -cf $@.tmp llvm-bpf $(LLVM_BPF_PREFIX) + mv $@.tmp $@ + +download: +prepare: +compile: $(LLVM_TAR) +install: compile + +clean: + rm -f $(LLVM_TAR) |