mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +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>
42 lines
860 B
Makefile
42 lines
860 B
Makefile
#
|
|
# tools/xcutils/Makefile
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU General
|
|
# Public License. See the file "COPYING" in the main directory of
|
|
# this archive for more details.
|
|
#
|
|
# Copyright (C) 2005 by Christian Limpach
|
|
#
|
|
|
|
XEN_ROOT = ../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
|
|
|
|
PROGRAMS = xc_restore xc_save readnotes lsevtchn
|
|
|
|
LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build: $(PROGRAMS)
|
|
|
|
$(PROGRAMS): %: %.o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
|
|
|
.PHONY: install
|
|
install: build
|
|
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
|
|
$(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
|
|
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.o $(PROGRAMS)
|
|
$(RM) $(DEPS)
|
|
|
|
-include $(DEPS)
|