Makefile revision 1.6
11.6Stv#	$NetBSD: Makefile,v 1.6 2002/01/29 10:20:31 tv Exp $
21.1Stv
31.1StvHOSTLIB=	nbcompat
41.1Stv
51.6StvSRCS=		basename.c dirname.c fgetln.c flock.c fparseln.c \
61.6Stv		getmode.c getopt_long.c pread.c pwcache.c pwrite.c \
71.6Stv		pw_scan.c setenv.c setgroupent.c setpassent.c \
81.6Stv		setprogname.c snprintf.c \
91.6Stv		strlcat.c strlcpy.c strmode.c strsep.c unvis.c vis.c \
101.6Stv		_err.c _errx.c _verr.c _verrx.c _vwarn.c _vwarnx.c \
111.6Stv		_warn.c _warnx.c __fts13.c
121.6Stv
131.6Stv# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
141.6Stv# other file ops, on many systems, without changing function names.
151.6Stv
161.6StvCPPFLAGS+=	-I. -I./include -I${.CURDIR} -DHAVE_CONFIG_H -Dlint \
171.6Stv		-D_FILE_OFFSET_BITS=64
181.3Stv
191.3Stv.PATH:		${.CURDIR}/../../lib/libc/gen \
201.6Stv		${.CURDIR}/../../lib/libc/stdlib \
211.4Slukem		${.CURDIR}/../../lib/libc/string \
221.4Slukem		${.CURDIR}/../../lib/libutil \
231.1Stv
241.6StvDPSRCS+=	defs.mk
251.6StvCLEANFILES=	config.log config.status confdefs.h includedir.stamp
261.3Stv
271.3Stv# Get components of Berkeley DB.
281.3Stv_CURDIR:=	${.CURDIR}
291.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
301.3Stv.include "${.CURDIR}/db/Makefile.inc"
311.3Stv.CURDIR:=	${_CURDIR}
321.3Stv
331.3StvSRCS:=		${SRCS:Nndbm.c}
341.1Stv
351.6Stvdefs.mk: includedir.stamp configure config.h.in defs.mk.in
361.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
371.3Stv		sh ${.CURDIR}/configure --cache-file=config.cache
381.3Stv	@touch $@
391.1Stv
401.1Stv# Run by hand, then "configure" script committed:
411.1Stvregen:
421.1Stv	cd ${.CURDIR} && ${TOOLDIR}/bin/nbautoconf
431.6Stv
441.6Stvincludedir.stamp:
451.6Stv	mkdir -p include/sys
461.6Stv	@touch $@
471.6Stv
481.6Stvcleandir: compat.clean
491.6Stvcompat.clean:
501.6Stv	-rm -r -f include
511.6Stv	-rm -f config.cache config.h
521.6Stv
531.6StvHOST_CPPFLAGS:=	${CPPFLAGS}
541.6StvCPPFLAGS:=	# empty
551.1Stv
561.1Stv.include <bsd.hostlib.mk>
57