Makefile 927 Bytes
Newer Older
1
XEN_ROOT=$(CURDIR)/../../..
2
include $(XEN_ROOT)/tools/Rules.mk
3

4
ROOT = $(XEN_ROOT)/xen/include/public
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

architectures := x86_32 x86_64 ia64
headers := $(patsubst %, %.h, $(architectures))

.PHONY: all clean check-headers
all: $(headers) check-headers

clean:
	rm -f $(headers)
	rm -f checker checker.c
	rm -f *.pyc *.o *~

checker: checker.c $(headers)
	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<

check-headers: checker
	./checker > tmp.size
22
	diff -u reference.size tmp.size
23 24
	rm tmp.size

25
x86_32.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_32.h $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
Keir Fraser's avatar
Keir Fraser committed
26
	$(PYTHON) $< $* $@ $(filter %.h,$^)
27

28
x86_64.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_64.h $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h
Keir Fraser's avatar
Keir Fraser committed
29
	$(PYTHON) $< $* $@ $(filter %.h,$^)
30

31
ia64.h: mkheader.py structs.py $(ROOT)/arch-ia64.h $(ROOT)/xen.h
Keir Fraser's avatar
Keir Fraser committed
32
	$(PYTHON) $< $* $@ $(filter %.h,$^)
33

34
checker.c: mkchecker.py structs.py
Keir Fraser's avatar
Keir Fraser committed
35
	$(PYTHON) $< $@ $(architectures)