2021-11-22 09:43:43 +00:00
|
|
|
#
|
|
|
|
# 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)
|
2024-02-13 00:03:44 +00:00
|
|
|
LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.zst
|
2021-11-22 09:43:43 +00:00
|
|
|
|
2021-11-26 10:25:40 +00:00
|
|
|
$(LLVM_TAR): $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version
|
2021-11-22 09:43:43 +00:00
|
|
|
tar -C $(STAGING_DIR_HOST) \
|
2024-02-13 00:03:44 +00:00
|
|
|
-I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' \
|
2021-11-26 10:24:39 +00:00
|
|
|
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
2021-11-22 09:43:43 +00:00
|
|
|
-cf $@.tmp llvm-bpf $(LLVM_BPF_PREFIX)
|
|
|
|
mv $@.tmp $@
|
|
|
|
|
|
|
|
download:
|
|
|
|
prepare:
|
|
|
|
compile: $(LLVM_TAR)
|
|
|
|
install: compile
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(LLVM_TAR)
|