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