Home | History | Annotate | Line # | Download | only in pax
Makefile revision 1.32
      1 #	$NetBSD: Makefile,v 1.32 2005/05/01 02:59:28 christos Exp $
      2 #       @(#)Makefile	8.1 (Berkeley) 5/31/93
      3 
      4 # To install on versions prior to BSD 4.4 the following may have to be
      5 # defined with CPPFLAGS +=
      6 #
      7 # -DNET2_STAT	Use NET2 or older stat structure. The version of the
      8 # 		stat structure is easily determined by looking at the
      9 # 		basic type of an off_t (often defined in the file:
     10 # 		/usr/include/sys/types.h). If off_t is a long (and is
     11 # 		NOT A long long) then you must define NET2_STAT.
     12 # 		This define is important, as if you do have a long long
     13 # 		off_t and define NET2_STAT, pax will compile but will
     14 # 		NOT RUN PROPERLY.
     15 #
     16 # -DNET2_FTS	Use the older NET2 fts. To identify the version,
     17 # 		examine the file: /usr/include/fts.h. If FTS_COMFOLLOW
     18 # 		is not defined then you must define NET2_FTS.
     19 # 		Pax may not compile if this not (un)defined properly.
     20 #
     21 # -DNET2_REGEX	Use the older regexp.h not regex.h. The regex version
     22 # 		is determined by looking at the value returned by
     23 # 		regexec() (man 3 regexec). If regexec return a 1 for
     24 # 		success (and NOT a 0 for success) you have the older
     25 # 		regex routines and must define NET2_REGEX.
     26 # 		Pax may not compile if this not (un)defined properly.
     27 
     28 .include <bsd.own.mk>
     29 
     30 WARNS=3
     31 PROG=   pax
     32 SRCS=	ar_io.c ar_subs.c buf_subs.c cpio.c file_subs.c ftree.c\
     33 	gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c tables.c\
     34 	tar.c tty_subs.c
     35 
     36 .if defined(SMALLPROG)
     37 CPPFLAGS+=	-DSMALL
     38 .else
     39 SRCS+=		getid.c spec.c misc.c stat_flags.c pack_dev.c
     40 CPPFLAGS+=	-I${NETBSDSRCDIR}/usr.sbin/mtree \
     41 		-I${NETBSDSRCDIR}/sbin/mknod \
     42 		-I${NETBSDSRCDIR}/bin/ls
     43 .PATH:		${NETBSDSRCDIR}/usr.sbin/mtree \
     44 		${NETBSDSRCDIR}/sbin/mknod \
     45 		${NETBSDSRCDIR}/bin/ls
     46 .endif
     47 
     48 MAN=	pax.1 tar.1 cpio.1
     49 
     50 # XXX: Interix does not have it; we need a conditional for it.
     51 CPPFLAGS+=	-DHAVE_MTIO_H
     52 
     53 .if defined(HOSTPROG)
     54 CPPFLAGS+=	-DHOSTPROG
     55 .else	# {	! HOSTPROG
     56 LINKS+=	${BINDIR}/pax ${BINDIR}/tar
     57 SYMLINKS+=${BINDIR}/tar /usr/bin/tar
     58 
     59 LINKS+=	${BINDIR}/pax ${BINDIR}/cpio
     60 SYMLINKS+=${BINDIR}/cpio /usr/bin/cpio
     61 .endif	# }	! HOSTPROG
     62 
     63 .if !defined(HOSTPROG) && !defined(SMALLPROG)
     64 CPPFLAGS+=	-DSUPPORT_RMT
     65 
     66 LDADD+=	-lrmt
     67 DPADD+=	${LIBRMT}
     68 .endif
     69 
     70 .include <bsd.prog.mk>
     71