world: Attempt to fix NOSHARED MINUSLPAM handling.
[dragonfly.git] / usr.bin / xz / Makefile
blobd01f16cf074e8e0723e73ff40472509dc3e81985
1 PROG= xz
2 MAN= xz.1
4 LINKS= ${BINDIR}/xz ${BINDIR}/unxz
5 LINKS+= ${BINDIR}/xz ${BINDIR}/xzcat
6 LINKS+= ${BINDIR}/xz ${BINDIR}/lzma
7 LINKS+= ${BINDIR}/xz ${BINDIR}/unlzma
8 LINKS+= ${BINDIR}/xz ${BINDIR}/lzcat
9 MLINKS= xz.1 unxz.1 \
10 xz.1 xzcat.1 \
11 xz.1 lzma.1 \
12 xz.1 unlzma.1 \
13 xz.1 lzcat.1
15 XZDIR= ${.CURDIR}/../../contrib/xz/src
17 .PATH: ${XZDIR}/xz
18 SRCS= args.c \
19 coder.c \
20 file_io.c \
21 hardware.c \
22 list.c \
23 main.c \
24 message.c \
25 mytime.c \
26 options.c \
27 signals.c \
28 suffix.c \
29 util.c
31 .PATH: ${XZDIR}/common
32 SRCS+= tuklib_open_stdxxx.c \
33 tuklib_progname.c \
34 tuklib_exit.c \
35 tuklib_cpucores.c \
36 tuklib_mbstr_width.c \
37 tuklib_mbstr_fw.c
39 WARNS?= 3
41 LIBLZMADIR= ${.CURDIR}/../../lib/liblzma
42 CFLAGS+= -DHAVE_CONFIG_H
43 CFLAGS+= -I${LIBLZMADIR} -I${XZDIR}/common
45 DPADD= ${LIBLZMA}
46 LDADD= -llzma
48 .if defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" )
49 DPADD+= ${LIBPTHREAD}
50 LDADD+= -lpthread
51 .endif
53 .PATH: ${XZDIR}/scripts
54 SCRIPTS= xzdiff xzgrep xzless xzmore
55 MAN+= ${SCRIPTS:S/$/.1/g}
56 PKG_NAME!= grep -w PACKAGE_NAME ${LIBLZMADIR}/config.h | awk -F\" '{print $$2}'
57 VERSION!= grep -w VERSION ${LIBLZMADIR}/config.h | awk -F\" '{print $$2}'
58 PKG_BUG!= grep -w PACKAGE_BUGREPORT ${LIBLZMADIR}/config.h | awk -F\" '{print $$2}'
60 ${SCRIPTS}: ${.TARGET}.in
61 sed -e s,@POSIX_SHELL@,/bin/sh,g \
62 -e s,@xz@,xz,g \
63 -e s,@PACKAGE_NAME@,${PKG_NAME:Q},g \
64 -e s,@VERSION@,${VERSION:Q},g \
65 -e s,@PACKAGE_BUGREPORT@,${PKG_BUG:Q},g ${.ALLSRC} > ${.TARGET}
67 CLEANFILES= ${SCRIPTS}
68 LINKS+= ${SCRIPTSDIR}/xzdiff ${SCRIPTSDIR}/xzcmp \
69 ${SCRIPTSDIR}/xzgrep ${SCRIPTSDIR}/xzegrep \
70 ${SCRIPTSDIR}/xzgrep ${SCRIPTSDIR}/xzfgrep \
71 ${SCRIPTSDIR}/xzdiff ${SCRIPTSDIR}/lzdiff \
72 ${SCRIPTSDIR}/xzdiff ${SCRIPTSDIR}/lzcmp \
73 ${SCRIPTSDIR}/xzgrep ${SCRIPTSDIR}/lzgrep \
74 ${SCRIPTSDIR}/xzgrep ${SCRIPTSDIR}/lzegrep \
75 ${SCRIPTSDIR}/xzgrep ${SCRIPTSDIR}/lzfgrep \
76 ${SCRIPTSDIR}/xzmore ${SCRIPTSDIR}/lzmore \
77 ${SCRIPTSDIR}/xzless ${SCRIPTSDIR}/lzless
78 MLINKS+=xzdiff.1 xzcmp.1 \
79 xzgrep.1 xzegrep.1 \
80 xzgrep.1 xzfgrep.1 \
81 xzdiff.1 lzdiff.1 \
82 xzdiff.1 lzcmp.1 \
83 xzgrep.1 lzgrep.1 \
84 xzgrep.1 lzegrep.1 \
85 xzgrep.1 lzfgrep.1 \
86 xzmore.1 lzmore.1 \
87 xzless.1 lzless.1
89 .include <bsd.prog.mk>