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