Makefile revision 1.54
11.54Sroy#	$NetBSD: Makefile,v 1.54 2010/02/03 15:34:44 roy Exp $
21.1Stv
31.1StvHOSTLIB=	nbcompat
41.1Stv
51.24SuweSRCS=		atoll.c basename.c dirname.c fgetln.c flock.c fparseln.c \
61.53Schristos		fpurge.c getmode.c getopt_long.c gettemp.c heapsort.c \
71.39Selad		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
81.54Sroy		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
91.54Sroy		mi_vector_hash.c mkdtemp.c \
101.22Sthorpej		mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
111.51Slukem		pw_scan.c \
121.51Slukem		raise_default_signal.c rmd160.c rmd160hl.c \
131.51Slukem		setenv.c setgroupent.c \
141.34Selad		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
151.48She		sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
161.49Snakayama		strlcat.c strlcpy.c strmode.c strndup.c strsep.c strsuftoll.c \
171.36Schristos		strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
181.44Schristos		vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
191.21Sthorpej
201.21SthorpejBUILD_OSTYPE!=  uname -s
211.21Sthorpej
221.21Sthorpej# Disable use of pre-compiled headers on Darwin.
231.21Sthorpej.if ${BUILD_OSTYPE} == "Darwin"
241.21SthorpejCPPFLAGS+=	-no-cpp-precomp
251.21Sthorpej.endif
261.6Stv
271.6Stv# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
281.6Stv# other file ops, on many systems, without changing function names.
291.6Stv
301.47SdogcowCPPFLAGS+=	-I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
311.47Sdogcow		-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
321.3Stv
331.3Stv.PATH:		${.CURDIR}/../../lib/libc/gen \
341.9Sbjh21		${.CURDIR}/../../lib/libc/hash \
351.39Selad		${.CURDIR}/../../lib/libc/hash/md2 \
361.38Selad		${.CURDIR}/../../lib/libc/hash/md5 \
371.38Selad		${.CURDIR}/../../lib/libc/hash/rmd160 \
381.38Selad		${.CURDIR}/../../lib/libc/hash/sha1 \
391.34Selad		${.CURDIR}/../../lib/libc/hash/sha2 \
401.9Sbjh21		${.CURDIR}/../../lib/libc/md \
411.15Sthorpej		${.CURDIR}/../../lib/libc/stdio \
421.6Stv		${.CURDIR}/../../lib/libc/stdlib \
431.4Slukem		${.CURDIR}/../../lib/libc/string \
441.44Schristos		${.CURDIR}/../../lib/libutil \
451.40Schristos		${.CURDIR}/../../common/lib/libc/string \
461.46Smrg		${.CURDIR}/../../common/lib/libc/hash/rmd160 \
471.40Schristos		${.CURDIR}/../../common/lib/libc/hash/sha1 \
481.46Smrg		${.CURDIR}/../../common/lib/libc/hash/sha2 \
491.40Schristos		${.CURDIR}/../../common/lib/libc/md \
501.45Sthorpej		${.CURDIR}/../../common/lib/libc/stdlib \
511.44Schristos		${.CURDIR}/../../usr.bin/lex
521.1Stv
531.6StvDPSRCS+=	defs.mk
541.43SchristosCLEANFILES+=	config.log config.status configure.lineno *.stamp
551.3Stv
561.3Stv# Get components of Berkeley DB.
571.3Stv_CURDIR:=	${.CURDIR}
581.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
591.3Stv.include "${.CURDIR}/db/Makefile.inc"
601.3Stv.CURDIR:=	${_CURDIR}
611.3Stv
621.54SroySRCS:=		${SRCS:M*.c}
631.1Stv
641.42Swizconfig.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
651.20Slukem	rm -f ${.TARGET}
661.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
671.27Slukem		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
681.20Slukem
691.20Slukemdefs.mk: config.cache
701.20Slukem	@touch ${.TARGET}
711.1Stv
721.50Sapb# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
731.50Sapb# configure.ac.  See more detailed instructions in configure.ac.
741.1Stvregen:
751.30Sthorpej	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
761.50Sapb	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
771.6Stv
781.13Stvinclude/.stamp:
791.52Stsutsui	mkdir -p include/sys include/machine include/rpc include/arpa
801.20Slukem	@touch ${.TARGET}
811.6Stv
821.43Schristoscleandir:
831.43Schristos	-rm -f nbtool_config.h confdefs.h defs.mk
841.6Stv	-rm -r -f include
851.43Schristos	-rm -f config.cache
861.6Stv
871.6StvHOST_CPPFLAGS:=	${CPPFLAGS}
881.6StvCPPFLAGS:=	# empty
891.1Stv
901.1Stv.include <bsd.hostlib.mk>
91