1#	$NetBSD: Makefile,v 1.39 2010/04/23 19:41:02 joerg Exp $
2#       @(#)Makefile	8.1 (Berkeley) 5/31/93
3
4.include <bsd.own.mk>
5
6PROG=   pax
7SRCS=	ar_io.c ar_subs.c buf_subs.c file_subs.c ftree.c\
8	gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c tables.c\
9	tar.c tty_subs.c
10
11.if defined(SMALLPROG)
12CPPFLAGS+=	-DSMALL -DNO_CPIO
13.else
14SRCS+=		getid.c spec.c misc.c pack_dev.c cpio.c
15CPPFLAGS+=	-I${NETBSDSRCDIR}/usr.sbin/mtree \
16		-I${NETBSDSRCDIR}/sbin/mknod
17.PATH:		${NETBSDSRCDIR}/usr.sbin/mtree \
18		${NETBSDSRCDIR}/sbin/mknod
19
20.if (${HOSTPROG:U} == "")
21DPADD+= ${LIBUTIL}
22LDADD+= -lutil
23.endif
24.endif
25
26MAN=	pax.1 tar.1 cpio.1
27
28.if defined(HOSTPROG)
29CPPFLAGS+=	-DHOSTPROG
30.else	# {	! HOSTPROG
31
32# XXX: Interix does not have it; we need a conditional for it.
33CPPFLAGS+=	-DHAVE_SYS_MTIO_H
34
35.if ${MKBSDTAR} == "no"
36LINKS+=	${BINDIR}/pax ${BINDIR}/tar
37SYMLINKS+=${BINDIR}/tar /usr/bin/tar
38
39LINKS+=	${BINDIR}/pax ${BINDIR}/cpio
40SYMLINKS+=${BINDIR}/cpio /usr/bin/cpio
41.endif
42.endif	# }	! HOSTPROG
43
44.if !defined(HOSTPROG) && !defined(SMALLPROG)
45CPPFLAGS+=	-DSUPPORT_RMT
46
47LDADD+=	-lrmt
48DPADD+=	${LIBRMT}
49.endif
50
51.include <bsd.prog.mk>
52