ia64/xen-unstable

view tools/libfsimage/common/Makefile @ 13482:8e79d8d87ecd

Revert 13389; libfsimage version does not need to change after all.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Jan 18 09:24:40 2007 +0000 (2007-01-18)
parents 8a397303fe09
children 822d4ec5cfb1
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 [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
26 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
27 $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
28 ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so.$(MAJOR)
29 ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so
30 $(INSTALL_DATA) fsimage.h $(DESTDIR)/usr/include
31 $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)/usr/include
32 $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)/usr/include
34 clean distclean:
35 rm -f $(PIC_OBJS) $(LIB)
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)