debuggers.hg

view tools/libfsimage/common/Makefile @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children 46f8fc57b1a4
line source
1 XEN_ROOT = ../../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 MAJOR = 1.0
5 MINOR = 0
7 CFLAGS += -Werror -Wp,-MD,.$(@F).d
8 DEPS = .*.d
10 LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
11 LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
12 LDFLAGS = $(LDFLAGS-y)
14 LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c
16 PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
18 LIB = libfsimage.so libfsimage.so.$(MAJOR) libfsimage.so.$(MAJOR).$(MINOR)
20 .PHONY: all
21 all: $(LIB)
23 .PHONY: install
24 install: all
25 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
26 $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
27 $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
28 ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR)
29 ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so
30 $(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
31 $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
32 $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
34 clean distclean:
35 rm -f $(PIC_OBJS) $(LIB) $(DEPS)
37 libfsimage.so: libfsimage.so.$(MAJOR)
38 ln -sf $< $@
39 libfsimage.so.$(MAJOR): libfsimage.so.$(MAJOR).$(MINOR)
40 ln -sf $< $@
42 libfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
43 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread
45 -include $(DEPS)