Files
xen/tools/libfsimage/Rules.mk
T
Daniel Kiper 667d8a84b2 tools/libfsimage: Fix clean and distclean make targets
If there is a single colon for a given target and the target
is redefined in another place (e.g. in included file) then
make executes only new target and displays following warning:

Makefile:35: warning: overriding commands for target `clean'
tools/libfsimage/common/../../../tools/libfsimage/Rules.mk:25:
warning: ignoring old commands for target `clean'

To cope with that issue define all required targets as double-colon
rules. Additionally, remove some redundant stuff.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-13 10:57:17 +01:00

28 lines
629 B
Makefile

include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\"
CFLAGS += -Werror -D_GNU_SOURCE
LDFLAGS += -L../common/
PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
FSDIR = $(LIBDIR)/fs
FSLIB = fsimage.so
.PHONY: fs-all
fs-all: $(FSLIB)
.PHONY: fs-install
fs-install: fs-all
$(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS)
$(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS)
$(FSLIB): $(PIC_OBJS)
$(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) $(APPEND_LDFLAGS)
clean distclean::
rm -f $(PIC_OBJS) $(FSLIB) $(DEPS)
-include $(DEPS)