1 2XEN_ROOT=$(CURDIR)/../../.. 3include $(XEN_ROOT)/tools/Rules.mk 4 5TARGET := test_vhpet 6 7.PHONY: all 8all: $(TARGET) 9 10.PHONY: run 11run: $(TARGET) 12 ./$(TARGET) > $(TARGET).out 13 ./$(TARGET) 0 > $(TARGET).0.out 14 ./$(TARGET) 0 1 0 20 > $(TARGET).0.1.0.20.out 15 ./$(TARGET) 200 > $(TARGET).200.out 16 ./$(TARGET) 200 1 0 20 > $(TARGET).200.1.0.20.out 17 ./$(TARGET) 300 5 > $(TARGET).200.5.out 18 ./$(TARGET) 400 4 2000 > $(TARGET).200.4.2000.out 19 ./$(TARGET) 0 1 0 20 0x0103 > $(TARGET).0.1.0.20.0x0103.out 20 ./$(TARGET) 200 1 0 20 0x0103 > $(TARGET).200.1.0.20.0x0103.out 21 22$(TARGET): hpet.c main.c hpet.h emul.h Makefile 23 $(HOSTCC) -g -o $@ hpet.c main.c 24 25.PHONY: clean 26clean: 27 rm -rf $(TARGET) $(TARGET).out *.o *~ core* hpet.h hpet.c 28 29.PHONY: distclean 30distclean: clean 31 32.PHONY: install 33install: 34 35hpet.h: $(XEN_ROOT)/xen/include/asm-x86/hpet.h 36 cp $< $@ 37 38hpet.c: $(XEN_ROOT)/xen/arch/x86/hvm/hpet.c 39 sed -e "/#include/d" -e "1i#include \"emul.h\"\n" <$< >$@ 40