Files
xen/tools/vtpm_manager/Rules.mk
T
Keir Fraser 9f8501582f 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/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>
2009-01-12 10:16:05 +00:00

63 lines
1.5 KiB
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_manager/Rules.mk
$(OBJS): $(SRCS)
-include $(FILES)
# Make sure these are just rules
.PHONY : all build install clean
#
# Project-specific definitions
#
# Need UNIX98 spec for pthread rwlocks
CFLAGS += -D_GNU_SOURCE
# Logging Level. See utils/tools.h for usage
CFLAGS += -DLOGGING_MODULES="(BITMASK(VTPM_LOG_TCS)|BITMASK(VTPM_LOG_VTSP)|BITMASK(VTPM_LOG_VTPM))"
# Silent Mode
#CFLAGS += -DLOGGING_MODULES=0x0
#CFLAGS += -DLOGGING_MODULES=0xff
# Use frontend/backend pairs between manager & DMs?
#CFLAGS += -DVTPM_MULTI_VM
# vtpm_manager listens on fifo's rather than backend
#CFLAGS += -DDUMMY_BACKEND
# TCS talks to fifo's rather than /dev/tpm. TPM Emulator assumed on fifos
#CFLAGS += -DDUMMY_TPM
# Do not have manager launch DMs.
#CFLAGS += -DMANUAL_DM_LAUNCH
# Fixed OwnerAuth
#CFLAGS += -DWELL_KNOWN_OWNER_AUTH
# Include
CFLAGS += -I$(XEN_ROOT)/tools/vtpm_manager/crypto
CFLAGS += -I$(XEN_ROOT)/tools/vtpm_manager/util
CFLAGS += -I$(XEN_ROOT)/tools/vtpm_manager/tcs
CFLAGS += -I$(XEN_ROOT)/tools/vtpm_manager/manager