]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/cpio/Makefile
contrib/tzdata: import tzdata 2022f
[FreeBSD/FreeBSD.git] / usr.bin / cpio / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4
5 _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
6 _LIBARCHIVECONFDIR=     ${SRCTOP}/lib/libarchive
7
8 PROG=   bsdcpio
9 BSDCPIO_VERSION_STRING!=        sed -n '/define.*ARCHIVE_VERSION_ONLY_STRING/{s,[^0-9.],,gp;q;}' \
10                         ${_LIBARCHIVEDIR}/libarchive/archive.h
11
12 .PATH:  ${_LIBARCHIVEDIR}/cpio
13 SRCS=   cpio.c cmdline.c
14
15 .PATH:  ${_LIBARCHIVEDIR}/libarchive_fe
16 SRCS+=  err.c line_reader.c passphrase.c
17
18 CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
19 CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\"
20 CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe
21
22 .ifdef RELEASE_CRUNCH
23 # FreeBSD's installer uses cpio in crunched binaries that are
24 # statically linked, cannot use -lcrypto, and are size sensitive.
25 CFLAGS+= -DSMALLER
26 .endif
27 LIBADD= archive
28
29 .if ${MK_ICONV} != "no"
30 CFLAGS+=        -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
31 .endif
32
33 SYMLINKS=bsdcpio ${BINDIR}/cpio
34 MLINKS= bsdcpio.1 cpio.1
35
36 HAS_TESTS=
37 SUBDIR.${MK_TESTS}+= tests
38
39 .include <bsd.prog.mk>