Makefile revision 1.45
11.45Sthorpej#	$NetBSD: Makefile,v 1.45 2006/10/08 04:31:55 thorpej 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.45Sthorpej		${.CURDIR}/../../common/lib/libc/stdlib \
461.44Schristos		${.CURDIR}/../../usr.bin/lex
471.1Stv
481.6StvDPSRCS+=	defs.mk
491.43SchristosCLEANFILES+=	config.log config.status configure.lineno *.stamp
501.3Stv
511.3Stv# Get components of Berkeley DB.
521.3Stv_CURDIR:=	${.CURDIR}
531.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
541.3Stv.include "${.CURDIR}/db/Makefile.inc"
551.3Stv.CURDIR:=	${_CURDIR}
561.3Stv
571.37SchristosSRCS:=		${SRCS:Nndbm*.c}
581.1Stv
591.42Swizconfig.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
601.20Slukem	rm -f ${.TARGET}
611.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
621.27Slukem		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
631.20Slukem
641.20Slukemdefs.mk: config.cache
651.20Slukem	@touch ${.TARGET}
661.1Stv
671.1Stv# Run by hand, then "configure" script committed:
681.1Stvregen:
691.30Sthorpej	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
701.6Stv
711.13Stvinclude/.stamp:
721.8Stv	mkdir -p include/sys include/machine include/rpc
731.20Slukem	@touch ${.TARGET}
741.6Stv
751.43Schristoscleandir:
761.43Schristos	-rm -f nbtool_config.h confdefs.h defs.mk
771.6Stv	-rm -r -f include
781.43Schristos	-rm -f config.cache
791.6Stv
801.6StvHOST_CPPFLAGS:=	${CPPFLAGS}
811.6StvCPPFLAGS:=	# empty
821.1Stv
831.1Stv.include <bsd.hostlib.mk>
84