Makefile revision 1.51
11.51Slukem#	$NetBSD: Makefile,v 1.51 2007/09/28 09:12:49 lukem 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.51Slukem		pw_scan.c \
111.51Slukem		raise_default_signal.c rmd160.c rmd160hl.c \
121.51Slukem		setenv.c setgroupent.c \
131.34Selad		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
141.48She		sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
151.49Snakayama		strlcat.c strlcpy.c strmode.c strndup.c strsep.c strsuftoll.c \
161.36Schristos		strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
171.44Schristos		vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
181.21Sthorpej
191.21SthorpejBUILD_OSTYPE!=  uname -s
201.21Sthorpej
211.21Sthorpej# Disable use of pre-compiled headers on Darwin.
221.21Sthorpej.if ${BUILD_OSTYPE} == "Darwin"
231.21SthorpejCPPFLAGS+=	-no-cpp-precomp
241.21Sthorpej.endif
251.6Stv
261.6Stv# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
271.6Stv# other file ops, on many systems, without changing function names.
281.6Stv
291.47SdogcowCPPFLAGS+=	-I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
301.47Sdogcow		-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
311.3Stv
321.3Stv.PATH:		${.CURDIR}/../../lib/libc/gen \
331.9Sbjh21		${.CURDIR}/../../lib/libc/hash \
341.39Selad		${.CURDIR}/../../lib/libc/hash/md2 \
351.38Selad		${.CURDIR}/../../lib/libc/hash/md5 \
361.38Selad		${.CURDIR}/../../lib/libc/hash/rmd160 \
371.38Selad		${.CURDIR}/../../lib/libc/hash/sha1 \
381.34Selad		${.CURDIR}/../../lib/libc/hash/sha2 \
391.9Sbjh21		${.CURDIR}/../../lib/libc/md \
401.15Sthorpej		${.CURDIR}/../../lib/libc/stdio \
411.6Stv		${.CURDIR}/../../lib/libc/stdlib \
421.4Slukem		${.CURDIR}/../../lib/libc/string \
431.44Schristos		${.CURDIR}/../../lib/libutil \
441.40Schristos		${.CURDIR}/../../common/lib/libc/string \
451.46Smrg		${.CURDIR}/../../common/lib/libc/hash/rmd160 \
461.40Schristos		${.CURDIR}/../../common/lib/libc/hash/sha1 \
471.46Smrg		${.CURDIR}/../../common/lib/libc/hash/sha2 \
481.40Schristos		${.CURDIR}/../../common/lib/libc/md \
491.45Sthorpej		${.CURDIR}/../../common/lib/libc/stdlib \
501.44Schristos		${.CURDIR}/../../usr.bin/lex
511.1Stv
521.6StvDPSRCS+=	defs.mk
531.43SchristosCLEANFILES+=	config.log config.status configure.lineno *.stamp
541.3Stv
551.3Stv# Get components of Berkeley DB.
561.3Stv_CURDIR:=	${.CURDIR}
571.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
581.3Stv.include "${.CURDIR}/db/Makefile.inc"
591.3Stv.CURDIR:=	${_CURDIR}
601.3Stv
611.37SchristosSRCS:=		${SRCS:Nndbm*.c}
621.1Stv
631.42Swizconfig.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
641.20Slukem	rm -f ${.TARGET}
651.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
661.27Slukem		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
671.20Slukem
681.20Slukemdefs.mk: config.cache
691.20Slukem	@touch ${.TARGET}
701.1Stv
711.50Sapb# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
721.50Sapb# configure.ac.  See more detailed instructions in configure.ac.
731.1Stvregen:
741.30Sthorpej	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
751.50Sapb	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
761.6Stv
771.13Stvinclude/.stamp:
781.8Stv	mkdir -p include/sys include/machine include/rpc
791.20Slukem	@touch ${.TARGET}
801.6Stv
811.43Schristoscleandir:
821.43Schristos	-rm -f nbtool_config.h confdefs.h defs.mk
831.6Stv	-rm -r -f include
841.43Schristos	-rm -f config.cache
851.6Stv
861.6StvHOST_CPPFLAGS:=	${CPPFLAGS}
871.6StvCPPFLAGS:=	# empty
881.1Stv
891.1Stv.include <bsd.hostlib.mk>
90