Revert "binutils: update to 2.39"
[openwrt/openwrt.git] / target / llvm-bpf / Makefile
1 #
2 # Copyright (C) 2021 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
10 override MAKEFLAGS=
11
12 LLVM_VERSION := $(shell cat $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version)
13
14 LLVM_BPF_PREFIX := llvm-bpf-$(LLVM_VERSION).$(HOST_OS)-$(HOST_ARCH)
15 LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.xz
16
17 $(LLVM_TAR): $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version
18 tar -C $(STAGING_DIR_HOST) \
19 -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' \
20 $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
21 -cf $@.tmp llvm-bpf $(LLVM_BPF_PREFIX)
22 mv $@.tmp $@
23
24 download:
25 prepare:
26 compile: $(LLVM_TAR)
27 install: compile
28
29 clean:
30 rm -f $(LLVM_TAR)