summaryrefslogtreecommitdiffstats
path: root/tools/arch/arm64/tools/Makefile
blob: 7f64b8bb510702f668c4b60aa7cd19d5b7eb5a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# SPDX-License-Identifier: GPL-2.0

ifeq ($(top_srcdir),)
top_srcdir := $(patsubst %/,%,$(dir $(CURDIR)))
top_srcdir := $(patsubst %/,%,$(dir $(top_srcdir)))
top_srcdir := $(patsubst %/,%,$(dir $(top_srcdir)))
top_srcdir := $(patsubst %/,%,$(dir $(top_srcdir)))
endif

include $(top_srcdir)/tools/scripts/Makefile.include

AWK	?= awk
MKDIR	?= mkdir
RM	?= rm

ifeq ($(V),1)
Q =
else
Q = @
endif

arm64_tools_dir = $(top_srcdir)/arch/arm64/tools
arm64_sysreg_tbl = $(arm64_tools_dir)/sysreg
arm64_gen_sysreg = $(arm64_tools_dir)/gen-sysreg.awk
arm64_generated_dir = $(top_srcdir)/tools/arch/arm64/include/generated
arm64_sysreg_defs = $(arm64_generated_dir)/asm/sysreg-defs.h

all: $(arm64_sysreg_defs)
	@:

$(arm64_sysreg_defs): $(arm64_gen_sysreg) $(arm64_sysreg_tbl)
	$(Q)$(MKDIR) -p $(dir $@)
	$(QUIET_GEN)$(AWK) -f $^ > $@

clean:
	$(Q)$(RM) -rf $(arm64_generated_dir)

.PHONY: all clean