]> icculus.org git repositories - icculus/xz.git/blob - src/xz/Makefile.am
Various code cleanups the the xz command line tool.
[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
47 ## Always link the command line tool statically against liblzma. It is
48 ## faster on x86, because no need for PIC. We also have one dependency less,
49 ## which allows users to more freely copy the xz binary to other boxes.
50 xz_LDFLAGS = -static
51 xz_LDADD = \
52         @top_builddir@/src/liblzma/liblzma.la \
53         @LTLIBINTL@
54
55 if COND_GNULIB
56 xz_LDADD += @top_builddir@/lib/libgnu.a
57 endif
58
59
60 ## Create symlinks for unxz and xzcat for convenicen. Create symlinks also
61 ## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
62 install-exec-hook:
63         cd $(DESTDIR)$(bindir) && \
64         rm -f unxz xzcat lzma unlzma lzcat && \
65         $(LN_S) xz unxz && \
66         $(LN_S) xz xzcat && \
67         $(LN_S) xz lzma && \
68         $(LN_S) xz unlzma && \
69         $(LN_S) xz lzcat
70
71 uninstall-hook:
72         cd $(DESTDIR)$(bindir) && \
73         rm -f unxz xzcat lzma unlzma lzcat