ia64/xen-unstable

view tools/include/xen-foreign/Makefile @ 16894:b9004e222fde

Move generation of public header hierarchy into the tools.

This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Jan 26 10:38:44 2008 +0000 (2008-01-26)
parents
children 4fd33f77be6b
line source
1 XEN_ROOT=../../..
2 include $(XEN_ROOT)/Config.mk
4 ROOT = $(XEN_ROOT)/xen/include/public/foreign
5 #VPATH = $(ROOT)
6 HOSTCFLAGS += -I$(ROOT)
8 MKHEADER_PY = $(ROOT)/mkheader.py
10 architectures := x86_32 x86_64 ia64
11 headers := $(patsubst %, %.h, $(architectures))
12 scripts := $(wildcard *.py)
14 .PHONY: all clean check-headers
15 all: $(headers) check-headers
17 clean:
18 rm -f $(headers)
19 rm -f checker checker.c
20 rm -f *.pyc *.o *~
22 ifeq ($(CROSS_COMPILE)$(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH))
23 checker: checker.c $(headers)
24 $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
26 check-headers: checker
27 ./checker > tmp.size
28 diff -u $(ROOT)/reference.size tmp.size
29 rm tmp.size
30 else
31 check-headers:
32 @echo "cross build: skipping check"
33 endif
35 x86_32.h: $(ROOT)/mkheader.py ../xen/arch-x86/xen-x86_32.h ../xen/arch-x86/xen.h ../xen/xen.h
36 python $< $* $@ $(filter %.h,$^)
38 x86_64.h: $(ROOT)/mkheader.py ../xen/arch-x86/xen-x86_64.h ../xen/arch-x86/xen.h ../xen/xen.h
39 python $< $* $@ $(filter %.h,$^)
41 ia64.h: $(ROOT)/mkheader.py ../xen/arch-ia64.h ../xen/xen.h
42 python $< $* $@ $(filter %.h,$^)
44 checker.c: $(ROOT)/mkchecker.py
45 python $< $(XEN_TARGET_ARCH) $@ $(architectures)