Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / bin / pax / Makefile
blobe1c5118c108ca0679e8e848fe370f51867956ce5
1 # $NetBSD: Makefile,v 1.37 2008/02/24 20:42:46 joerg Exp $
2 # @(#)Makefile 8.1 (Berkeley) 5/31/93
4 .include <bsd.own.mk>
6 PROG= pax
7 SRCS= 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
11 .if defined(SMALLPROG)
12 CPPFLAGS+= -DSMALL -DNO_CPIO
13 .else
14 SRCS+= getid.c spec.c misc.c pack_dev.c cpio.c
15 CPPFLAGS+= -I${NETBSDSRCDIR}/usr.sbin/mtree \
16 -I${NETBSDSRCDIR}/sbin/mknod
17 .PATH: ${NETBSDSRCDIR}/usr.sbin/mtree \
18 ${NETBSDSRCDIR}/sbin/mknod
20 .if (${HOSTPROG:U} == "")
21 DPADD+= ${LIBUTIL}
22 LDADD+= -lutil
23 .endif
24 .endif
26 MAN= pax.1 tar.1 cpio.1
28 .if defined(HOSTPROG)
29 CPPFLAGS+= -DHOSTPROG
30 .else # { ! HOSTPROG
32 # XXX: Interix does not have it; we need a conditional for it.
33 CPPFLAGS+= -DHAVE_SYS_MTIO_H
35 LINKS+= ${BINDIR}/pax ${BINDIR}/tar
36 SYMLINKS+=${BINDIR}/tar /usr/bin/tar
38 LINKS+= ${BINDIR}/pax ${BINDIR}/cpio
39 SYMLINKS+=${BINDIR}/cpio /usr/bin/cpio
40 .endif # } ! HOSTPROG
42 .if !defined(HOSTPROG) && !defined(SMALLPROG)
43 CPPFLAGS+= -DSUPPORT_RMT
45 LDADD+= -lrmt
46 DPADD+= ${LIBRMT}
47 .endif
49 .include <bsd.prog.mk>