Update FSF address.
[libguestfs.git] / examples / Makefile.am
1 # libguestfs C examples
2 # Copyright (C) 2010-2011 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18 EXTRA_DIST = \
19         LICENSE \
20         guestfs-examples.pod \
21         guestfs-recipes.pod
22
23 CLEANFILES = \
24         stamp-guestfs-examples.pod \
25         stamp-guestfs-recipes.pod
26
27 noinst_PROGRAMS = create_disk inspect_vm
28 if HAVE_HIVEX
29 noinst_PROGRAMS += virt-dhcp-address
30 endif
31
32 create_disk_SOURCES = create_disk.c
33 create_disk_CFLAGS = \
34         -DGUESTFS_WARN_DEPRECATED=1 \
35         -I$(top_srcdir)/src -I$(top_builddir)/src \
36         $(WARN_CFLAGS) $(WERROR_CFLAGS)
37 create_disk_LDADD = \
38         $(top_builddir)/src/libguestfs.la
39
40 inspect_vm_SOURCES = inspect_vm.c
41 inspect_vm_CFLAGS = \
42         -DGUESTFS_WARN_DEPRECATED=1 \
43         -I$(top_srcdir)/src -I$(top_builddir)/src \
44         $(WARN_CFLAGS) $(WERROR_CFLAGS)
45 inspect_vm_LDADD = \
46         $(top_builddir)/src/libguestfs.la
47
48 virt_dhcp_address_SOURCES = virt-dhcp-address.c
49 virt_dhcp_address_CFLAGS = \
50         -DGUESTFS_WARN_DEPRECATED=1 \
51         -I$(top_srcdir)/src -I$(top_builddir)/src \
52         $(WARN_CFLAGS) $(WERROR_CFLAGS) \
53         $(HIVEX_CFLAGS)
54 virt_dhcp_address_LDADD = \
55         $(HIVEX_LIBS) \
56         $(top_builddir)/src/libguestfs.la
57
58 man_MANS = \
59         guestfs-examples.3 \
60         guestfs-recipes.1
61 noinst_DATA = \
62         $(top_builddir)/html/guestfs-examples.3.html \
63         $(top_builddir)/html/guestfs-recipes.1.html
64
65 guestfs-examples.3 $(top_builddir)/html/guestfs-examples.3.html: stamp-guestfs-examples.pod
66
67 stamp-guestfs-examples.pod: guestfs-examples.pod create_disk.c inspect_vm.c
68         $(top_builddir)/podwrapper.sh \
69           --section 3 \
70           --man guestfs-examples.3 \
71           --html $(top_builddir)/html/guestfs-examples.3.html \
72           --verbatim $(srcdir)/create_disk.c:@EXAMPLE1@ \
73           --verbatim $(srcdir)/inspect_vm.c:@EXAMPLE2@ \
74           $<
75         touch $@
76
77 guestfs-recipes.1 $(top_builddir)/html/guestfs-recipes.1.html: stamp-guestfs-recipes.pod
78
79 stamp-guestfs-recipes.pod: guestfs-recipes.pod
80         $(top_builddir)/podwrapper.sh \
81           --section 1 \
82           --man guestfs-recipes.1 \
83           --html $(top_builddir)/html/guestfs-recipes.1.html \
84           $<
85         touch $@