2010-05-10 06:59:50 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2016-02-04 21:16:35 +00:00
|
|
|
PACKAGE=lib${LIB}
|
2010-05-14 20:40:37 +00:00
|
|
|
LIB= lzma
|
2017-01-20 04:46:20 +00:00
|
|
|
LZMADIR= ${SRCTOP}/contrib/xz/src/liblzma
|
2010-05-10 06:59:50 +00:00
|
|
|
|
2017-01-20 04:46:20 +00:00
|
|
|
.PATH: ${LZMADIR:H}/common
|
2015-02-09 06:20:34 +00:00
|
|
|
SRCS+= tuklib_physmem.c tuklib_cpucores.c
|
2010-05-10 06:59:50 +00:00
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/api/lzma
|
|
|
|
|
|
|
|
MAININCS= ../lzma.h
|
|
|
|
MAININCSDIR= ${INCLUDEDIR}
|
|
|
|
|
|
|
|
LZMAINCS+= base.h \
|
|
|
|
bcj.h \
|
|
|
|
block.h \
|
|
|
|
check.h \
|
|
|
|
container.h \
|
|
|
|
delta.h \
|
|
|
|
filter.h \
|
2010-05-10 07:47:31 +00:00
|
|
|
hardware.h \
|
|
|
|
index.h \
|
2010-05-10 06:59:50 +00:00
|
|
|
index_hash.h \
|
2015-02-09 06:20:34 +00:00
|
|
|
lzma12.h \
|
2010-05-10 06:59:50 +00:00
|
|
|
stream_flags.h \
|
|
|
|
version.h \
|
|
|
|
vli.h
|
|
|
|
|
|
|
|
LZMAINCSDIR= ${INCLUDEDIR}/lzma
|
|
|
|
|
|
|
|
INCSGROUPS= MAININCS LZMAINCS
|
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/common
|
|
|
|
SRCS+= common.c \
|
|
|
|
block_util.c \
|
|
|
|
easy_preset.c \
|
|
|
|
filter_common.c \
|
|
|
|
hardware_physmem.c \
|
2015-02-09 06:20:34 +00:00
|
|
|
hardware_cputhreads.c \
|
2010-05-10 06:59:50 +00:00
|
|
|
index.c \
|
|
|
|
stream_flags_common.c \
|
|
|
|
vli_size.c \
|
|
|
|
alone_encoder.c \
|
|
|
|
block_buffer_encoder.c \
|
|
|
|
block_encoder.c \
|
|
|
|
block_header_encoder.c \
|
|
|
|
easy_buffer_encoder.c \
|
|
|
|
easy_encoder.c \
|
|
|
|
easy_encoder_memusage.c \
|
|
|
|
filter_buffer_encoder.c \
|
|
|
|
filter_encoder.c \
|
|
|
|
filter_flags_encoder.c \
|
|
|
|
index_encoder.c \
|
|
|
|
stream_buffer_encoder.c \
|
|
|
|
stream_encoder.c \
|
|
|
|
stream_flags_encoder.c \
|
|
|
|
vli_encoder.c \
|
|
|
|
alone_decoder.c \
|
|
|
|
auto_decoder.c \
|
|
|
|
block_buffer_decoder.c \
|
|
|
|
block_decoder.c \
|
|
|
|
block_header_decoder.c \
|
|
|
|
easy_decoder_memusage.c \
|
|
|
|
filter_buffer_decoder.c \
|
|
|
|
filter_decoder.c \
|
|
|
|
filter_flags_decoder.c \
|
|
|
|
index_decoder.c \
|
|
|
|
index_hash.c \
|
|
|
|
stream_buffer_decoder.c \
|
|
|
|
stream_decoder.c \
|
|
|
|
stream_flags_decoder.c \
|
2015-02-09 06:20:34 +00:00
|
|
|
stream_encoder_mt.c \
|
|
|
|
vli_decoder.c \
|
|
|
|
outqueue.c
|
|
|
|
|
2010-05-10 06:59:50 +00:00
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/check
|
|
|
|
SRCS+= check.c \
|
|
|
|
crc32_table.c \
|
2020-06-20 21:32:07 +00:00
|
|
|
crc64_table.c
|
2010-05-10 06:59:50 +00:00
|
|
|
.if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
|
|
|
|
SRCS+= crc32_x86.S \
|
|
|
|
crc64_x86.S
|
2011-02-15 22:03:09 +00:00
|
|
|
ACFLAGS+= -Wa,--noexecstack
|
2010-05-10 06:59:50 +00:00
|
|
|
.else
|
|
|
|
SRCS+= crc32_fast.c \
|
|
|
|
crc64_fast.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/lz
|
|
|
|
SRCS+= lz_encoder.c \
|
|
|
|
lz_encoder_mf.c \
|
|
|
|
lz_decoder.c
|
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/lzma
|
|
|
|
SRCS+= lzma_encoder.c \
|
|
|
|
lzma_encoder_presets.c \
|
|
|
|
lzma_encoder_optimum_fast.c \
|
|
|
|
lzma_encoder_optimum_normal.c \
|
|
|
|
fastpos_table.c \
|
|
|
|
lzma_decoder.c \
|
|
|
|
lzma2_encoder.c \
|
|
|
|
lzma2_decoder.c
|
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/rangecoder
|
|
|
|
SRCS+= price_table.c
|
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/delta
|
|
|
|
SRCS+= delta_common.c \
|
|
|
|
delta_encoder.c \
|
|
|
|
delta_decoder.c
|
|
|
|
|
|
|
|
.PATH: ${LZMADIR}/simple
|
|
|
|
SRCS+= simple_coder.c \
|
|
|
|
simple_encoder.c \
|
|
|
|
simple_decoder.c \
|
|
|
|
x86.c \
|
|
|
|
powerpc.c \
|
|
|
|
ia64.c \
|
|
|
|
arm.c \
|
|
|
|
armthumb.c \
|
|
|
|
sparc.c
|
2015-01-10 00:11:10 +00:00
|
|
|
|
|
|
|
.PATH: ${LZMADIR}
|
|
|
|
|
2020-06-20 21:32:07 +00:00
|
|
|
VERSION_MAJOR!= sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' \
|
2015-01-10 00:11:10 +00:00
|
|
|
${LZMADIR}/api/lzma/version.h
|
2020-06-20 21:32:07 +00:00
|
|
|
VERSION_MINOR!= sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' \
|
2015-01-10 00:11:10 +00:00
|
|
|
${LZMADIR}/api/lzma/version.h
|
2020-06-20 21:32:07 +00:00
|
|
|
VERSION_PATCH!= sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' \
|
2015-01-10 00:11:10 +00:00
|
|
|
${LZMADIR}/api/lzma/version.h
|
|
|
|
|
2010-05-10 06:59:50 +00:00
|
|
|
WARNS?= 3
|
|
|
|
|
|
|
|
CFLAGS+= -DHAVE_CONFIG_H \
|
2010-05-14 20:40:37 +00:00
|
|
|
-DTUKLIB_SYMBOL_PREFIX=lzma_ \
|
2010-05-10 06:59:50 +00:00
|
|
|
-I${.CURDIR} \
|
|
|
|
-I${LZMADIR}/api \
|
|
|
|
-I${LZMADIR}/common \
|
|
|
|
-I${LZMADIR}/check \
|
|
|
|
-I${LZMADIR}/lz \
|
|
|
|
-I${LZMADIR}/rangecoder \
|
|
|
|
-I${LZMADIR}/lzma \
|
|
|
|
-I${LZMADIR}/delta \
|
|
|
|
-I${LZMADIR}/simple \
|
2017-01-20 04:46:20 +00:00
|
|
|
-I${LZMADIR:H}/common
|
2010-05-10 06:59:50 +00:00
|
|
|
|
2020-06-20 21:32:07 +00:00
|
|
|
LIBADD+= md pthread
|
2015-02-09 06:20:34 +00:00
|
|
|
|
2010-05-14 20:40:37 +00:00
|
|
|
VERSION_DEF= ${.CURDIR}/Versions.def
|
|
|
|
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
|
|
|
|
CFLAGS+= -DSYMBOL_VERSIONING
|
|
|
|
|
2015-01-10 00:11:10 +00:00
|
|
|
CLEANFILES+= liblzma.pc
|
|
|
|
|
2015-09-18 23:49:32 +00:00
|
|
|
FILES= liblzma.pc
|
|
|
|
FILESDIR= ${LIBDATADIR}/pkgconfig
|
|
|
|
|
2015-01-10 00:11:10 +00:00
|
|
|
liblzma.pc: liblzma.pc.in
|
2015-09-18 23:49:32 +00:00
|
|
|
sed -e 's,@prefix@,/usr,g ; \
|
2020-06-20 21:32:07 +00:00
|
|
|
s,@exec_prefix@,/usr,g ; \
|
2015-01-11 09:25:01 +00:00
|
|
|
s,@libdir@,/usr/lib,g ; \
|
|
|
|
s,@includedir@,/usr/include,g ; \
|
2020-06-20 21:32:07 +00:00
|
|
|
s,@LIBS@,-pthread -lmd,g ; \
|
|
|
|
s,@PACKAGE_URL@,https://tukaani.org/xz/,g ; \
|
2015-01-10 00:11:10 +00:00
|
|
|
s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \
|
|
|
|
s,@PTHREAD_CFLAGS@,,g ; \
|
|
|
|
s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET}
|
|
|
|
|
2010-05-10 06:59:50 +00:00
|
|
|
.include <bsd.lib.mk>
|