1XEN_ROOT=$(CURDIR)/../.. 2include $(XEN_ROOT)/tools/Rules.mk 3 4# xenpaging.c and file_ops.c incorrectly use libxc internals 5CFLAGS += $(CFLAGS_libxentoollog) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS) -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall) 6LDLIBS += $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(PTHREAD_LIBS) 7LDFLAGS += $(PTHREAD_LDFLAGS) 8 9POLICY = default 10 11SRC := 12SRCS += file_ops.c xenpaging.c policy_$(POLICY).c 13SRCS += pagein.c 14 15CFLAGS += -Werror 16CFLAGS += -Wno-unused 17 18OBJS = $(SRCS:.c=.o) 19IBINS = xenpaging 20 21all: $(IBINS) 22 23xenpaging: $(OBJS) 24 $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) 25 26install: all 27 $(INSTALL_DIR) -m 0700 $(DESTDIR)$(XEN_PAGING_DIR) 28 $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) 29 $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(LIBEXEC_BIN) 30 31uninstall: 32 rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(IBINS)) 33 34clean: 35 rm -f *.o *~ $(DEPS_RM) xen TAGS $(IBINS) $(LIB) 36 37distclean: clean 38 39.PHONY: clean install distclean uninstall 40 41.PHONY: TAGS 42TAGS: 43 etags -t $(SRCS) *.h 44 45-include $(DEPS_INCLUDE) 46