1XEN_ROOT=$(CURDIR)/../../.. 2include $(XEN_ROOT)/tools/Rules.mk 3 4CFLAGS += -Werror -Wno-declaration-after-statement 5 6CFLAGS += $(CFLAGS_xeninclude) 7CFLAGS += $(CFLAGS_libxenctrl) 8CFLAGS += $(CFLAGS_libxencall) 9CFLAGS += $(CFLAGS_libxenevtchn) 10CFLAGS += $(CFLAGS_libxengnttab) 11CFLAGS += $(CFLAGS_libxenforeignmemory) 12CFLAGS += $(CFLAGS_libxendevicemodel) 13CFLAGS += $(CFLAGS_libxentoolcore) 14CFLAGS += $(CFLAGS_libxentoollog) 15 16LDLIBS += $(LDLIBS_xeninclude) 17LDLIBS += $(LDLIBS_libxenctrl) 18LDLIBS += $(LDLIBS_libxencall) 19LDLIBS += $(LDLIBS_libxenevtchn) 20LDLIBS += $(LDLIBS_libxengnttab) 21LDLIBS += $(LDLIBS_libxenforeignmemory) 22LDLIBS += $(LDLIBS_libxendevicemodel) 23LDLIBS += $(LDLIBS_libxentoolcore) 24LDLIBS += $(LDLIBS_libxentoollog) 25 26INSTALL_PRIVBIN-y += depriv-fd-checker 27INSTALL_PRIVBIN := $(INSTALL_PRIVBIN-y) 28TARGETS += $(INSTALL_PRIVBIN) 29 30.PHONY: all 31all: build 32 33.PHONY: build 34build: $(TARGETS) 35 36.PHONY: clean 37clean: 38 $(RM) *.o $(TARGETS) *~ $(DEPS_RM) 39 40.PHONY: distclean 41distclean: clean 42 43depriv-fd-checker: depriv-fd-checker.o 44 $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS) 45 46install: all 47 $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) 48 $(INSTALL_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN) 49 50.PHONY: uninstall 51uninstall: 52 rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(INSTALL_PRIVBIN)) 53 54-include $(DEPS_INCLUDE) 55