]> icculus.org git repositories - icculus/xz.git/blob - src/xz/Makefile.am
Renamed lzma to xz and lzmadec to xzdec. We create symlinks
[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         suffix.c \
34         suffix.h \
35         util.c \
36         util.h
37
38 xz_CPPFLAGS = \
39         -DLOCALEDIR=\"$(localedir)\" \
40         -I@top_srcdir@/src/common \
41         -I@top_srcdir@/src/liblzma/api \
42         -I@top_builddir@/lib \
43         -I@top_srcdir@/lib
44
45 xz_CFLAGS = @PTHREAD_CFLAGS@
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         @PTHREAD_LIBS@
55
56 if COND_GNULIB
57 xz_LDADD += @top_builddir@/lib/libgnu.a
58 endif
59
60
61 ## Create symlinks for unxz and xzcat for convenicen. Create symlinks also
62 ## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
63 install-exec-hook:
64         cd $(DESTDIR)$(bindir) && \
65         rm -f unxz xzcat lzma unlzma lzcat && \
66         $(LN_S) xz unxz && \
67         $(LN_S) xz xzcat && \
68         $(LN_S) xz lzma && \
69         $(LN_S) xz unlzma && \
70         $(LN_S) xz lzcat
71
72 uninstall-hook:
73         cd $(DESTDIR)$(bindir) && \
74         rm -f unxz xzcat lzma unlzma lzcat