mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +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>
32 lines
798 B
Makefile
32 lines
798 B
Makefile
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror
|
|
LDFLAGS += -L../common/
|
|
|
|
PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
|
|
|
|
FSDIR-$(CONFIG_Linux) = $(LIBDIR)/fs/$(FS)
|
|
FSDIR-$(CONFIG_SunOS)-x86_64 = $(PREFIX)/lib/fs/$(FS)/64
|
|
FSDIR-$(CONFIG_SunOS)-x86_32 = $(PREFIX)/lib/fs/$(FS)/
|
|
FSDIR-$(CONFIG_SunOS) = $(FSDIR-$(CONFIG_SunOS)-$(XEN_TARGET_ARCH))
|
|
FSDIR-$(CONFIG_NetBSD) = $(LIBDIR)/fs/$(FS)
|
|
FSDIR = $(FSDIR-y)
|
|
|
|
FSLIB = fsimage.so
|
|
|
|
.PHONY: fs-all
|
|
fs-all: $(FSLIB)
|
|
|
|
.PHONY: fs-install
|
|
fs-install: fs-all
|
|
$(INSTALL_DIR) $(DESTDIR)$(FSDIR)
|
|
$(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)
|
|
|
|
$(FSLIB): $(PIC_OBJS)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS)
|
|
|
|
clean distclean:
|
|
rm -f $(PIC_OBJS) $(FSLIB) $(DEPS)
|
|
|
|
-include $(DEPS)
|