Makefile revision 1.44
11.44Schristos#	$NetBSD: Makefile,v 1.44 2006/08/26 18:26:14 christos Exp $
21.1Stv
31.1StvHOSTLIB=	nbcompat
41.1Stv
51.24SuweSRCS=		atoll.c basename.c dirname.c fgetln.c flock.c fparseln.c \
61.39Selad		getmode.c getopt_long.c gettemp.c heapsort.c \
71.39Selad		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
81.39Selad		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c mkdtemp.c \
91.22Sthorpej		mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
101.22Sthorpej		pw_scan.c rmd160.c rmd160hl.c setenv.c setgroupent.c \
111.34Selad		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
121.34Selad		sha256hl.c sha384hl.c sha512hl.c snprintf.c \
131.22Sthorpej		strlcat.c strlcpy.c strmode.c strsep.c strsuftoll.c \
141.36Schristos		strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
151.44Schristos		vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
161.21Sthorpej
171.21SthorpejBUILD_OSTYPE!=  uname -s
181.21Sthorpej
191.21Sthorpej# Disable use of pre-compiled headers on Darwin.
201.21Sthorpej.if ${BUILD_OSTYPE} == "Darwin"
211.21SthorpejCPPFLAGS+=	-no-cpp-precomp
221.21Sthorpej.endif
231.6Stv
241.6Stv# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
251.6Stv# other file ops, on many systems, without changing function names.
261.6Stv
271.28SlukemCPPFLAGS+=	-I. -I./include -I${.CURDIR} -DHAVE_NBTOOL_CONFIG_H=1 \
281.31Sjmc		-D_FILE_OFFSET_BITS=64
291.3Stv
301.3Stv.PATH:		${.CURDIR}/../../lib/libc/gen \
311.9Sbjh21		${.CURDIR}/../../lib/libc/hash \
321.39Selad		${.CURDIR}/../../lib/libc/hash/md2 \
331.38Selad		${.CURDIR}/../../lib/libc/hash/md5 \
341.38Selad		${.CURDIR}/../../lib/libc/hash/rmd160 \
351.38Selad		${.CURDIR}/../../lib/libc/hash/sha1 \
361.34Selad		${.CURDIR}/../../lib/libc/hash/sha2 \
371.9Sbjh21		${.CURDIR}/../../lib/libc/md \
381.15Sthorpej		${.CURDIR}/../../lib/libc/stdio \
391.6Stv		${.CURDIR}/../../lib/libc/stdlib \
401.4Slukem		${.CURDIR}/../../lib/libc/string \
411.44Schristos		${.CURDIR}/../../lib/libutil \
421.40Schristos		${.CURDIR}/../../common/lib/libc/string \
431.40Schristos		${.CURDIR}/../../common/lib/libc/hash/sha1 \
441.40Schristos		${.CURDIR}/../../common/lib/libc/md \
451.44Schristos		${.CURDIR}/../../usr.bin/lex
461.1Stv
471.6StvDPSRCS+=	defs.mk
481.43SchristosCLEANFILES+=	config.log config.status configure.lineno *.stamp
491.3Stv
501.3Stv# Get components of Berkeley DB.
511.3Stv_CURDIR:=	${.CURDIR}
521.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
531.3Stv.include "${.CURDIR}/db/Makefile.inc"
541.3Stv.CURDIR:=	${_CURDIR}
551.3Stv
561.37SchristosSRCS:=		${SRCS:Nndbm*.c}
571.1Stv
581.42Swizconfig.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
591.20Slukem	rm -f ${.TARGET}
601.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
611.27Slukem		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
621.20Slukem
631.20Slukemdefs.mk: config.cache
641.20Slukem	@touch ${.TARGET}
651.1Stv
661.1Stv# Run by hand, then "configure" script committed:
671.1Stvregen:
681.30Sthorpej	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
691.6Stv
701.13Stvinclude/.stamp:
711.8Stv	mkdir -p include/sys include/machine include/rpc
721.20Slukem	@touch ${.TARGET}
731.6Stv
741.43Schristoscleandir:
751.43Schristos	-rm -f nbtool_config.h confdefs.h defs.mk
761.6Stv	-rm -r -f include
771.43Schristos	-rm -f config.cache
781.6Stv
791.6StvHOST_CPPFLAGS:=	${CPPFLAGS}
801.6StvCPPFLAGS:=	# empty
811.1Stv
821.1Stv.include <bsd.hostlib.mk>
83