Separate out the high-level API actions.
[libguestfs.git] / src / Makefile.am
1 # libguestfs
2 # Copyright (C) 2009 Red Hat Inc.
3 #
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.
8 #
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.
13 #
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.
17
18 EXTRA_DIST = guestfs_protocol.x \
19         guestfs_protocol.c \
20         guestfs_protocol.h
21
22 EXTRA_DIST += generator.ml
23
24 include_HEADERS = guestfs.h guestfs-actions.h guestfs-structs.h
25
26 lib_LTLIBRARIES = libguestfs.la
27
28 libguestfs_la_LDFLAGS = -version-info 0:0:0
29 libguestfs_la_SOURCES = \
30         guestfs.c \
31         guestfs.h \
32         guestfs_protocol.c \
33         guestfs_protocol.h \
34         guestfs-actions.h \
35         guestfs-actions.c
36
37 libguestfs_la_CFLAGS = -Wall -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
38
39 if HAVE_RPCGEN
40 guestfs_protocol.c: guestfs_protocol.x
41         rm -f $@-t
42         $(RPCGEN) -c -o $@-t $<
43         mv $@-t $@
44
45 guestfs_protocol.h: guestfs_protocol.x
46         rm -f $@-t
47         $(RPCGEN) -h -o $@-t $<
48         mv $@-t $@
49 endif
50
51 CLEANFILES = *~