]> icculus.org git repositories - icculus/xz.git/blob - src/xz/Makefile.am
Remove --force from xzdec.
[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 if COND_W32
34 xz_SOURCES += xz_w32res.rc
35 endif
36
37 xz_CPPFLAGS = \
38         -DLOCALEDIR=\"$(localedir)\" \
39         -I$(top_srcdir)/src/common \
40         -I$(top_srcdir)/src/liblzma/api \
41         -I$(top_builddir)/lib \
42         $(STATIC_CPPFLAGS)
43
44 xz_LDFLAGS = $(STATIC_LDFLAGS)
45 xz_LDADD = $(top_builddir)/src/liblzma/liblzma.la
46
47 if COND_GNULIB
48 xz_LDADD += $(top_builddir)/lib/libgnu.a
49 endif
50
51 # libgnu.a may need these libs, so this must be after libgnu.a.
52 xz_LDADD += $(LTLIBINTL)
53
54
55 # Windows resource compiler support
56 .rc.o:
57         $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
58                 $(xz_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
59
60
61 ## Create symlinks for unxz and xzcat for convenience. Create symlinks also
62 ## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
63 xzlinks = unxz xzcat lzma unlzma lzcat
64
65 install-exec-hook:
66         cd $(DESTDIR)$(bindir) && \
67         target=`echo xz | sed '$(transform)'`$(EXEEXT) && \
68         for name in $(xzlinks); do \
69                 link=`echo $$name | sed '$(transform)'` && \
70                 rm -f $$link && \
71                 $(LN_S) $$target $$link; \
72         done
73
74 uninstall-hook:
75         cd $(DESTDIR)$(bindir) && \
76         for name in $(xzlinks); do \
77                 link=`echo $$name | sed '$(transform)'` && \
78                 rm -f $$link; \
79         done