mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
38 lines
869 B
Makefile
38 lines
869 B
Makefile
|
|
XEN_ROOT=../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
|
|
CFLAGS += $(CFLAGS_libxenctrl)
|
|
CFLAGS += $(CFLAGS_libxenstore)
|
|
LDFLAGS += $(LDFLAGS_libxenctrl)
|
|
LDFLAGS += $(LDFLAGS_libxenstore)
|
|
|
|
BIN = xenconsoled xenconsole
|
|
|
|
.PHONY: all
|
|
all: $(BIN)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS)
|
|
$(RM) client/*.o daemon/*.o
|
|
|
|
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) \
|
|
$(UTIL_LIBS) $(SOCKET_LIBS) -lrt
|
|
|
|
xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) \
|
|
$(UTIL_LIBS) $(SOCKET_LIBS)
|
|
|
|
.PHONY: install
|
|
install: $(BIN)
|
|
$(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
|
|
$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
|
|
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
|
|
$(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
|
|
|
|
-include $(DEPS)
|