xref: /linux/arch/arm/tools/Makefile (revision 4e2648db9c5f7b2281551694597102612f54460d)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# linux/arch/arm/tools/Makefile
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds# Copyright (C) 2001 Russell King
51da177e4SLinus Torvalds#
61da177e4SLinus Torvalds
7*4e2648dbSRussell Kinggen := arch/$(ARCH)/include/generated
8*4e2648dbSRussell Kingkapi := $(gen)/asm
9*4e2648dbSRussell King
10*4e2648dbSRussell Kingkapi-hdrs-y := $(kapi)/mach-types.h
11*4e2648dbSRussell King
12*4e2648dbSRussell Kingtargets += $(addprefix ../../../,$(kapi-hdrs-y))
13*4e2648dbSRussell King
14*4e2648dbSRussell KingPHONY += kapi
15*4e2648dbSRussell King
16*4e2648dbSRussell Kingkapi:	$(kapi-hdrs-y)
17*4e2648dbSRussell King
18*4e2648dbSRussell King# Create output directory if not already present
19*4e2648dbSRussell King_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
20*4e2648dbSRussell King
216e8ac724SMasahiro Yamadaquiet_cmd_gen_mach = GEN     $@
226e8ac724SMasahiro Yamada      cmd_gen_mach = mkdir -p $(dir $@) && \
236e8ac724SMasahiro Yamada		     $(AWK) -f $(filter-out $(PHONY),$^) > $@ || \
246e8ac724SMasahiro Yamada		     { rm -f $@; /bin/false; }
256e8ac724SMasahiro Yamada
26*4e2648dbSRussell King$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
276e8ac724SMasahiro Yamada	$(call if_changed,gen_mach)
28