1XEN_ROOT = $(CURDIR)/../../../.. 2include ../Rules.mk 3 4XG_HDRS := xg_public.h 5XG_OBJS := xg_main.o 6 7CFLAGS += -D__XEN_TOOLS__ 8CFLAGS += $(CFLAGS_xeninclude) 9 10 11.PHONY: all 12all: build 13 14.PHONY: build 15build: xen-headers xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile 16# build: mk-symlinks xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile 17# build: mk-symlinks xg_all.a 18 19xg_all.a: $(XG_OBJS) Makefile $(XG_HDRS) 20 ar cr $@ $(XG_OBJS) # problems using -m32 in ld 21# $(LD) -b elf32-i386 $(LDFLAGS) -r -o $@ $^ 22# $(CC) -m32 -c -o $@ $^ 23 24xen-headers: 25 $(MAKE) -C ../../../include 26 27# xg_main.o: xg_main.c Makefile $(XG_HDRS) 28#$(CC) -c $(CFLAGS) -o $@ $< 29 30# %.o: %.c $(XG_HDRS) Makefile -- doesn't work as it won't overwrite Rules.mk 31#%.o: %.c -- doesn't recompile when .c changed 32 33.PHONY: clean 34clean: 35 rm -rf xen xg_all.a $(XG_OBJS) .*.d 36 37.PHONY: distclean 38distclean: clean 39