view tools/vtpm/ @ 19063:bd78714b8594

Use -MMD -MF in tools/* rather than -Wp,-M...

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/ 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 as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <>
author Keir Fraser <>
date Mon Jan 12 10:16:05 2009 +0000 (2009-01-12)
parents edf0e488ea2a
line source
1 # Base definitions and rules (XEN_ROOT must be defined in including Makefile)
2 include $(XEN_ROOT)/tools/
4 #
5 # Tool definitions
6 #
8 # Xen tools installation directory
11 # General compiler flags
12 CFLAGS = -Werror -g3 -I.
14 # Generic project files
15 HDRS = $(wildcard *.h)
16 SRCS = $(wildcard *.c)
17 OBJS = $(patsubst %.c,%.o,$(SRCS))
19 # Generic (non-header) dependencies
20 $(SRCS): Makefile $(XEN_ROOT)/tools/ $(XEN_ROOT)/tools/vtpm/
22 $(OBJS): $(SRCS)
24 -include $(DEPS)
28 # Make sure these are just rules
29 .PHONY : all build install clean