Makefile revision 208099
1249967Sneel# $FreeBSD: head/lib/liblzma/Makefile 208099 2010-05-14 20:40:37Z delphij $
2249967Sneel
3249967SneelLIB=		lzma
4249967SneelLZMADIR=	${.CURDIR}/../../contrib/xz/src/liblzma
5249967Sneel
6249967Sneel.PATH: ${LZMADIR}/../common
7249967SneelSRCS+=	tuklib_physmem.c
8249967Sneel
9249967Sneel.PATH: ${LZMADIR}/api/lzma
10249967Sneel
11249967SneelMAININCS=	../lzma.h
12249967SneelMAININCSDIR=	${INCLUDEDIR}
13249967Sneel
14249967SneelLZMAINCS+=	base.h \
15249967Sneel		bcj.h \
16249967Sneel		block.h \
17249967Sneel		check.h \
18249967Sneel		container.h \
19249967Sneel		delta.h \
20249967Sneel		filter.h \
21249967Sneel		hardware.h \
22249967Sneel		index.h \
23249967Sneel		index_hash.h \
24249967Sneel		lzma.h \
25249967Sneel		stream_flags.h \
26249967Sneel		subblock.h \
27249967Sneel		version.h \
28249967Sneel		vli.h
29249967Sneel
30249967SneelLZMAINCSDIR=	${INCLUDEDIR}/lzma
31249967Sneel
32249967SneelINCSGROUPS=	MAININCS LZMAINCS
33249967Sneel
34249967Sneel.PATH: ${LZMADIR}/common
35249967SneelSRCS+=	common.c \
36249967Sneel	block_util.c \
37249967Sneel	easy_preset.c \
38249967Sneel	filter_common.c \
39249967Sneel	hardware_physmem.c \
40249967Sneel	index.c \
41249967Sneel	stream_flags_common.c \
42249967Sneel	vli_size.c \
43249967Sneel	alone_encoder.c \
44249967Sneel	block_buffer_encoder.c \
45249967Sneel	block_encoder.c \
46249967Sneel	block_header_encoder.c \
47249967Sneel	easy_buffer_encoder.c \
48249967Sneel	easy_encoder.c \
49249967Sneel	easy_encoder_memusage.c \
50249967Sneel	filter_buffer_encoder.c \
51249967Sneel	filter_encoder.c \
52249967Sneel	filter_flags_encoder.c \
53249967Sneel	index_encoder.c \
54249967Sneel	stream_buffer_encoder.c \
55249967Sneel	stream_encoder.c \
56249967Sneel	stream_flags_encoder.c \
57249967Sneel	vli_encoder.c \
58249967Sneel	alone_decoder.c \
59249967Sneel	auto_decoder.c \
60249967Sneel	block_buffer_decoder.c \
61249967Sneel	block_decoder.c \
62249967Sneel	block_header_decoder.c \
63249967Sneel	easy_decoder_memusage.c \
64249967Sneel	filter_buffer_decoder.c \
65249967Sneel	filter_decoder.c \
66249967Sneel	filter_flags_decoder.c \
67249967Sneel	index_decoder.c \
68249967Sneel	index_hash.c \
69249967Sneel	stream_buffer_decoder.c \
70249967Sneel	stream_decoder.c \
71249967Sneel	stream_flags_decoder.c \
72249967Sneel	vli_decoder.c
73249967Sneel
74249967Sneel.PATH: ${LZMADIR}/check
75249967SneelSRCS+=	check.c \
76249967Sneel	crc32_table.c \
77249967Sneel	crc64_table.c \
78249967Sneel	sha256.c
79249967Sneel.if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
80249967SneelSRCS+=	crc32_x86.S \
81249967Sneel	crc64_x86.S
82249967Sneel.else
83249967SneelSRCS+=	crc32_fast.c \
84249967Sneel	crc64_fast.c
85249967Sneel.endif
86249967Sneel
87249967Sneel.PATH: ${LZMADIR}/lz
88249967SneelSRCS+=	lz_encoder.c \
89249967Sneel	lz_encoder_mf.c \
90249967Sneel	lz_decoder.c
91249967Sneel
92249967Sneel.PATH: ${LZMADIR}/lzma
93249967SneelSRCS+=	lzma_encoder.c \
94249967Sneel	lzma_encoder_presets.c \
95249967Sneel	lzma_encoder_optimum_fast.c \
96249967Sneel	lzma_encoder_optimum_normal.c \
97249967Sneel	fastpos_table.c \
98249967Sneel	lzma_decoder.c \
99249967Sneel	lzma2_encoder.c \
100249967Sneel	lzma2_decoder.c
101249967Sneel
102249967Sneel.PATH: ${LZMADIR}/rangecoder
103249967SneelSRCS+=	price_table.c
104249967Sneel
105249967Sneel.PATH: ${LZMADIR}/delta
106249967SneelSRCS+=	delta_common.c \
107249967Sneel	delta_encoder.c \
108249967Sneel	delta_decoder.c
109249967Sneel
110249967Sneel.PATH: ${LZMADIR}/simple
111249967SneelSRCS+=	simple_coder.c \
112249967Sneel	simple_encoder.c \
113249967Sneel	simple_decoder.c \
114249967Sneel	x86.c \
115249967Sneel	powerpc.c \
116249967Sneel	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}/subblock \
133		-I${LZMADIR}/delta \
134		-I${LZMADIR}/simple \
135		-I${LZMADIR}/../common
136
137VERSION_DEF=	${.CURDIR}/Versions.def
138SYMBOL_MAPS=	${.CURDIR}/Symbol.map
139CFLAGS+=	-DSYMBOL_VERSIONING
140
141.include <bsd.lib.mk>
142