Makefile revision 1.60
11.60Sapb#	$NetBSD: Makefile,v 1.60 2012/12/02 12:19:34 apb Exp $
21.1Stv
31.1StvHOSTLIB=	nbcompat
41.1Stv
51.59SjoergSRCS=		atoll.c basename.c cdbr.c cdbw.c dirname.c \
61.57Sjoerg		fgetln.c flock.c fparseln.c fpurge.c \
71.58Sjoerg		getcap.c getline.c getmode.c getopt_long.c gettemp.c \
81.55Sjoerg		heapsort.c \
91.39Selad		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
101.54Sroy		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
111.54Sroy		mi_vector_hash.c mkdtemp.c \
121.22Sthorpej		mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
131.51Slukem		pw_scan.c \
141.51Slukem		raise_default_signal.c rmd160.c rmd160hl.c \
151.51Slukem		setenv.c setgroupent.c \
161.34Selad		setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
171.48She		sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
181.49Snakayama		strlcat.c strlcpy.c strmode.c strndup.c strsep.c strsuftoll.c \
191.36Schristos		strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
201.44Schristos		vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
211.21Sthorpej
221.21SthorpejBUILD_OSTYPE!=  uname -s
231.21Sthorpej
241.21Sthorpej# Disable use of pre-compiled headers on Darwin.
251.21Sthorpej.if ${BUILD_OSTYPE} == "Darwin"
261.21SthorpejCPPFLAGS+=	-no-cpp-precomp
271.21Sthorpej.endif
281.6Stv
291.6Stv# -D_FILE_OFFSET_BITS=64 produces a much more amenable `struct stat', and
301.6Stv# other file ops, on many systems, without changing function names.
311.6Stv
321.47SdogcowCPPFLAGS+=	-I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
331.47Sdogcow		-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
341.3Stv
351.57Sjoerg.PATH:		${.CURDIR}/../../lib/libc/cdb \
361.57Sjoerg		${.CURDIR}/../../lib/libc/gen \
371.9Sbjh21		${.CURDIR}/../../lib/libc/hash \
381.39Selad		${.CURDIR}/../../lib/libc/hash/md2 \
391.38Selad		${.CURDIR}/../../lib/libc/hash/md5 \
401.38Selad		${.CURDIR}/../../lib/libc/hash/rmd160 \
411.38Selad		${.CURDIR}/../../lib/libc/hash/sha1 \
421.34Selad		${.CURDIR}/../../lib/libc/hash/sha2 \
431.9Sbjh21		${.CURDIR}/../../lib/libc/md \
441.15Sthorpej		${.CURDIR}/../../lib/libc/stdio \
451.6Stv		${.CURDIR}/../../lib/libc/stdlib \
461.4Slukem		${.CURDIR}/../../lib/libc/string \
471.44Schristos		${.CURDIR}/../../lib/libutil \
481.40Schristos		${.CURDIR}/../../common/lib/libc/string \
491.46Smrg		${.CURDIR}/../../common/lib/libc/hash/rmd160 \
501.40Schristos		${.CURDIR}/../../common/lib/libc/hash/sha1 \
511.46Smrg		${.CURDIR}/../../common/lib/libc/hash/sha2 \
521.40Schristos		${.CURDIR}/../../common/lib/libc/md \
531.45Sthorpej		${.CURDIR}/../../common/lib/libc/stdlib \
541.56Snjoly		${.CURDIR}/../../external/bsd/flex/dist
551.1Stv
561.6StvDPSRCS+=	defs.mk
571.43SchristosCLEANFILES+=	config.log config.status configure.lineno *.stamp
581.3Stv
591.3Stv# Get components of Berkeley DB.
601.3Stv_CURDIR:=	${.CURDIR}
611.3Stv.CURDIR:=	${_CURDIR}/../../lib/libc
621.3Stv.include "${.CURDIR}/db/Makefile.inc"
631.3Stv.CURDIR:=	${_CURDIR}
641.3Stv
651.54SroySRCS:=		${SRCS:M*.c}
661.1Stv
671.42Swizconfig.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
681.20Slukem	rm -f ${.TARGET}
691.3Stv	CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} LDFLAGS=${HOST_LDFLAGS:Q} \
701.27Slukem		${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
711.20Slukem
721.20Slukemdefs.mk: config.cache
731.20Slukem	@touch ${.TARGET}
741.1Stv
751.13Stvinclude/.stamp:
761.52Stsutsui	mkdir -p include/sys include/machine include/rpc include/arpa
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>
881.60Sapb
891.60Sapb# Use uninstalled copy of host-mkdep
901.60SapbHOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep && ${PRINTOBJDIR}
911.60SapbHOST_MKDEP=	${HOST_MKDEP_OBJ}/host-mkdep
921.60SapbMKDEP=		${HOST_MKDEP}
931.60Sapb
941.60Sapb# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
951.60Sapb# configure.ac.  See more detailed instructions in configure.ac.
961.60Sapbregen:
971.60Sapb	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
981.60Sapb	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
99