xref: /openbmc/linux/arch/arm/tools/Makefile (revision 4e2648db)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# linux/arch/arm/tools/Makefile
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds# Copyright (C) 2001 Russell King
51da177e4SLinus Torvalds#
61da177e4SLinus Torvalds
74e2648dbSRussell Kinggen := arch/$(ARCH)/include/generated
84e2648dbSRussell Kingkapi := $(gen)/asm
94e2648dbSRussell King
104e2648dbSRussell Kingkapi-hdrs-y := $(kapi)/mach-types.h
114e2648dbSRussell King
124e2648dbSRussell Kingtargets += $(addprefix ../../../,$(kapi-hdrs-y))
134e2648dbSRussell King
144e2648dbSRussell KingPHONY += kapi
154e2648dbSRussell King
164e2648dbSRussell Kingkapi:	$(kapi-hdrs-y)
174e2648dbSRussell King
184e2648dbSRussell King# Create output directory if not already present
194e2648dbSRussell King_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
204e2648dbSRussell 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
264e2648dbSRussell King$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
276e8ac724SMasahiro Yamada	$(call if_changed,gen_mach)
28