]> icculus.org git repositories - icculus/xz.git/blob - src/xzdec/Makefile.am
liblzma: Make lzma_code() check the reserved members in lzma_stream.
[icculus/xz.git] / src / xzdec / Makefile.am
1 ##
2 ## Author: Lasse Collin
3 ##
4 ## This file has been put into the public domain.
5 ## You can do whatever you want with this file.
6 ##
7
8 # Windows resource compiler support. It's fine to use xz_CPPFLAGS
9 # also for lzmadec.
10 .rc.o:
11         $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
12                 $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
13
14
15 xzdec_SOURCES = \
16         xzdec.c \
17         $(top_srcdir)/src/common/tuklib_progname.c \
18         $(top_srcdir)/src/common/tuklib_exit.c
19
20 if COND_W32
21 xzdec_SOURCES += xzdec_w32res.rc
22 endif
23
24 xzdec_CPPFLAGS = \
25         -DTUKLIB_GETTEXT=0 \
26         -I$(top_srcdir)/src/common \
27         -I$(top_srcdir)/src/liblzma/api \
28         -I$(top_builddir)/lib
29 xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la
30
31 if COND_GNULIB
32 xzdec_LDADD += $(top_builddir)/lib/libgnu.a
33 endif
34
35 xzdec_LDADD += $(LTLIBINTL)
36
37
38 lzmadec_SOURCES = \
39         xzdec.c \
40         $(top_srcdir)/src/common/tuklib_progname.c \
41         $(top_srcdir)/src/common/tuklib_exit.c
42
43 if COND_W32
44 lzmadec_SOURCES += lzmadec_w32res.rc
45 endif
46
47 lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC
48 lzmadec_LDFLAGS = $(xzdec_LDFLAGS)
49 lzmadec_LDADD = $(xzdec_LDADD)
50
51
52 bin_PROGRAMS =
53
54 if COND_XZDEC
55 bin_PROGRAMS += xzdec
56 dist_man_MANS = xzdec.1
57 endif
58
59 if COND_LZMADEC
60 bin_PROGRAMS += lzmadec
61
62 # FIXME: If xzdec is disabled, this will create a dangling symlink.
63 install-data-hook:
64         cd $(DESTDIR)$(mandir)/man1 && \
65         target=`echo xzdec | sed '$(transform)'` && \
66         link=`echo lzmadec | sed '$(transform)'` && \
67         rm -f $$link.1 && \
68         $(LN_S) $$target.1 $$link.1
69
70 uninstall-hook:
71         cd $(DESTDIR)$(mandir)/man1 && \
72         link=`echo lzmadec | sed '$(transform)'` && \
73         rm -f $$link.1
74 endif