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