]> icculus.org git repositories - icculus/xz.git/blob - src/xz/Makefile.am
Make it easy to choose if command line tools should be
[icculus/xz.git] / src / xz / Makefile.am
1 ##
2 ##  Copyright (C) 2007 Lasse Collin
3 ##
4 ##  This program is free software; you can redistribute it and/or
5 ##  modify it under the terms of the GNU Lesser General Public
6 ##  License as published by the Free Software Foundation; either
7 ##  version 2.1 of the License, or (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 GNU
12 ##  Lesser General Public License for more details.
13 ##
14
15 bin_PROGRAMS = xz
16
17 xz_SOURCES = \
18         args.c \
19         args.h \
20         hardware.c \
21         hardware.h \
22         io.c \
23         io.h \
24         main.c \
25         main.h \
26         message.c \
27         message.h \
28         options.c \
29         options.h \
30         private.h \
31         process.c \
32         process.h \
33         signals.c \
34         signals.h \
35         suffix.c \
36         suffix.h \
37         util.c \
38         util.h
39
40 xz_CPPFLAGS = \
41         -DLOCALEDIR=\"$(localedir)\" \
42         -I@top_srcdir@/src/common \
43         -I@top_srcdir@/src/liblzma/api \
44         -I@top_builddir@/lib \
45         -I@top_srcdir@/lib \
46         @STATIC_CPPFLAGS@
47
48 xz_LDFLAGS = @STATIC_LDFLAGS@
49 xz_LDADD = \
50         @top_builddir@/src/liblzma/liblzma.la \
51         @LTLIBINTL@
52
53 if COND_GNULIB
54 xz_LDADD += @top_builddir@/lib/libgnu.a
55 endif
56
57
58 ## Create symlinks for unxz and xzcat for convenicen. Create symlinks also
59 ## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
60 install-exec-hook:
61         cd $(DESTDIR)$(bindir) && \
62         rm -f unxz xzcat lzma unlzma lzcat && \
63         $(LN_S) xz unxz && \
64         $(LN_S) xz xzcat && \
65         $(LN_S) xz lzma && \
66         $(LN_S) xz unlzma && \
67         $(LN_S) xz lzcat
68
69 uninstall-hook:
70         cd $(DESTDIR)$(bindir) && \
71         rm -f unxz xzcat lzma unlzma lzcat