]> icculus.org git repositories - icculus/xz.git/blob - src/xz/Makefile.am
Added missing $(EXEEXT).
[icculus/xz.git] / src / xz / 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 bin_PROGRAMS = xz
9
10 xz_SOURCES = \
11         args.c \
12         args.h \
13         coder.c \
14         coder.h \
15         file_io.c \
16         file_io.h \
17         hardware.c \
18         hardware.h \
19         main.c \
20         main.h \
21         message.c \
22         message.h \
23         options.c \
24         options.h \
25         private.h \
26         signals.c \
27         signals.h \
28         suffix.c \
29         suffix.h \
30         util.c \
31         util.h
32
33 xz_CPPFLAGS = \
34         -DLOCALEDIR=\"$(localedir)\" \
35         -I$(top_srcdir)/src/common \
36         -I$(top_srcdir)/src/liblzma/api \
37         -I$(top_builddir)/lib \
38         -I$(top_srcdir)/lib \
39         $(STATIC_CPPFLAGS)
40
41 xz_LDFLAGS = $(STATIC_LDFLAGS)
42 xz_LDADD = $(top_builddir)/src/liblzma/liblzma.la
43
44 if COND_GNULIB
45 xz_LDADD += $(top_builddir)/lib/libgnu.a
46 endif
47
48 # libgnu.a may need these libs, so this must be after libgnu.a.
49 xz_LDADD += $(LTLIBINTL)
50
51
52 ## Create symlinks for unxz and xzcat for convenience. Create symlinks also
53 ## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
54 xzlinks = unxz xzcat lzma unlzma lzcat
55
56 install-exec-hook:
57         cd $(DESTDIR)$(bindir) && \
58         target=`echo xz | $(SED) '$(transform)'`$(EXEEXT) && \
59         for name in $(xzlinks); do \
60                 link=`echo $$name | $(SED) '$(transform)'` && \
61                 rm -f $$link && \
62                 $(LN_S) $$target $$link; \
63         done
64
65 uninstall-hook:
66         cd $(DESTDIR)$(bindir) && \
67         for name in $(xzlinks); do \
68                 link=`echo $$name | $(SED) '$(transform)'` && \
69                 rm -f $$link; \
70         done