OLD | NEW |
1 ## | 1 ## |
2 ## Author: Lasse Collin | 2 ## Author: Lasse Collin |
3 ## | 3 ## |
4 ## This file has been put into the public domain. | 4 ## This file has been put into the public domain. |
5 ## You can do whatever you want with this file. | 5 ## You can do whatever you want with this file. |
6 ## | 6 ## |
7 | 7 |
8 # Windows resource compiler support. It's fine to use xz_CPPFLAGS | 8 # Windows resource compiler support. It's fine to use xz_CPPFLAGS |
9 # also for lzmadec. | 9 # also for lzmadec. |
10 .rc.o: | 10 .rc.o: |
11 $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | 11 $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ |
12 $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ | 12 $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ |
13 | 13 |
14 | 14 |
15 bin_PROGRAMS = xzdec lzmadec | |
16 | |
17 xzdec_SOURCES = \ | 15 xzdec_SOURCES = \ |
18 xzdec.c \ | 16 xzdec.c \ |
19 $(top_srcdir)/src/common/tuklib_progname.c \ | 17 $(top_srcdir)/src/common/tuklib_progname.c \ |
20 $(top_srcdir)/src/common/tuklib_exit.c | 18 $(top_srcdir)/src/common/tuklib_exit.c |
21 | 19 |
22 if COND_W32 | 20 if COND_W32 |
23 xzdec_SOURCES += xzdec_w32res.rc | 21 xzdec_SOURCES += xzdec_w32res.rc |
24 endif | 22 endif |
25 | 23 |
26 xzdec_CPPFLAGS = \ | 24 xzdec_CPPFLAGS = \ |
27 -DTUKLIB_GETTEXT=0 \ | 25 -DTUKLIB_GETTEXT=0 \ |
28 -I$(top_srcdir)/src/common \ | 26 -I$(top_srcdir)/src/common \ |
29 -I$(top_srcdir)/src/liblzma/api \ | 27 -I$(top_srcdir)/src/liblzma/api \ |
30 » -I$(top_builddir)/lib \ | 28 » -I$(top_builddir)/lib |
31 » $(STATIC_CPPFLAGS) | |
32 xzdec_LDFLAGS = $(STATIC_LDFLAGS) | |
33 xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la | 29 xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la |
34 | 30 |
35 if COND_GNULIB | 31 if COND_GNULIB |
36 xzdec_LDADD += $(top_builddir)/lib/libgnu.a | 32 xzdec_LDADD += $(top_builddir)/lib/libgnu.a |
37 endif | 33 endif |
38 | 34 |
39 xzdec_LDADD += $(LTLIBINTL) | 35 xzdec_LDADD += $(LTLIBINTL) |
40 | 36 |
41 | 37 |
42 lzmadec_SOURCES = \ | 38 lzmadec_SOURCES = \ |
43 xzdec.c \ | 39 xzdec.c \ |
44 $(top_srcdir)/src/common/tuklib_progname.c \ | 40 $(top_srcdir)/src/common/tuklib_progname.c \ |
45 $(top_srcdir)/src/common/tuklib_exit.c | 41 $(top_srcdir)/src/common/tuklib_exit.c |
46 | 42 |
47 if COND_W32 | 43 if COND_W32 |
48 lzmadec_SOURCES += lzmadec_w32res.rc | 44 lzmadec_SOURCES += lzmadec_w32res.rc |
49 endif | 45 endif |
50 | 46 |
51 lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC | 47 lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC |
52 lzmadec_LDFLAGS = $(xzdec_LDFLAGS) | 48 lzmadec_LDFLAGS = $(xzdec_LDFLAGS) |
53 lzmadec_LDADD = $(xzdec_LDADD) | 49 lzmadec_LDADD = $(xzdec_LDADD) |
54 | 50 |
55 | 51 |
| 52 bin_PROGRAMS = |
| 53 |
| 54 if COND_XZDEC |
| 55 bin_PROGRAMS += xzdec |
56 dist_man_MANS = xzdec.1 | 56 dist_man_MANS = xzdec.1 |
| 57 endif |
57 | 58 |
| 59 if COND_LZMADEC |
| 60 bin_PROGRAMS += lzmadec |
| 61 |
| 62 # FIXME: If xzdec is disabled, this will create a dangling symlink. |
58 install-data-hook: | 63 install-data-hook: |
59 cd $(DESTDIR)$(mandir)/man1 && \ | 64 cd $(DESTDIR)$(mandir)/man1 && \ |
60 target=`echo xzdec | sed '$(transform)'` && \ | 65 target=`echo xzdec | sed '$(transform)'` && \ |
61 link=`echo lzmadec | sed '$(transform)'` && \ | 66 link=`echo lzmadec | sed '$(transform)'` && \ |
62 rm -f $$link.1 && \ | 67 rm -f $$link.1 && \ |
63 $(LN_S) $$target.1 $$link.1 | 68 $(LN_S) $$target.1 $$link.1 |
64 | 69 |
65 uninstall-hook: | 70 uninstall-hook: |
66 cd $(DESTDIR)$(mandir)/man1 && \ | 71 cd $(DESTDIR)$(mandir)/man1 && \ |
67 link=`echo lzmadec | sed '$(transform)'` && \ | 72 link=`echo lzmadec | sed '$(transform)'` && \ |
68 rm -f $$link.1 | 73 rm -f $$link.1 |
| 74 endif |
OLD | NEW |