Makefile revision 1.3 1 1.3 joerg # $NetBSD: Makefile,v 1.3 2010/11/09 23:07:09 joerg Exp $
2 1.1 joerg
3 1.1 joerg LIB= lzma
4 1.1 joerg USE_SHLIBDIR= yes
5 1.1 joerg NOLINT= yes
6 1.1 joerg
7 1.1 joerg .include <bsd.init.mk>
8 1.1 joerg
9 1.2 joerg # There are two different lzma.h files.
10 1.2 joerg # Copy public version to distinguish them.
11 1.2 joerg pub-lzma.h: ${XZSRCDIR}/src/liblzma/api/lzma.h
12 1.2 joerg ${_MKTARGET_CREATE}
13 1.2 joerg rm -f ${.TARGET}
14 1.2 joerg ${TOOL_CAT} ${XZSRCDIR}/src/liblzma/api/lzma.h > ${.TARGET}
15 1.2 joerg CLEANFILES+= pub-lzma.h
16 1.2 joerg INCS= pub-lzma.h
17 1.2 joerg INCSDIR_pub-lzma.h= /usr/include
18 1.2 joerg INCSNAME_pub-lzma.h= lzma.h
19 1.2 joerg
20 1.2 joerg .PATH: ${XZSRCDIR}/src/liblzma/api/lzma
21 1.2 joerg INCS+= base.h bcj.h block.h check.h container.h delta.h \
22 1.2 joerg filter.h hardware.h index.h index_hash.h lzma.h stream_flags.h \
23 1.2 joerg version.h vli.h
24 1.2 joerg
25 1.2 joerg INCSDIR= /usr/include/lzma
26 1.2 joerg
27 1.1 joerg LDFLAGS+= -Wl,-z,defs
28 1.1 joerg
29 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/check
30 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/common
31 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/delta
32 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/lz
33 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/lzma
34 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/rangecoder
35 1.1 joerg CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/simple
36 1.1 joerg CPPFLAGS+= -DTUKLIB_SYMBOL_PREFIX=lzma_
37 1.1 joerg CPPFLAGS+= -DNETBSD_NATIVE_SHA256
38 1.1 joerg
39 1.1 joerg .PATH: ${XZSRCDIR}/src/common
40 1.1 joerg SRCS+= tuklib_physmem.c
41 1.1 joerg
42 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/check
43 1.1 joerg SRCS+= check.c crc32_table.c crc64_table.c
44 1.1 joerg SRCS+= crc32_fast.c crc64_fast.c
45 1.1 joerg
46 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/common
47 1.1 joerg SRCS+= common.c block_util.c easy_preset.c filter_common.c \
48 1.1 joerg hardware_physmem.c index.c \
49 1.1 joerg stream_flags_common.c vli_size.c \
50 1.1 joerg alone_encoder.c block_buffer_encoder.c block_encoder.c \
51 1.3 joerg block_header_encoder.c easy_buffer_encoder.c easy_encoder.c \
52 1.1 joerg easy_encoder_memusage.c filter_buffer_encoder.c \
53 1.1 joerg filter_encoder.c filter_flags_encoder.c index_encoder.c \
54 1.1 joerg stream_buffer_encoder.c stream_encoder.c stream_flags_encoder.c \
55 1.1 joerg vli_encoder.c \
56 1.1 joerg alone_decoder.c auto_decoder.c block_buffer_decoder.c \
57 1.1 joerg block_decoder.c block_header_decoder.c easy_decoder_memusage.c \
58 1.1 joerg filter_buffer_decoder.c filter_decoder.c filter_flags_decoder.c \
59 1.1 joerg index_decoder.c index_hash.c stream_buffer_decoder.c \
60 1.1 joerg stream_decoder.c stream_flags_decoder.c vli_decoder.c
61 1.1 joerg
62 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/delta
63 1.1 joerg SRCS+= delta_common.c delta_encoder.c delta_decoder.c
64 1.1 joerg
65 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/lz
66 1.1 joerg SRCS+= lz_decoder.c lz_encoder.c lz_encoder_mf.c
67 1.1 joerg
68 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/lzma
69 1.1 joerg SRCS+= lzma_encoder.c lzma_encoder_presets.c \
70 1.1 joerg lzma_encoder_optimum_fast.c lzma_encoder_optimum_normal.c \
71 1.1 joerg lzma_decoder.c lzma2_encoder.c lzma2_decoder.c \
72 1.1 joerg fastpos_table.c
73 1.1 joerg
74 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/rangecoder
75 1.1 joerg SRCS+= price_table.c
76 1.1 joerg
77 1.1 joerg .PATH: ${XZSRCDIR}/src/liblzma/simple
78 1.1 joerg SRCS+= simple_coder.c simple_encoder.c simple_decoder.c \
79 1.1 joerg arm.c armthumb.c ia64.c powerpc.c sparc.c x86.c
80 1.1 joerg
81 1.1 joerg liblzma.pc: ${XZSRCDIR}/src/liblzma/liblzma.pc.in
82 1.1 joerg ${_MKTARGET_CREATE}
83 1.1 joerg rm -f ${.TARGET}
84 1.1 joerg ${TOOL_SED} \
85 1.1 joerg -e 's,@prefix@,/usr,' \
86 1.1 joerg -e 's,@exec_prefix@,/usr,' \
87 1.1 joerg -e 's,@libdir@,/usr/lib,' \
88 1.1 joerg -e 's,@includedir@,/usr/include,' \
89 1.1 joerg -e 's,@PACKAGE_HOMEPAGE@,${XZHOMEPAGE:Q},' \
90 1.1 joerg -e 's,@PACKAGE_VERSION@,${XZVERSION:Q},' \
91 1.1 joerg -e 's,@PTHREAD_CFLAGS@ @PTHREAD_LIBS@,,' \
92 1.1 joerg < ${XZSRCDIR}/src/liblzma/liblzma.pc.in \
93 1.1 joerg > ${.TARGET}.tmp && \
94 1.1 joerg mv -f ${.TARGET}.tmp ${.TARGET}
95 1.1 joerg
96 1.1 joerg CLEANFILES+= liblzma.pc
97 1.1 joerg
98 1.1 joerg .include <bsd.lib.mk>
99