xref: /freebsd/lib/liblzma/Makefile (revision 8d20be1e22095c27faf8fe8b2f0d089739cc742e)
1# $FreeBSD$
2
3LIB=		lzma
4LZMADIR=	${.CURDIR}/../../contrib/xz/src/liblzma
5
6.PATH: ${LZMADIR}/../common
7SRCS+=	tuklib_physmem.c
8
9.PATH: ${LZMADIR}/api/lzma
10
11MAININCS=	../lzma.h
12MAININCSDIR=	${INCLUDEDIR}
13
14LZMAINCS+=	base.h \
15		bcj.h \
16		block.h \
17		check.h \
18		container.h \
19		delta.h \
20		filter.h \
21		hardware.h \
22		index.h \
23		index_hash.h \
24		lzma.h \
25		stream_flags.h \
26		version.h \
27		vli.h
28
29LZMAINCSDIR=	${INCLUDEDIR}/lzma
30
31INCSGROUPS=	MAININCS LZMAINCS
32
33.PATH: ${LZMADIR}/common
34SRCS+=	common.c \
35	block_util.c \
36	easy_preset.c \
37	filter_common.c \
38	hardware_physmem.c \
39	index.c \
40	stream_flags_common.c \
41	vli_size.c \
42	alone_encoder.c \
43	block_buffer_encoder.c \
44	block_encoder.c \
45	block_header_encoder.c \
46	easy_buffer_encoder.c \
47	easy_encoder.c \
48	easy_encoder_memusage.c \
49	filter_buffer_encoder.c \
50	filter_encoder.c \
51	filter_flags_encoder.c \
52	index_encoder.c \
53	stream_buffer_encoder.c \
54	stream_encoder.c \
55	stream_flags_encoder.c \
56	vli_encoder.c \
57	alone_decoder.c \
58	auto_decoder.c \
59	block_buffer_decoder.c \
60	block_decoder.c \
61	block_header_decoder.c \
62	easy_decoder_memusage.c \
63	filter_buffer_decoder.c \
64	filter_decoder.c \
65	filter_flags_decoder.c \
66	index_decoder.c \
67	index_hash.c \
68	stream_buffer_decoder.c \
69	stream_decoder.c \
70	stream_flags_decoder.c \
71	vli_decoder.c
72
73.PATH: ${LZMADIR}/check
74SRCS+=	check.c \
75	crc32_table.c \
76	crc64_table.c \
77	sha256.c
78.if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
79SRCS+=	crc32_x86.S \
80	crc64_x86.S
81ACFLAGS+=	-Wa,--noexecstack
82.else
83SRCS+=	crc32_fast.c \
84	crc64_fast.c
85.endif
86
87.PATH: ${LZMADIR}/lz
88SRCS+=	lz_encoder.c \
89	lz_encoder_mf.c \
90	lz_decoder.c
91
92.PATH: ${LZMADIR}/lzma
93SRCS+=	lzma_encoder.c \
94	lzma_encoder_presets.c \
95	lzma_encoder_optimum_fast.c \
96	lzma_encoder_optimum_normal.c \
97	fastpos_table.c \
98	lzma_decoder.c \
99	lzma2_encoder.c \
100	lzma2_decoder.c
101
102.PATH: ${LZMADIR}/rangecoder
103SRCS+=	price_table.c
104
105.PATH: ${LZMADIR}/delta
106SRCS+=	delta_common.c \
107	delta_encoder.c \
108	delta_decoder.c
109
110.PATH: ${LZMADIR}/simple
111SRCS+=	simple_coder.c \
112	simple_encoder.c \
113	simple_decoder.c \
114	x86.c \
115	powerpc.c \
116	ia64.c \
117	arm.c \
118	armthumb.c \
119	sparc.c
120
121WARNS?=	3
122
123CFLAGS+=	-DHAVE_CONFIG_H \
124		-DTUKLIB_SYMBOL_PREFIX=lzma_ \
125		-I${.CURDIR} \
126		-I${LZMADIR}/api \
127		-I${LZMADIR}/common \
128		-I${LZMADIR}/check \
129		-I${LZMADIR}/lz \
130		-I${LZMADIR}/rangecoder \
131		-I${LZMADIR}/lzma \
132		-I${LZMADIR}/delta \
133		-I${LZMADIR}/simple \
134		-I${LZMADIR}/../common
135
136VERSION_DEF=	${.CURDIR}/Versions.def
137SYMBOL_MAPS=	${.CURDIR}/Symbol.map
138CFLAGS+=	-DSYMBOL_VERSIONING
139
140.include <bsd.lib.mk>
141