2 # Copyright (C) 2009 Red Hat Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 EXTRA_DIST = guestfs_protocol.x \
23 EXTRA_DIST += generator.ml
25 include_HEADERS = guestfs.h guestfs-actions.h guestfs-structs.h
27 lib_LTLIBRARIES = libguestfs.la
29 # From the libtool info file, with comments:
31 # | 1. Start with version information of `0:0:0' for each libtool library.
33 # | 2. Update the version information only immediately before a public
34 # | release of your software. More frequent updates are unnecessary,
35 # | and only guarantee that the current interface number gets larger
38 # | 3. If the library source code has changed at all since the last
39 # | update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
41 # [So it seems like we should always update the middle 'R' field
44 # | 4. If any interfaces have been added, removed, or changed since the
45 # | last update, increment CURRENT, and set REVISION to 0.
47 # | 5. If any interfaces have been added since the last public release,
48 # | then increment AGE.
50 # [These two rules seem to mean that if any change is made to the
51 # generator, we should increment C and A, and set R to 0, so:
54 # | 6. If any interfaces have been removed since the last public release,
55 # | then set AGE to 0.
57 # [Our ABI guarantee means we won't remove interfaces except in
58 # very exceptional circumstances.]
60 # The maximum proc number (see guestfs_protocol.x:guestfs_procedure) is
61 # a mostly accurate stand-in for C & A in rules 5 & 6, so we use that. It
62 # is always incremented when we add a new appliance interface, and easy to
65 # The middle number is hard to increment-and-reset as described in rules
66 # 4 & 5, so for the moment it is always set to 0.
68 # Note that this scheme means the real library version will always be
69 # 'libguestfs.so.0.$(MAX_PROC_NR).0'.
71 libguestfs_la_LDFLAGS = -version-info $(MAX_PROC_NR):0:$(MAX_PROC_NR)
72 libguestfs_la_SOURCES = \
82 libguestfs_la_CFLAGS = -Wall -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
85 guestfs_protocol.c: guestfs_protocol.x
87 $(RPCGEN) -c -o $@-t $<
90 guestfs_protocol.h: guestfs_protocol.x
92 $(RPCGEN) -h -o $@-t $<