6e2d42c115959da3fd115c041cdfd943b539f6cd
[hivex.git] / hivex / Makefile.am
1 # hivex
2 # Copyright (C) 2009-2010 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 SUBDIRS = t tools
19
20 EXTRA_DIST = \
21         hivex.pod \
22         hivexml.pod \
23         hivexget.pod \
24         hivexget \
25         hivexsh.pod \
26         example1 \
27         example2 \
28         example3 \
29         example4 \
30         example5 \
31         example6
32
33 lib_LTLIBRARIES = libhivex.la
34
35 libhivex_la_SOURCES = \
36   hivex.c \
37   hivex.h \
38   byte_conversions.h \
39   gettext.h
40
41 libhivex_la_LDFLAGS = -version-info 0:0:0 $(LTLIBINTL) $(LTLIBTHREAD)
42 libhivex_la_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
43 libhivex_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib
44
45 bin_PROGRAMS = hivexml hivexsh
46 bin_SCRIPTS = hivexget
47 noinst_SCRIPTS = example1 example2 example3 example4 example5 example6
48
49 hivexml_SOURCES = \
50   hivexml.c
51
52 hivexml_LDADD = libhivex.la $(LIBXML2_LIBS) ../gnulib/lib/libgnu.la
53 hivexml_CFLAGS = \
54   -I$(top_srcdir)/src \
55   -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
56   $(LIBXML2_CFLAGS) \
57   $(WARN_CFLAGS) $(WERROR_CFLAGS)
58
59 hivexsh_SOURCES = \
60   hivexsh.c \
61   hivex.h \
62   byte_conversions.h
63
64 hivexsh_LDADD = libhivex.la ../gnulib/lib/libgnu.la  $(LIBREADLINE)
65 hivexsh_CFLAGS = \
66   -I$(top_srcdir)/gnulib/lib \
67   -I$(top_srcdir)/src \
68   -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
69   $(WARN_CFLAGS) $(WERROR_CFLAGS)
70
71 include_HEADERS = hivex.h
72
73 man_MANS = hivex.3 hivexml.1 hivexget.1 hivexsh.1
74
75 hivex.3: hivex.pod
76         $(POD2MAN) \
77           --section 3 \
78           -c "Windows Registry" \
79           --name "hivex" \
80           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
81           $< > $@-t; mv $@-t $@
82
83 hivexml.1: hivexml.pod
84         $(POD2MAN) \
85           --section 1 \
86           -c "Windows Registry" \
87           --name "hivexml" \
88           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
89           $< > $@-t; mv $@-t $@
90
91 hivexget.1: hivexget.pod
92         $(POD2MAN) \
93           --section 1 \
94           -c "Windows Registry" \
95           --name "hivexget" \
96           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
97           $< > $@-t; mv $@-t $@
98
99 hivexsh.1: hivexsh.pod
100         $(POD2MAN) \
101           --section 1 \
102           -c "Windows Registry" \
103           --name "hivexsh" \
104           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
105           $< > $@-t; mv $@-t $@
106
107 noinst_DATA = \
108         $(top_builddir)/html/hivex.3.html \
109         $(top_builddir)/html/hivexml.1.html \
110         $(top_builddir)/html/hivexget.1.html \
111         $(top_builddir)/html/hivexsh.1.html
112
113 $(top_builddir)/html/hivex.3.html: hivex.pod
114         mkdir -p $(top_builddir)/html
115         cd $(top_builddir) && pod2html \
116           --css 'pod.css' \
117           --htmldir html \
118           --outfile html/hivex.3.html \
119           hivex/hivex.pod
120
121 $(top_builddir)/html/hivexml.1.html: hivexml.pod
122         mkdir -p $(top_builddir)/html
123         cd $(top_builddir) && pod2html \
124           --css 'pod.css' \
125           --htmldir html \
126           --outfile html/hivexml.1.html \
127           hivex/hivexml.pod
128
129 $(top_builddir)/html/hivexget.1.html: hivexget.pod
130         mkdir -p $(top_builddir)/html
131         cd $(top_builddir) && pod2html \
132           --css 'pod.css' \
133           --htmldir html \
134           --outfile html/hivexget.1.html \
135           hivex/hivexget.pod
136
137 $(top_builddir)/html/hivexsh.1.html: hivexsh.pod
138         mkdir -p $(top_builddir)/html
139         cd $(top_builddir) && pod2html \
140           --css 'pod.css' \
141           --htmldir html \
142           --outfile html/hivexsh.1.html \
143           hivex/hivexsh.pod