xref: /freebsd/usr.bin/sort/Makefile (revision d826ccd66d20ebec714f745cafd5e75e10957de9)
1c66bbc91SGabor Kovesdan# $FreeBSD$
2c66bbc91SGabor Kovesdan
3c66bbc91SGabor Kovesdan.include <bsd.own.mk>
4c66bbc91SGabor Kovesdan
5c66bbc91SGabor Kovesdan.if ${MK_BSD_SORT} == "yes"
6c66bbc91SGabor KovesdanPROG=	sort
7c66bbc91SGabor Kovesdan.else
8c66bbc91SGabor KovesdanPROG=	bsdsort
9c66bbc91SGabor KovesdanCLEANFILES+= bsdsort.1
10c66bbc91SGabor Kovesdan
11c66bbc91SGabor Kovesdanbsdsort.1: sort.1
12c66bbc91SGabor Kovesdan	cp ${.ALLSRC} ${.TARGET}
13c66bbc91SGabor Kovesdan.endif
14c66bbc91SGabor Kovesdan
15c66bbc91SGabor KovesdanSRCS=	bwstring.c coll.c file.c mem.c radixsort.c sort.c vsort.c
16c66bbc91SGabor Kovesdan
17c66bbc91SGabor KovesdanWARNS=	6
18c66bbc91SGabor Kovesdan
19c66bbc91SGabor Kovesdansort.1: sort.1.in
20c66bbc91SGabor Kovesdan	/usr/bin/sed ${MAN_SUB} ${.ALLSRC} >${.TARGET}
21c66bbc91SGabor Kovesdan
22c66bbc91SGabor KovesdanCLEANFILES+= sort.1
23c66bbc91SGabor Kovesdan
24*d826ccd6SGabor Kovesdan.if defined(WITH_THREADS)
25c66bbc91SGabor KovesdanCFLAGS+= -DSORT_THREADS
26c66bbc91SGabor KovesdanLDFLAGS+= -lpthread -lmd
27c66bbc91SGabor KovesdanMAN_SUB+= -e 's|%%THREADS%%||g'
28c66bbc91SGabor Kovesdan.else
29c66bbc91SGabor KovesdanLDFLAGS+= -lmd
30c66bbc91SGabor KovesdanMAN_SUB+= -e 's|%%THREADS%%|\.\\"|g'
31c66bbc91SGabor Kovesdan.endif
32c66bbc91SGabor Kovesdan
33c66bbc91SGabor Kovesdan.if !defined(WITHOUT_NLS)
34c66bbc91SGabor KovesdanNLS+=	hu_HU.ISO8859-2
35c66bbc91SGabor KovesdanNLSSRCFILES= ${NLS:S@$@.msg@}
36c66bbc91SGabor KovesdanMAN_SUB+= -e 's|%%NLS%%||g'
37c66bbc91SGabor Kovesdan.for lang in ${NLS}
38c66bbc91SGabor KovesdanNLSSRCDIR_${lang}= ${.CURDIR}/nls
39c66bbc91SGabor Kovesdan.endfor
40c66bbc91SGabor Kovesdan.else
41c66bbc91SGabor KovesdanCFLAGS+= -DWITHOUT_NLS
42*d826ccd6SGabor KovesdanMAN_SUB+= -e 's|%%NLS%%|\.\\"|g'
43c66bbc91SGabor Kovesdan.endif
44c66bbc91SGabor Kovesdan
45c66bbc91SGabor Kovesdan.include <bsd.prog.mk>
46