Rename hivex/ -> lib/
[hivex.git] / lib / 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 = 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_LIBADD =  ../gnulib/lib/libgnu.la
42 libhivex_la_LDFLAGS = -version-info 0:0:0 $(LTLIBINTL) $(LTLIBTHREAD)
43 libhivex_la_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
44 libhivex_la_CPPFLAGS = -I$(top_srcdir)/gnulib/lib
45
46 bin_PROGRAMS = hivexml hivexsh
47 bin_SCRIPTS = hivexget
48 noinst_SCRIPTS = example1 example2 example3 example4 example5 example6
49
50 hivexml_SOURCES = \
51   hivexml.c
52
53 hivexml_LDADD = libhivex.la $(LIBXML2_LIBS)
54 hivexml_CFLAGS = \
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 $(LIBREADLINE)
65 hivexsh_CFLAGS = \
66   -I$(top_srcdir)/gnulib/lib \
67   -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
68   $(WARN_CFLAGS) $(WERROR_CFLAGS)
69
70 include_HEADERS = hivex.h
71
72 man_MANS = hivex.3 hivexml.1 hivexget.1 hivexsh.1
73
74 hivex.3: hivex.pod
75         $(POD2MAN) \
76           --section 3 \
77           -c "Windows Registry" \
78           --name "hivex" \
79           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
80           $< > $@-t; mv $@-t $@
81
82 hivexml.1: hivexml.pod
83         $(POD2MAN) \
84           --section 1 \
85           -c "Windows Registry" \
86           --name "hivexml" \
87           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
88           $< > $@-t; mv $@-t $@
89
90 hivexget.1: hivexget.pod
91         $(POD2MAN) \
92           --section 1 \
93           -c "Windows Registry" \
94           --name "hivexget" \
95           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
96           $< > $@-t; mv $@-t $@
97
98 hivexsh.1: hivexsh.pod
99         $(POD2MAN) \
100           --section 1 \
101           -c "Windows Registry" \
102           --name "hivexsh" \
103           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
104           $< > $@-t; mv $@-t $@
105
106 noinst_DATA = \
107         $(top_builddir)/html/hivex.3.html \
108         $(top_builddir)/html/hivexml.1.html \
109         $(top_builddir)/html/hivexget.1.html \
110         $(top_builddir)/html/hivexsh.1.html
111
112 $(top_builddir)/html/hivex.3.html: hivex.pod
113         mkdir -p $(top_builddir)/html
114         cd $(top_builddir) && pod2html \
115           --css 'pod.css' \
116           --htmldir html \
117           --outfile html/hivex.3.html \
118           lib/hivex.pod
119
120 $(top_builddir)/html/hivexml.1.html: hivexml.pod
121         mkdir -p $(top_builddir)/html
122         cd $(top_builddir) && pod2html \
123           --css 'pod.css' \
124           --htmldir html \
125           --outfile html/hivexml.1.html \
126           lib/hivexml.pod
127
128 $(top_builddir)/html/hivexget.1.html: hivexget.pod
129         mkdir -p $(top_builddir)/html
130         cd $(top_builddir) && pod2html \
131           --css 'pod.css' \
132           --htmldir html \
133           --outfile html/hivexget.1.html \
134           lib/hivexget.pod
135
136 $(top_builddir)/html/hivexsh.1.html: hivexsh.pod
137         mkdir -p $(top_builddir)/html
138         cd $(top_builddir) && pod2html \
139           --css 'pod.css' \
140           --htmldir html \
141           --outfile html/hivexsh.1.html \
142           lib/hivexsh.pod