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>
30 lines
608 B
Makefile
30 lines
608 B
Makefile
# Base definitions and rules (XEN_ROOT must be defined in including Makefile)
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
#
|
|
# Tool definitions
|
|
#
|
|
|
|
# Xen tools installation directory
|
|
TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin
|
|
|
|
# General compiler flags
|
|
CFLAGS = -Werror -g3 -I.
|
|
|
|
# Generic project files
|
|
HDRS = $(wildcard *.h)
|
|
SRCS = $(wildcard *.c)
|
|
OBJS = $(patsubst %.c,%.o,$(SRCS))
|
|
|
|
# Generic (non-header) dependencies
|
|
$(SRCS): Makefile $(XEN_ROOT)/tools/Rules.mk $(XEN_ROOT)/tools/vtpm/Rules.mk
|
|
|
|
$(OBJS): $(SRCS)
|
|
|
|
-include $(DEPS)
|
|
|
|
BUILD_EMULATOR = y
|
|
|
|
# Make sure these are just rules
|
|
.PHONY : all build install clean
|