Makefile revision 1.50
11.50Sapb#	$NetBSD: Makefile,v 1.50 2007/08/07 07:47:50 apb 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.48She		sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
131.49Snakayama		strlcat.c strlcpy.c strmode.c strndup.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.47SdogcowCPPFLAGS+=	-I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
281.47Sdogcow		-DHAVE_NBTOOL_CONFIG_H=1 -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.46Smrg		${.CURDIR}/../../common/lib/libc/hash/rmd160 \
441.40Schristos		${.CURDIR}/../../common/lib/libc/hash/sha1 \
451.46Smrg		${.CURDIR}/../../common/lib/libc/hash/sha2 \
461.40Schristos		${.CURDIR}/../../common/lib/libc/md \
471.45Sthorpej		${.CURDIR}/../../common/lib/libc/stdlib \
481.44Schristos		${.CURDIR}/../../usr.bin/lex
491.1Stv
501.6StvDPSRCS+=	defs.mk
511.43SchristosCLEANFILES+=	config.log config.status configure.lineno *.stamp
521.3Stv
531.3Stv# Get components of Berkeley DB.
541.3Stv_CURDIR:=	${.CURDIR}
551.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
561.3Stv.include "${.CURDIR}/db/Makefile.inc"
571.3Stv.CURDIR:=	${_CURDIR}
581.3Stv
591.37SchristosSRCS:=		${SRCS:Nndbm*.c}
601.1Stv
611.42Swizconfig.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
621.20Slukem	rm -f ${.TARGET}
631.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
641.27Slukem		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
651.20Slukem
661.20Slukemdefs.mk: config.cache
671.20Slukem	@touch ${.TARGET}
681.1Stv
691.50Sapb# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
701.50Sapb# configure.ac.  See more detailed instructions in configure.ac.
711.1Stvregen:
721.30Sthorpej	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
731.50Sapb	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
741.6Stv
751.13Stvinclude/.stamp:
761.8Stv	mkdir -p include/sys include/machine include/rpc
771.20Slukem	@touch ${.TARGET}
781.6Stv
791.43Schristoscleandir:
801.43Schristos	-rm -f nbtool_config.h confdefs.h defs.mk
811.6Stv	-rm -r -f include
821.43Schristos	-rm -f config.cache
831.6Stv
841.6StvHOST_CPPFLAGS:=	${CPPFLAGS}
851.6StvCPPFLAGS:=	# empty
861.1Stv
871.1Stv.include <bsd.hostlib.mk>
88