debuggers.hg

view tools/xenstore/Makefile @ 16608:47efaa78e3ac

Revert 16560:822d4ec5cfb1.

Preference seems to be to update library versions only when the ABI
changes. Only libxenctrl/libxenguest have their version number changed
to 3.2.0, as a reminder that they change on pretty much every major
release.

libfsimage/libxenstore/libblktap have not changed substantially
recently, hence the ABI has not changed, and version number stays the
same as in Xen 3.1 (and before).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Dec 08 17:32:01 2007 +0000 (2007-12-08)
parents 822d4ec5cfb1
children 6ed9b42d1ec4
line source
1 XEN_ROOT=../..
2 include $(XEN_ROOT)/tools/Rules.mk
3 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
5 MAJOR = 3.0
6 MINOR = 0
8 PROFILE=#-pg
9 BASECFLAGS=-Werror
10 # Make gcc generate dependencies.
11 BASECFLAGS += -Wp,-MD,.$(@F).d
12 PROG_DEP = .*.d
13 BASECFLAGS+= $(PROFILE)
14 BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc
15 BASECFLAGS+= -I.
17 CFLAGS += $(BASECFLAGS)
18 LDFLAGS += $(PROFILE) -L$(XEN_LIBXC)
20 CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
21 CLIENTS += xenstore-write
22 CLIENTS_OBJS := $(patsubst xenstore-%,xenstore_%.o,$(CLIENTS))
24 XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
26 XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_linux.o
27 XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o
28 XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_netbsd.o
30 XENSTORED_OBJS += $(XENSTORED_OBJS_y)
32 .PHONY: all
33 all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
35 xenstored: $(XENSTORED_OBJS)
36 $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -lxenctrl $(SOCKET_LIBS) -o $@
38 $(CLIENTS): xenstore-%: xenstore_%.o libxenstore.so
39 $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
41 $(CLIENTS_OBJS): xenstore_%.o: xenstore_client.c
42 $(COMPILE.c) -DCLIENT_$(*F) -o $@ $<
44 xenstore-control: xenstore_control.o libxenstore.so
45 $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
47 xenstore-ls: xsls.o libxenstore.so
48 $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lxenstore $(SOCKET_LIBS) -o $@
50 xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
51 $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
53 libxenstore.so: libxenstore.so.$(MAJOR)
54 ln -sf $< $@
55 libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR)
56 ln -sf $< $@
58 libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
59 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread
61 libxenstore.a: xs.o xs_lib.o
62 $(AR) rcs libxenstore.a $^
64 .PHONY: clean
65 clean:
66 rm -f *.a *.o *.opic *.so*
67 rm -f xenstored xs_random xs_stress xs_crashme
68 rm -f xs_tdb_dump xenstore-control xenstore-ls
69 rm -f $(CLIENTS)
70 $(RM) $(PROG_DEP)
72 .PHONY: TAGS
73 TAGS:
74 etags `find . -name '*.[ch]'`
76 .PHONY: tarball
77 tarball: clean
78 cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
80 .PHONY: install
81 install: all
82 $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
83 $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
84 $(INSTALL_DIR) $(DESTDIR)/usr/bin
85 $(INSTALL_DIR) $(DESTDIR)/usr/sbin
86 $(INSTALL_DIR) $(DESTDIR)/usr/include
87 $(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
88 $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)/usr/bin
89 $(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
90 $(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
91 $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
92 $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
93 ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR)
94 ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so
95 $(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
96 $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
97 $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
99 -include $(PROG_DEP)
101 # never delete any intermediate files.
102 .SECONDARY: